Otto, Diesel and dual cycle calculator
Enter the compression ratio, the starting state and the heat added (or the cut-off ratio), and get every state point, the thermal efficiency, mean effective pressure, heat and work, and correctly curved p-v and T-s diagrams. Compare the three cycles, and turn MEP into engine power from bore, stroke and speed. Free, no sign-up, runs in your browser.
Cold air-standard cycles · closed-form and numerical check · Updated 18 Nov 2026
Defaults are the worked examples below. Cold air: γ 1.4, R 0.287 kJ/kg·K, so cv = R/(γ − 1) = 0.7175 and cp = 1.0045 kJ/kg·K. Use γ 1.3-1.35 to mimic hot combustion gases.
Engine geometry: swept volume and ideal power
Uses the compression ratio entered above for the clearance volume, and the cycle's MEP for power.
Dashed: Otto and Diesel at the same r and heat input; solid: the cycle you entered.
| State | p (bar) | v (m³/kg) | T (K) | s − s₁ (kJ/kg K) |
|---|---|---|---|---|
| 1 | 1.00 | 0.8610 | 300.0 | 0.0000 |
| 2 | 18.38 | 0.1076 | 689.2 | 0.0000 |
| 3 | 48.11 | 0.1076 | 1804.2 | 0.6905 |
| 4 | 2.62 | 0.8610 | 785.3 | 0.6905 |
What is the air-standard Otto cycle?
The air-standard Otto cycle is the ideal model of a petrol (spark-ignition) engine: air is compressed isentropically, heated at constant volume as if combustion were instant at top dead centre, expanded isentropically and cooled at constant volume. Its efficiency depends only on the compression ratio r: η = 1 − 1/rγ−1.
The Diesel cycle adds its heat at constant pressure instead, over a cut-off ratio ρ = v3/v2; the dual (limited-pressure) cycle adds part at constant volume (pressure ratio α = p3/p2) and the rest at constant pressure, which is closer to a modern high-speed diesel:
Air-standard efficiency against compression ratio (γ = 1.4):
| r | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
|---|---|---|---|---|---|---|---|---|---|
| Otto | 51.2% | 56.5% | 60.2% | 63.0% | 65.2% | 67.0% | 68.5% | 69.8% | 71.0% |
| Diesel, ρ = 2 | 42.8% | 49.0% | 53.4% | 56.7% | 59.3% | 61.4% | 63.2% | 64.7% | 66.0% |
| Diesel, ρ = 3 | 36.2% | 43.2% | 48.0% | 51.7% | 54.6% | 56.9% | 58.9% | 60.6% | 62.1% |
How does this calculator work?
It treats the working fluid as a fixed mass of air, an ideal gas with constant specific heats, so every process has an exact formula: p vγ = constant on the isentropic legs, p/T = constant at constant volume and v/T = constant at constant pressure. Heat in and out come from cvΔT and cpΔT, net work is their difference, and the diagrams trace each process point by point, so the compression and expansion legs are curves, not straight lines. Mean effective pressure divides the net work by the swept volume:
The "overlay" option draws the Otto and Diesel cycles at the same compression ratio and the same heat input. Skill-Lync checks all of it with a separate script that integrates p dv around each cycle and T ds along each heating line numerically and compares them with the closed-form efficiencies above.
Worked example 1: Otto cycle, r = 8, 800 kJ/kg
Air at 100 kPa and 300 K is compressed with r = 8 and receives 800 kJ/kg at constant volume:
Peak pressure is 48.1 bar and peak temperature 1,804 K. A Carnot engine between 300 K and 1,804 K would reach 83.4%: the Otto cycle loses out because it takes in heat over a range of temperatures, not all at the top. In a single-cylinder engine with a 100 mm bore and 100 mm stroke (0.785 litres), this cycle at 3,000 rpm, four-stroke, gives an ideal indicated power of 11.8 kW:
Worked example 2: Diesel cycle, r = 18, cut-off ratio 2
The same air at 100 kPa and 300 K, compressed with r = 18; fuel is injected at constant pressure until the volume has doubled (ρ = 2):
Peak pressure 57.2 bar, peak temperature 1,907 K. At r = 18 an Otto cycle would give 68.5%, so the constant-pressure heating costs 5.4 points. The diesel engine still wins in practice, because it can use the higher compression ratio. That is the next question.
Otto vs Diesel: which cycle is more efficient?
It depends on what you hold equal. At the same compression ratio and heat input, Otto is the most efficient and Diesel the least. At the same peak pressure, which is what limits a real engine's structure, the order reverses. Skill-Lync's comparison, all three cycles with the dual example's 1,148 kJ/kg heat input from 100 kPa and 300 K:
| Held equal | Otto | Dual (α 1.5, ρ 1.6) | Diesel |
|---|---|---|---|
| Compression ratio 16 | 67.0% | 64.5% | 60.2% |
| Peak pressure 72.8 bar | 59.1% (r 9.35) | 64.5% (r 16) | 65.1% (r 21.37) |
A petrol engine cannot simply raise r to diesel levels: the end-gas would auto-ignite and knock. A diesel compresses only air, so it can run far higher compression ratios, like the r = 18 of example 2, and come out ahead. Tick "overlay" in the calculator to see the three cycles on the same p-v and T-s axes; on the T-s diagram the cycle whose heat-rejection line sits lowest rejects the least heat and wins.
How do you plot an Otto cycle p-v diagram against crank angle?
Skill-Lync's MATLAB for Mechanical Engineers course has learners build an air-standard cycle simulator in week 3; as of 18 Nov 2026, about 900 public student reports on Skill-Lync name the Otto cycle in their title. The course engine has a 0.1 m bore, 0.1 m stroke, 0.15 m connecting rod and r = 12. The cylinder volume at crank angle θ follows from the slider-crank geometry, with R the rod length over the crank radius (0.15 ÷ 0.05 = 3):
Swept volume is 7.85 × 10⁻⁴ m³ and clearance volume 7.14 × 10⁻⁵ m³. At 90° of crank the piston has swept 58.6% of the stroke, not 50%, because the connecting rod is angled; a model that moves the volume linearly with crank angle gets the shape of the diagram wrong. Starting at 1 atm and 500 K, isentropic compression ends at 32.4 atm and 1,351 K. The engine-geometry panel in the calculator gives the swept volume, the clearance volume, the 90° figure and the ideal indicated power for your own engine.
How close does a real engine get to the Otto cycle efficiency?
Not very. Toyota's 2.0-litre Dynamic Force petrol engine has a 13:1 compression ratio (14:1 in the hybrid version), and Toyota quoted 40% thermal efficiency (41% for the hybrid) as of February 2018, which Toyota called world-leading. The air-standard Otto cycle at r = 13 predicts 64.2% (r = 14: 65.2%).
The gap comes from what the model leaves out: the specific heats of hot combustion gas rise with temperature and the gas dissociates, so the peak temperature and pressure are lower (the fuel-air cycle); heat leaks to the cylinder walls; combustion takes time, so heat is not added at one volume; and the engine spends work on pumping gas in and out and on friction. The air-standard number is an upper bound and a way to see trends, such as why a higher compression ratio helps, not a prediction of a real engine's output.
What this calculator does not cover
- Variable specific heats and dissociation. With constant cv, a large heat input gives peak temperatures well above what a real engine reaches. The fuel-air cycle chapter of Skill-Lync's Thermal Engineering book shows how much that lowers the efficiency.
- Combustion timing and heat loss. No burn duration, ignition timing or wall heat transfer; for those you need an engine simulation (a Wiebe heat-release model, or GT-POWER).
- Gas exchange. No intake and exhaust strokes, so no pumping loss and no residual gas, and the indicated power is the ideal figure with no friction.
- Fuel and mixture. You enter heat per kg of air directly; it is not worked out from a fuel and air-fuel ratio.
Skill-Lync's MATLAB and Python courses have you code this cycle, piston kinematics included, and the IC engine courses take it on to real combustion and calibration models.
- MATLAB for Mechanical Engineers (week 3: air-standard cycle simulator)
- Python for Mechanical Engineers (week 2: the p-v plot of an air-standard cycle)
- Internal Combustion Engine Analyst course using Python and Cantera
- IC Engine Calibration using GT-POWER and GT-SUITE
Frequently asked questions
What is the formula for the efficiency of an Otto cycle?
η = 1 − 1/r^(γ−1), where r is the compression ratio and γ = cp/cv (1.4 for cold air). It depends only on r: at r = 8 the air-standard Otto cycle is 56.5% efficient, at r = 10 60.2% and at r = 12 63.0%, whatever the heat input.
What is the efficiency of a Diesel cycle?
η = 1 − (1/r^(γ−1)) × (ρ^γ − 1)/(γ(ρ − 1)), where ρ is the cut-off ratio v3/v2. The bracket is above 1, so at the same compression ratio the Diesel cycle is less efficient than the Otto cycle: at r = 18 and ρ = 2 it gives 63.2% against Otto's 68.5%.
Why is the Otto cycle more efficient than the Diesel cycle?
Only at the same compression ratio and heat input, because all the Otto cycle's heat goes in at the smallest volume. Real diesel engines run at much higher compression ratios, and at the same peak pressure the order flips: Diesel 65.1%, dual 64.5%, Otto 59.1% in this page's comparison.
What is mean effective pressure?
Mean effective pressure (MEP) is the constant pressure that, acting on the piston over one full stroke, would do the same net work as the whole cycle: MEP = net work ÷ swept volume. It lets you compare engines of different sizes; multiply it by displacement and cycles per second to get power.
How do you draw the p-v diagram of an Otto cycle?
Plot four processes: isentropic compression 1-2 (p v^γ constant, a curve), constant-volume heat addition 2-3 (a vertical line), isentropic expansion 3-4 (a curve) and constant-volume heat rejection 4-1 (a vertical line). Joining the state points with straight lines is wrong: the compression and expansion legs are curves.
What is the cut-off ratio in a Diesel cycle?
The cut-off ratio ρ = v3/v2 is the volume at the end of fuel injection (constant-pressure heat addition) divided by the clearance volume. A larger ρ means more heat added, more work per cycle and a lower efficiency. It must stay below the compression ratio, or injection would continue past bottom dead centre.
Is this calculator accurate?
For the cold air-standard model, yes: Skill-Lync re-computed every worked example and 200 random cycles in a separate Python script that integrates p dv and T ds numerically, and this page's code agrees to within 1e-7 or the build fails. The model itself is idealised: a real engine reaches far less, as the Toyota example below shows.
Related on Skill-Lync
- Thermal Engineering book: air-standard cycles, Carnot and Otto and Diesel and dual cycles (interactive)
- Student project: air standard cycle (Otto cycle)
- Student project: simulation of the Otto cycle
- How do IC engines work?
- Engine performance parameters of an IC engine
- Rankine cycle calculator and adiabatic flame temperature calculator
- All free engineering tools
Sources
- Y. A. Çengel and M. A. Boles, Thermodynamics: An Engineering Approach, McGraw-Hill, chapter 9 (gas power cycles: air-standard assumptions, Otto, Diesel and dual cycles, mean effective pressure).
- J. B. Heywood, Internal Combustion Engine Fundamentals, McGraw-Hill, chapter 5 (ideal cycles, fuel-air cycles and real-engine losses).
- Toyota, Dynamic Force Engine (TNGA powertrain, 26 Feb 2018): 1,986 cc, compression ratio 13 (hybrid 14), thermal efficiency 40% (hybrid 41%) as of February 2018.
- Air specific heats at 300 K: Engineering ToolBox (cv 0.718, cp 1.006 kJ/kg·K, ratio 1.40).
- Course engine geometry and slider-crank formula: Skill-Lync, MATLAB for Mechanical Engineers, week 3 (air-standard cycle simulator).
- Worked examples and all their numbers: Skill-Lync, checked by scripts/verify/air-cycles.py, which integrates the cycles numerically and finds the slider-crank volume from the geometry, and is cross-checked against this page's calculator code at build time.