StatGardenREF. DESK
Calculators/Physics/Boyle's Law
Physics

Boyle's Law calculator

Pressure or volume of a fixed gas amount after an isothermal change, from the other values.

Published 9 August 2026 · Updated 22 September 2026

What this calculator does

Boyle's law says that at constant temperature, squeezing a gas into half the volume doubles its pressure. The product of pressure and volume stays constant, which is why it is often written simply as p₁V₁ = p₂V₂.

It was one of the first quantitative gas laws established, and it is the special case of the ideal gas law with temperature and the amount of gas both held fixed.

The formula

Formulap1·V1 = p2·V2 (constant temperature)

Multiply the initial pressure by the initial volume, then divide by the final volume to get the final pressure. The relationship works equally in either direction.

TermMeaning
IsothermalAt constant temperature, which is the condition Boyle's law requires.
Inverse proportionPressure and volume move in opposite directions so that their product stays fixed.
Ideal gasA gas whose molecules take up no space and do not attract each other, which real gases approximate at ordinary conditions.

The inputs explained

FieldWhat to enter
Initial pressure (p1) (kPa)The initial pressure, in kilopascals.
Initial volume (V1) (L)The initial volume, in litres.
Solve forWhether to solve for the final pressure or the final volume.
Known final value (V2 if solving p2; p2 if solving V2) (L or kPa)The known final value: the volume if solving for pressure, or the pressure if solving for volume.

When to use it

Understanding a syringe or a pump

Compressing a sealed volume raises its pressure in exact inverse proportion, which is how a bicycle pump works.

Diving physiology

A lungful of air at depth expands on ascent, which is why divers are trained never to hold their breath while surfacing.

Checking a gas calculation

When only pressure and volume change, this is the quickest route to the answer without the full gas law.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How does pressure rise as the gas is compressed?

The same quantity of gas compressed into decreasing volumes.

Starting at 101.325 kPa in 2 litres
Final volumeFinal pressure (p2)p1·V1 = p2·V2
2 L101.325 kPa202.65 kPa·L
1 L202.650 kPa202.65 kPa·L
0.5 L405.300 kPa202.65 kPa·L
0.25 L810.600 kPa202.65 kPa·L
The product stays fixed at 202.65 kPa·L in every row, which is the whole content of the law. Halving the volume from 2 L to 1 L exactly doubles the pressure, to 202.650 kPa.

Questions

Why must temperature be constant?

Because compressing a gas normally heats it, which raises pressure further. Boyle's law isolates the volume effect alone, so it applies to slow compression where heat has time to escape.

Why do divers not hold their breath on ascent?

Because air in the lungs expands as pressure falls. A lungful taken at 10 metres would double in volume by the surface, which can rupture lung tissue if the breath is held.

How does this relate to the ideal gas law?

It is the same relationship with temperature and amount held constant. PV = nRT reduces to PV = constant when n and T do not change.

Does it work for real gases?

Closely, at ordinary pressures and temperatures. Deviations appear at high pressure and low temperature, where molecular volume and attraction stop being negligible.

For the full relationship including temperature, see the ideal gas law calculator. For molecular speeds in that gas, see the RMS speed calculator.