Chemistry & Chemical Engineering Gas Laws & Kinetic Theory Boyle's law (1662), the isothermal limit of the ideal gas law

Boyle's Law Calculator

Boyle's law says that for a fixed amount of gas held at constant temperature, pressure and volume are inversely proportional: squeeze a gas into half the space and its pressure doubles. This calculator solves P₁V₁ = P₂V₂ for whichever of the four terms you do not know, in your choice of pressure and volume units, and plots the isotherm so you can see the hyperbola the relationship traces. Pressures must be absolute, not gauge — that is the single most common source of a wrong answer.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Solve forThe three fields you keep are the ones the calculator uses.Final volume V₂
Initial pressure P₁Absolute pressure at the start; add 101.325 kPa to a gauge reading to get it.101.325 kPa
Initial volume V₁Volume the gas occupies at the initial pressure.12 L
Final pressure P₂Absolute pressure after the change, at the same temperature.202.65 kPa
Final volume V₂Volume the gas occupies at the final pressure.6 L

It returns

  • Answer — The term you asked for, in the unit shown beside it.
  • Initial pressure
  • Initial volume
  • Final pressure
  • Final volume
  • Compression ratio V₁ / V₂ — Equal to P₂ / P₁, because the product of pressure and volume is constant.

The formula

P1V1=P2V2
V2=P1V1P2

In plain text: P₁V₁ = P₂V₂ (n and T constant)

  • P₁Absolute pressure before the change (kPa)
  • V₁Volume before the change (L)
  • P₂Absolute pressure after the change (kPa)
  • V₂Volume after the change (L)

Valid only for a fixed amount of gas at constant temperature. Pressures must be absolute; volumes and pressures may be in any units provided each side of the equation uses the same ones.

Updated Category Gas Laws & Kinetic Theory Verified against published test cases Reading time 10 min

What Boyle's law states

For a fixed quantity of gas at constant temperature, pressure and volume are inversely proportional. Halve the volume and the pressure doubles; triple the volume and the pressure falls to a third. The product of the two is a constant, so P₁V₁ = P₂V₂ relates any two states of the same gas sample.

The molecular picture makes the inverse relationship obvious. Pressure is the rate at which molecules strike unit area of the container wall. Squeeze the same number of molecules into half the space and each one, moving at the same average speed because the temperature has not changed, reaches a wall twice as often. Twice the collision rate is twice the pressure.

Two conditions are load-bearing. The amount of gas is fixed — a leaking or refilling vessel obeys no such rule. And the temperature is constant, which in practice means the change is slow enough for heat to flow in or out and keep it so. A rapid compression heats the gas and the pressure rises by more than Boyle's law predicts, which is exactly why a bicycle pump gets warm.

Using the equation, and the pressure trap

Rearranging is trivial: V₂ = P₁V₁ ÷ P₂, P₂ = P₁V₁ ÷ V₂, and the same in reverse for the initial state. Because both sides carry the same units, any consistent pair works — kPa with litres, atmospheres with millilitres, psi with cubic feet. Only the two pressures must share a unit, and the two volumes must share a unit.

Pressures must be absolute. This is the error that ruins more Boyle's law calculations than all others combined. A tyre gauge, a manifold gauge and a dive gauge read gauge pressure — the excess over the surrounding atmosphere — and Boyle's law is written in absolute terms. Add 101.325 kPa (14.696 psi, 1 atm) to a gauge reading at sea level to convert. A tyre at 32 psi gauge is at 46.70 psi absolute. To see the size of the error, take a gas at 200 kPa gauge compressed until the gauge reads 500 kPa: in absolute terms that is 301.3 kPa to 601.3 kPa, so the volume falls to 301.3 ÷ 601.3 = 50.1% of its original. The gauge numbers give 200 ÷ 500 = 40.0% — a compression a fifth larger than the real one. Subtracting a constant from both pressures always pushes their ratio further from 1, so a gauge reading overstates the volume change in both directions.

Volume, by contrast, needs no such correction, because volume has a natural zero. That asymmetry is worth internalising: the same issue reappears with temperature in Charles's law, where kelvin is mandatory for exactly the same reason.

Plotted, the law is a hyperbola — P against V curves steeply near small volumes and flattens as the gas expands. Plot P against 1/V instead and you get a straight line through the origin whose slope is the constant. That linear form is how the relationship is usually verified in a teaching laboratory, since a straight line is far easier to judge by eye than a curve.

Worked example: a diver's lungful at 10 metres

