A heat engine turns heat into work, but the laws of thermodynamics cap how much. Drag the sliders below to set the hot and cold reservoir temperatures and the heat supplied, and watch the work out and the Carnot efficiency limit, 1 - Tc/Th, respond.
Pick the hot and cold temperatures and the heat you feed in. The first law balances the energy; the second law caps the work you can ever get back out.
η = 1 − Tc / Th · W = η·Qh · Qc = Qh − W

The laws of thermodynamics simulator is a free interactive physics lab that runs in your browser — nothing to install and no sign-up. Run a heat engine between hot and cold reservoirs and watch the first law and the Carnot efficiency.
| Control | Range | Step |
|---|---|---|
| Hot reservoir temperature | 300 – 900 K | 10 |
| Cold reservoir temperature | 200 – 600 K | 10 |
| Heat supplied per cycle | 500 – 5000 J | 100 |
You are up against two rules at once here, and together they box in every engine ever built. The first law says you cannot win: over a full cycle the working substance comes back to its starting state, so the work you extract is exactly the heat you put in minus the heat you throw away, W = Qh - Qc. Nothing is created. The second law is harsher still — it says you cannot even break even. Some heat Qc must always be dumped into the cold reservoir, so the efficiency η = W/Qh = 1 - Qc/Qh stays stubbornly short of 1.
Drag the sliders and watch the ceiling reveal itself. What sets it is the ratio of the two temperatures: the unbeatable Carnot limit is 1 - Tc/Th with both in kelvin, so raising the hot reservoir Th or lowering the cold reservoir Tc pushes the maximum efficiency higher. Reaching 100% would demand Tc = 0 K — absolute zero — which no cold sink offers.
Notice that the cap depends only on that temperature ratio, not on clever mechanics; a real engine leaks and rubs its way below the ideal, never above it. To pin down that ceiling for any pair of reservoirs, open the Carnot efficiency calculator, take the energy balance apart one process at a time in the first law of thermodynamics simulator, or keep testing intuition against the physics in our interactive simulations.
Every number in the panel is a ceiling, not a prediction, and the entropy line gives it away: ΔS reads 0.000 J/K at every setting, because the model is a perfectly reversible Carnot cycle. Reversible means each step happens across a vanishing temperature difference, and heat crawls across such a gap only if you wait forever. So a Carnot engine wins the most work per joule and gives no power at all. Run it at a useful rate and the efficiency falls towards 1 - sqrt(Tc/Th): for the default 600 K and 300 K that is 29.3 per cent, not the 50.0 per cent on screen.
The reservoirs are fictional too. Slide Heat supplied Qh from 2000 J to 5000 J and the efficiency holds at exactly 50.0 per cent while the work climbs from 1000 J to 2500 J, because the hot source never cools and the cold sink never warms. Real ones do both: 1000 J dumped into a kilogram of water lifts it 0.24 K, and every degree the sink rises eats into 1 - Tc/Th. Worse, heat crosses an exchanger only when a temperature difference drives it, so the working fluid never quite reaches Th or Tc and the real gap is always narrower than the one you set.
Then come the losses with no slider at all: friction in bearings and seals; heat conducted straight out through the cylinder wall; pumping work to move gas in and out; throttling across valves. Every one is irreversible, so every one pushes ΔS above zero and the work below the readout. None appear in 1 - Tc/Th, which knows nothing about how the engine is built: it is a limit set by two temperatures alone, and that is why no mechanism can raise it.
Two smaller traps. Temperatures must be absolute; feed Celsius into 1 - Tc/Th and the answer is meaningless, which is why the sliders use kelvin. And W = Qh - Qc holds over a complete cycle, where the working substance returns to its starting state; over a single stroke it fails, because some heat is still sitting in the gas. And set Th = 310 K against Tc = 300 K: the panel collapses to 3.2 per cent, 65 J of work from 2000 J of heat, because a narrow temperature gap makes a hopeless engine however well built.
Power stations spend their money on the Th end of that fraction. A combined-cycle plant fires a gas turbine with an inlet near 1,700 K and rejects to a condenser near 300 K, a Carnot ceiling of 82.4 per cent; the best plants deliver about 63 per cent in practice. A steam cycle is bolted on behind the turbine for a second-law reason: its exhaust is still hot, so it is a good hot reservoir for a second engine. For comparison, the widest spread these sliders allow, Th = 900 K with Tc = 300 K, reaches only 66.7 per cent.
A car's radiator is the second law made visible. An engine delivering 100 kW at a brake thermal efficiency of 35 per cent is burning fuel at 286 kW, so 186 kW must leave as heat through the exhaust and coolant. That is not sloppy engineering, it is the Qc the panel insists on at every setting: 1000 J dumped for every 1000 J of work at 600 K and 300 K. The cooling system is sized by that number, which is why a road car's radiator and exhaust are so large.
Run the cycle backwards and the same ratio caps fridges and heat pumps, whose figure of merit is heat moved per joule of work, at best Tc/(Th - Tc). A fridge holding 277 K in a 298 K kitchen has a ceiling of 13.2; a heat pump lifting outdoor air at 273 K to 318 K flow water has a ceiling of 6.07. Real machines manage 2 to 4, the shortfall being all the irreversibility above, yet even a mediocre heat pump moves several times more heat than an electric heater makes from the same power.
Energy is conserved. For an engine running a cycle, the work out equals the heat in minus the heat rejected: W = Qh − Qc. You cannot get out more energy than you put in.
Some heat must always be rejected to a cold reservoir, so no engine can turn all its input heat into work. Its efficiency, η = 1 − Qc/Qh, is always less than 1.
The Carnot efficiency, 1 − Tc/Th, with the temperatures in kelvin. It depends only on the ratio of the cold to the hot reservoir temperature, and no real engine can beat it.
Reaching 100% would require the cold reservoir to be at absolute zero (0 K), which is unattainable. In practice some heat is always dumped to the surroundings.
If two systems are each in thermal equilibrium with a third, they are in thermal equilibrium with each other. That is what makes temperature a meaningful single number and what makes a thermometer work, since the instrument reads its own temperature after it has come into equilibrium with the thing you are measuring. It is numbered zero because it was recognised as a law after the first and second were already named.