HomeArticlesThermodynamics

The Otto Cycle: The Four Strokes Behind Every Petrol Engine

Compress, ignite, expand, exhaust — four idealised strokes on a pressure-volume diagram explain why raising the compression ratio makes an engine more efficient, and why it can't go on forever.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Four strokes, four idealised processes

The Otto cycle, named after Nikolaus Otto, who built the first practical four-stroke engine in 1876, is the idealised thermodynamic model behind every petrol (gasoline) engine on the road. A piston repeats four strokes inside a cylinder: intake draws in an air-fuel mixture, compression squeezes it, combustion ignites and rapidly burns it, and expansion lets the hot gas push the piston back down and deliver work, before exhaust clears the cylinder and the cycle repeats. The idealised cycle used to analyse it strips this down to four clean thermodynamic processes on a pressure-volume diagram, treating the working fluid as a fixed quantity of ideal gas rather than tracking the actual intake and exhaust of fresh mixture.

Two of the four processes are adiabatic — fast enough that essentially no heat has time to escape through the cylinder walls — and two are treated as happening at constant volume, because the piston's position barely moves during the brief instant combustion or exhaust venting takes compared to the full stroke.

live demo · gas igniting and driving a piston through the four idealised strokes● LIVE

Walking the P-V diagram

On a pressure-volume diagram, the ideal Otto cycle traces a closed loop through four legs, and the area enclosed by that loop is exactly equal to the net work the engine delivers per cycle:

1 -> 2   adiabatic compression     piston rises, gas compressed, no heat exchanged
2 -> 3   constant-volume heating   spark ignites mixture; pressure spikes, volume ~fixed
3 -> 4   adiabatic expansion       hot high-pressure gas pushes piston down (power stroke)
4 -> 1   constant-volume cooling   exhaust valve opens, pressure drops back to intake level

net work per cycle  =  area enclosed by the 1-2-3-4-1 loop on the P-V diagram

In a real engine the closed loop is actually a five-stroke path once intake and exhaust strokes are drawn in (a low, roughly flat loop at the bottom of the diagram representing pumping the fresh charge in and the spent gas out), but that pumping loop contributes comparatively little work and is usually left out of the idealised analysis so the thermodynamics of compression, combustion and expansion stay in focus.

Why efficiency depends only on the compression ratio

Working through the first law for each of the four legs of an ideal-gas Otto cycle, most of the details cancel out and leave a strikingly simple result: the thermal efficiency depends on nothing but the compression ratio r (the ratio of cylinder volume before compression to cylinder volume after compression) and the working gas's heat-capacity ratio γ (about 1.4 for air):

r = V1 / V2          (compression ratio, typically 8-12 for petrol engines)
gamma ~ 1.4          (heat capacity ratio of air)

eta_Otto = 1 - r^(1 - gamma) = 1 - 1/r^(gamma - 1)

  r =  8   ->  eta ~ 0.56
  r = 10   ->  eta ~ 0.60
  r = 12   ->  eta ~ 0.63     (diminishing returns as r grows)

The intuition matches the maths: compressing the mixture further before ignition means the adiabatic expansion afterward has more room to run and pulls proportionally more work out of the hot gas before it has to be exhausted at a lower temperature. Real engine designers push compression ratio up for exactly this reason — it is one of the cheapest ways to improve fuel efficiency.

The wall that stops the ratio climbing forever: knock

Compression ratio cannot simply be raised without limit, because compressing the unburned mixture harder also heats it more, and past a certain point the still-unburned fuel-air mixture ahead of the advancing flame front becomes hot and pressurised enough to spontaneously ignite on its own, before the flame front from the spark plug ever reaches it. This uncontrolled secondary ignition — knock, or detonation — produces a sharp, damaging pressure spike and an audible metallic pinging, and left unchecked it can crack pistons and blow head gaskets. Higher-octane fuels resist this kind of self-ignition better, which is exactly why high-compression and turbocharged engines are designed to run on premium fuel: the octane rating is a direct measure of how much compression (or boost) the fuel can tolerate before knock sets in.

Real engines fall well short of the ideal number

The idealised Otto-cycle efficiency assumes instantaneous, perfectly reversible combustion, zero friction, and no heat lost through the cylinder walls or exhaust — none of which is true of a real engine. Combustion actually takes a finite number of crank-angle degrees to complete rather than happening at one fixed volume; a meaningful fraction of the fuel's chemical energy is conducted away as waste heat through the cylinder walls and out through the cooling system and exhaust rather than doing mechanical work; friction between the piston rings, bearings and other moving parts eats more still; and pumping the intake and exhaust gases in and out costs work too. Add all of that up and a typical production petrol engine achieves a real-world thermal efficiency in the roughly 25–35% range, well below the 55–65% the idealised r-and-γ formula alone would predict for a normal compression ratio — the gap between ideal-cycle theory and real-engine practice is itself one of the most active areas of internal-combustion engineering.

Frequently asked questions

Why does raising the compression ratio make an engine more efficient?

A higher compression ratio means the gas is squeezed into a smaller volume before ignition, which raises its temperature further during the adiabatic compression stroke and lets the subsequent expansion stroke pull more work out of the hot combustion gases before they are exhausted. The ideal-cycle formula η = 1 − r^(1−γ) captures exactly this: efficiency rises monotonically with the compression ratio r, though with diminishing returns at high r.

What is engine knock and why does it limit compression ratio?

Knock (or detonation) happens when unburned fuel-air mixture ahead of the advancing flame front gets compressed and heated so much by the piston and the flame's own pressure wave that it self-ignites spontaneously, instead of being consumed smoothly by the flame arriving from the spark plug. The resulting uncontrolled, near-instantaneous pressure spike causes damaging shock waves and mechanical stress, which is why higher-octane fuels — more resistant to self-ignition — are needed to safely run higher compression ratios.

Why is a real engine's efficiency much lower than the ideal Otto cycle predicts?

The ideal Otto cycle assumes instantaneous, perfectly reversible heat addition and rejection, no friction, no heat loss through the cylinder walls, and a fixed working fluid that behaves as an ideal gas throughout. Real engines lose energy to friction, pumping losses, heat conducted away through the cylinder walls and radiator, incomplete combustion, and the finite time combustion actually takes, so a typical petrol engine's real-world thermal efficiency is roughly a third to a half of what the ideal-cycle formula alone would suggest.

Try it live

Everything above runs in your browser — open Otto Cycle and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Otto Cycle simulation

What did you find?

Add reproduction steps (optional)