A diver takes a full breath of 12.0 L at the surface, where the absolute pressure is 101.325 kPa, then descends to 10 m. Seawater adds roughly one atmosphere for every 10 m of depth, so the pressure there is about 202.65 kPa. What happens to the volume?

  1. Identify the terms. P₁ = 101.325 kPa, V₁ = 12.0 L, P₂ = 202.65 kPa, and V₂ is unknown.
  2. Compute the constant. P₁V₁ = 101.325 × 12.0 = 1215.9 kPa·L.
  3. Divide by the new pressure. V₂ = 1215.9 ÷ 202.65 = 6.00 L.
  4. Check. The pressure doubled, so the volume halved. The compression ratio V₁/V₂ = 2.00, and it equals P₂/P₁ = 2.00 as it must.

Now reverse the problem, which is the one that matters for safety. A diver at 10 m fills their lungs to 6.0 L from a regulator and ascends holding their breath. At the surface that gas expands back to 12.0 L — twice the lung's capacity. This is why the first rule taught in scuba training is to breathe continuously during ascent, and why the risk is greatest in the last ten metres, where the relative pressure change is largest: from 2 atm to 1 atm doubles the volume, whereas from 5 atm to 4 atm expands it by only 25%.

Note that the calculation used 101.325 kPa at the surface, not zero. A dive computer reading "0 bar" at the surface is a gauge reading, and using it directly would make the equation collapse.

When the answer can be trusted

Boyle's law is the isothermal special case of the ideal gas law, PV = nRT. It therefore inherits every limitation of the ideal model, and those become visible in two regimes.

High pressure. Above roughly 50 bar the finite size of molecules and the attractions between them matter, and the pressure-volume product stops being constant. The deviation is captured by a compressibility factor Z = PV/nRT, which is 1 for an ideal gas, dips below 1 at moderate pressures where attractions dominate, and rises above 1 at very high pressures where molecular volume dominates. A 200 bar scuba cylinder holds meaningfully less gas than the ideal law predicts.

Near condensation. Close to the boiling point at the working pressure, compressing the gas produces liquid rather than a pressure rise, and Boyle's law fails completely. This is the flat section of an isotherm on a phase diagram.

Between those extremes — a few atmospheres, well above the condensation temperature — the law is accurate to better than a percent for air, nitrogen, oxygen and the noble gases, which covers almost every practical use.

One more check worth doing: confirm the temperature really was constant. A compression done in seconds is closer to adiabatic than isothermal, and for a diatomic gas the adiabatic relation PV^1.4 = constant gives a substantially higher final pressure than PV = constant.

Volume of a 12.0 L gas sample at different absolute pressures

Starting from 12.0 L at 101.325 kPa, so the constant is 1215.9 kPa·L.
Absolute pressureIn atmVolume (L)Compression ratioEquivalent seawater depth
50.66 kPa0.5024.000.50×
101.33 kPa1.0012.001.00×surface
151.99 kPa1.508.001.50×5 m
202.65 kPa2.006.002.00×10 m
303.98 kPa3.004.003.00×20 m
405.30 kPa4.003.004.00×30 m
506.63 kPa5.002.405.00×40 m
1013.25 kPa10.001.2010.00×90 m

Depths use the common approximation of one additional atmosphere per 10 m of seawater. Every row has the same pressure-volume product, 1215.9 kPa·L.

Mistakes that give a wrong volume or pressure

  • Using gauge pressure. Add atmospheric pressure to any gauge reading first. This is the dominant error, and it always understates the pressure and so overstates the volume change.
  • Letting the temperature change. A fast compression heats the gas. If the temperature moves, use the combined gas law P₁V₁/T₁ = P₂V₂/T₂ with temperatures in kelvin.
  • Mixing pressure units between the two sides. The units cancel only if both pressures share one. Litres against millilitres does the same damage on the volume side.
  • Applying it when gas can enter or leave. A cylinder being filled or a leaking vessel changes n, and Boyle's law assumes n is fixed.
  • Using it at very high pressure. Beyond about 50 bar the ideal approximation degrades and you need a compressibility factor.
  • Forgetting that a gas near its condensation point does not obey it at all. Compressing a vapour at its saturation pressure produces liquid, not a pressure rise.

Where Boyle's law sits among the gas laws

Robert Boyle published the relationship in 1662, in an appendix to New Experiments Physico-Mechanical, from measurements made with a J-shaped tube in which mercury trapped a column of air. Edme Mariotte reached the same result independently a decade later and added the crucial qualification that the temperature must be held constant, which is why continental texts call it Mariotte's law.

It is one of three empirical laws that combine into the ideal gas law. Charles's law holds pressure constant and makes volume proportional to absolute temperature. Gay-Lussac's law holds volume constant and makes pressure proportional to absolute temperature. Avogadro's law makes volume proportional to amount. Multiply them together and you get PV = nRT, of which Boyle's law is the slice at fixed n and T.

In practice, if anything other than pressure and volume changes, step up to the combined gas law P₁V₁/T₁ = P₂V₂/T₂, remembering that temperatures must be absolute — kelvin, not celsius — for exactly the same reason pressures must be absolute here. If the amount of gas also changes, only the full ideal gas law will do.

The law's practical reach is wide: it explains breathing, since the diaphragm increases thoracic volume and so lowers lung pressure below atmospheric; it sizes syringes, vacuum systems and gas-handling manifolds; and it underlies the pressure-volume work integral for isothermal expansion, W = nRT ln(V₂/V₁), which is the starting point of the Carnot cycle. For gas-phase reaction quantities rather than pure P–V behaviour, convert to moles with the ideal gas law first and then use the mole-ratio calculator or the limiting reagent calculator.

Key terms

Absolute pressure
Pressure measured from a perfect vacuum. Equal to gauge pressure plus the surrounding atmospheric pressure, about 101.325 kPa at sea level.
Isothermal
At constant temperature. Requires heat to flow into or out of the gas as it expands or is compressed.
Adiabatic
With no heat exchange. A rapid compression is closer to adiabatic, and for a diatomic gas follows PV^1.4 = constant instead.
Compressibility factor
Z = PV/nRT. Exactly 1 for an ideal gas; the extent of its departure from 1 measures how far a real gas deviates.

Frequently asked questions

What is Boyle's law?

For a fixed amount of gas at constant temperature, pressure and volume are inversely proportional, so P₁V₁ = P₂V₂. Doubling the absolute pressure halves the volume. It is the isothermal special case of the ideal gas law PV = nRT, holding n and T fixed, and it is accurate to better than a percent for common gases at ordinary pressures.

Do I have to use absolute pressure?

Yes, always. Tyre gauges, dive gauges and manifold gauges all read the excess over atmospheric pressure, and Boyle's law is written in absolute terms. Add 101.325 kPa, 14.696 psi or 1 atm to a sea-level gauge reading. Using a gauge value directly is the most common error in these calculations and it can be off by a factor of several near atmospheric pressure.

What units should I use?

Any consistent pair. The units cancel between the two sides, so kPa with litres, atmospheres with millilitres and psi with cubic feet all work. The only requirement is that both pressures share a unit and both volumes share a unit. This calculator converts everything internally to kilopascals and litres and reports in those.

Why does a scuba diver's air expand on ascent?

Because the surrounding pressure falls. Seawater adds roughly one atmosphere per 10 m, so a lungful taken at 10 m under 2 atm absolute doubles in volume by the surface. That is why divers are taught never to hold their breath while ascending, and why the danger is greatest in the final ten metres where the relative pressure change is largest.

What if the temperature changes too?

Use the combined gas law, P₁V₁/T₁ = P₂V₂/T₂, with temperatures in kelvin. Boyle's law is only the constant-temperature slice of it. In practice a slow compression stays close to isothermal because heat has time to leave, while a fast one heats the gas and pushes the final pressure above what Boyle's law predicts.

Does Boyle's law work at any pressure?

No. Above roughly 50 bar, molecular volume and intermolecular attraction make real gases deviate, and the pressure-volume product stops being constant. Near the condensation point it fails outright, because compressing the gas produces liquid instead of raising the pressure. Between those regimes it is accurate to well under a percent for air, nitrogen, oxygen and the noble gases.

How do I plot the relationship as a straight line?

Plot pressure against the reciprocal of volume. P = k/V is a hyperbola in P–V coordinates but a straight line through the origin in P against 1/V, with the slope equal to the constant k = P₁V₁. That linearised form is how the law is normally verified experimentally, since a straight line is much easier to assess by eye than a curve.

Does compressing a gas isothermally require work?

Yes. Compressing an ideal gas isothermally from V₁ to V₂ requires work of magnitude nRT ln(V₁/V₂), and an equal quantity of heat must be removed to hold the temperature constant. If that heat is not removed, the gas warms, the pressure rises further than Boyle's law predicts, and the process is adiabatic rather than isothermal.

References

  • New Experiments Physico-Mechanical, Touching the Spring of the Air (2nd edition, 1662) — Robert Boyle
  • Quantities, Units and Symbols in Physical Chemistry (the IUPAC Green Book), 3rd edition — IUPAC / RSC Publishing
  • Atkins' Physical Chemistry, 12th edition — Oxford University Press