Boyle's Law Calculator – P1V1 = P2V2 Solver for Pressure & Volume
Use this free Boyle's Law Calculator to solve any one value in P1V1 = P2V2 — the law linking the pressure and volume of a fixed mass of gas at constant temperature. Choose what to solve for, then enter the other three values in any consistent units.
Boyle's law is the oldest of the gas laws, published by Robert Boyle in 1662 after a series of experiments with a J-shaped tube of trapped air and mercury. What he found was a beautifully simple seesaw: for a fixed mass of gas held at a fixed temperature, pressure and volume are inversely proportional. Halve the volume and the pressure doubles; let the gas expand to three times its volume and the pressure falls to a third. The product P × V never changes, and that single constant is all the calculator above needs — give it any three of the four values and the fourth is forced.
The law is quietly at work every time you breathe, pump a tyre or watch a weather balloon climb. Your lungs are a Boyle's-law machine: the diaphragm enlarges the chest cavity, the pressure inside falls below atmospheric, and air flows in to restore the balance. A diver's exhaled bubbles swell as they rise into lower pressure, and a sealed packet of crisps puffs up in an aircraft cabin for the same reason in reverse. Whenever a gas is squeezed or allowed to expand without being heated or cooled, this page's equation is running the show.
Two conditions hide inside the word "law", and both matter. The mass of gas must be fixed — nothing leaks in or out — and the temperature must stay constant while the volume changes, which is why careful experiments squeeze the gas slowly, letting any warmth of compression escape. Break either condition and you need a bigger law: if temperature changes too, the combined gas law takes over; if gas is added or removed, the full ideal gas law PV = nRT is the tool. Within its conditions, though, Boyle's law is exact for everyday pressures, and it is the fastest sanity check in all of gas physics.
Formula
Boyle's law P1V1 = P2V2 — for a fixed mass of gas at constant temperature, pressure is inversely proportional to volume. Rearranged: P2 = P1V1/V2 · V2 = P1V1/P2 · P1 = P2V2/V1 · V1 = P2V2/P1. Pressures must use one unit throughout (e.g. kPa) and volumes one unit throughout (e.g. litres).
The pressures in Boyle's law are absolute pressures — measured from a perfect vacuum, not from atmospheric pressure. A tyre gauge reads gauge pressure (above atmospheric), so before using a gauge reading here, add the atmospheric pressure, about 101 kPa. Volumes, by contrast, need no such correction: litres, millilitres or cubic metres all work, as long as V1 and V2 match. Because the law is a ratio, the answer always comes out in whatever unit you fed in for the partner quantity.
| Symbol | Meaning | Units |
|---|---|---|
| P1 | initial (absolute) pressure of the gas | kPa, Pa, atm, bar — one unit throughout |
| V1 | initial volume of the gas | L, mL, m³ — one unit throughout |
| P2 | final pressure after the change | same unit as P1 |
| V2 | final volume after the change | same unit as V1 |
Why squeezing a gas raises its pressure: the kinetic picture
Pressure is not a substance; it is a bombardment. A gas is a crowd of particles in ceaseless random motion, and the pressure on a wall is the drumming of their collisions against it — the force of countless tiny impacts averaged over each square metre. Temperature fixes how fast the particles move; the mass of gas fixes how many of them there are. Boyle's law is what happens when you change the size of the room the crowd is dancing in while holding both of those fixed.
Squeeze the gas into half the volume and every particle now has half the distance to travel between wall hits, so each particle strikes the walls twice as often — and there is the same number of particles doing it. The collision rate per unit area doubles, so the pressure doubles. Expand to four times the volume and the collisions thin out to a quarter of their rate, so the pressure quarters. That is the whole mechanism behind the inverse proportion: P × V stays constant because the total "crowding" is conserved — the same particles, the same speeds, merely redistributed in space.
This picture also explains the law's limits. It assumes the particles are points with no size of their own and no attractions between them. At everyday pressures that is an excellent approximation — the particles of air occupy only about a thousandth of the container's volume. But compress a gas hard enough, or cool it towards liquefaction, and the particles' own volume and stickiness stop being negligible: the gas becomes harder to squeeze than Boyle predicts, and eventually it gives up and condenses into a liquid, where the law stops applying altogether.
How to use
- Pick the unknown from the "Solve for" drop-down — final pressure, final volume, or one of the initial values.
- Enter the other three values — the box for the unknown can be left blank (it is ignored).
- Use the same pressure unit for P1 and P2, and the same volume unit for V1 and V2.
- Make sure pressures are absolute: if a value came from a gauge, add atmospheric pressure (about 101 kPa) first.
- Click "Solve" to get the missing value in the same unit as its partner.
Worked examples
Example 1 — the classic compression. A gas at P1 = 100 kPa occupies V1 = 2 L. It is compressed to V2 = 1 L at constant temperature.
P2 = P1V1 / V2 = 100 × 2 / 1 = 200 kPa — halving the volume doubles the pressure.
Example 2 — a syringe of gas expanding. Gas in a sealed syringe is at 300 kPa in a volume of 3 L. The plunger is pulled out slowly until the volume is 6 L.
P2 = 300 × 3 / 6 = 150 kPa — doubling the volume halves the pressure.
Example 3 — solving for the final volume. A sample of air at atmospheric pressure, P1 = 101 kPa, fills V1 = 5 L. How small must it be squeezed for the pressure to reach P2 = 202 kPa (two atmospheres)?
V2 = P1V1 / P2 = 101 × 5 / 202 = 2.5 L — exactly half, as the doubled pressure demands.
Example 4 — solving backwards for P1. A compressed cylinder holds gas at P2 = 450 kPa in V2 = 0.8 L. Before compression the same gas filled V1 = 3.6 L. What was its pressure then?
P1 = P2V2 / V1 = 450 × 0.8 / 3.6 = 100 kPa — it started at ordinary atmospheric pressure.
Example 5 — solving backwards for V1. After expansion, a gas sits at P2 = 250 kPa occupying V2 = 2 L. It began at P1 = 125 kPa. What volume did it start from?
V1 = P2V2 / P1 = 250 × 2 / 125 = 4 L — the pressure halved because the volume doubled.
Example 6 — a balloon climbing into thin air. A weather balloon leaves the ground with 4 L of helium at 100 kPa. High in the atmosphere the pressure around it has fallen to 50 kPa (temperature roughly unchanged).
V2 = 100 × 4 / 50 = 8 L — the balloon has doubled in size, which is why weather balloons are launched looking half-empty and why they eventually burst.
Boyle's law in real life
Breathing. Your diaphragm flattens and your ribs swing out, enlarging the chest cavity. The air inside your lungs expands into the bigger volume, its pressure drops just below atmospheric, and outside air pushes in until the pressures match — an in-breath. Reverse the squeeze and you exhale. Ventilators in hospitals do exactly the same job mechanically for patients who cannot.
A diver's bubbles. At 30 m down, the water pressure is about 400 kPa (four atmospheres). A 1 L bubble of exhaled air released there grows as it rises: at the surface, under 100 kPa, it occupies 400 × 1 / 100 = 4 L. The same physics in a diver's lungs is why divers must never hold their breath while ascending — expanding air has nowhere to go.
Syringes and pumps. Drawing back a syringe plunger enlarges the volume, drops the pressure, and liquid is pushed in by the atmosphere. A bicycle pump works the other way: each stroke traps air and crushes it into a smaller volume until its pressure beats the tyre's and the valve opens.
Weather balloons. Example 6 is flown daily: meteorological balloons expand steadily as the outside pressure falls, sometimes to a hundred times their launch volume, until the envelope can stretch no further and bursts — by design, dropping the instrument package by parachute.
Ears on a plane. The small pocket of air behind your eardrum was sealed at ground pressure. As the cabin pressure falls during climb, that trapped air expands (Boyle again) and pushes the eardrum out — the "pop" when it equalises through the Eustachian tube is a tiny Boyle's-law event in your own head.
Deep-sea creatures. Fish hauled up quickly from depth suffer the diver's problem in reverse: gases in their swim bladders expand as the pressure falls, which is why deep-caught fish sometimes arrive at the surface with the bladder forced out — and why catch-and-release at depth uses venting tools.
From Boyle's law to the ideal gas law
Boyle's constant is not a property of the container — it is set by how much gas you have and how warm it is. Double the mass of trapped gas and P × V doubles; warm it and P × V grows in proportion to the kelvin temperature. Gathering all three influences gives the ideal gas law, PV = nRT, where n counts the gas in moles and R = 8.314 J/mol·K is a universal constant. Boyle's law is simply that equation with n and T held still: PV = constant. For the gas of Example 1, the constant is 100 kPa × 2 L = 200 kPa·L, and every state that gas passes through at that temperature — (1 L, 200 kPa), (2 L, 100 kPa), (4 L, 50 kPa), (0.5 L, 400 kPa) — is just a different point on the one curve drawn in the first diagram.
The sibling laws fall out the same way. Hold pressure constant and PV = nRT becomes Charles's law, V proportional to T; hold volume constant and it becomes the pressure law, P proportional to T. The combined gas law calculator on this site handles the general case where P, V and T all change at once — Boyle's law is its special case with T1 = T2, the temperatures cancelling from both sides.
Quick reference: squeeze factors at a glance
| Final volume V2 | Final pressure P2 | Rule |
|---|---|---|
| 5 L | 200 kPa | half the volume → double the pressure |
| 2.5 L | 400 kPa | quarter of the volume → four times the pressure |
| 2 L | 500 kPa | a fifth of the volume → five times the pressure |
| 1 L | 1,000 kPa | a tenth of the volume → ten times the pressure |
| 0.5 L | 2,000 kPa | a twentieth of the volume → twenty times the pressure |
All rows start from 10 L at 100 kPa, so P × V = 1,000 kPa·L throughout. Read the table backwards for expansions: whatever factor the volume grows by, the pressure shrinks by the same factor. There is no adding or subtracting in Boyle's law — only multiplying and dividing.
Common mistakes
- Using gauge pressure. A tyre at "200 kPa" on a gauge is at about 301 kPa absolute. Boyle's law counts from vacuum, so add atmospheric pressure (~101 kPa) to any gauge reading first — forgetting this is the single most common source of wrong answers with real equipment.
- Mixing units between the two states. P1 in kPa with P2 in atm, or V1 in litres with V2 in millilitres, silently corrupts the ratio. The law tolerates any units — but only one per quantity, used on both sides.
- Thinking additively. "The volume fell by 1 L so the pressure rises by the same proportion of litres" — no. The relationship is a reciprocal: pressure scales by the factor V1/V2, whatever the sizes involved. Halving from 10 L to 5 L and halving from 2 L to 1 L both exactly double the pressure.
- Letting the temperature drift. Compress a gas quickly and it warms up (a bicycle pump barrel gets hot), so the pressure overshoots Boyle's prediction until the gas cools back down. Slow changes, or a pause to let the temperature settle, keep the law honest.
- Applying it to a leaking or open system. If gas escapes as you squeeze — a loose seal, an open valve — the mass is no longer fixed and P × V is not conserved. Check the system is sealed before trusting the calculation.
FAQ
Why does squeezing a gas raise its pressure?
The same number of particles is packed into a smaller space, so they strike the walls more often, and each unit of area receives more collisions per second — that is pressure.
Does Boyle's law need kelvin?
No. Temperature does not appear in the formula at all — it just has to stay constant during the change. (Kelvin becomes essential only when temperature itself changes, as in the combined gas law.)
When does Boyle's law break down?
At very high pressures or low temperatures real gases deviate from ideal behaviour, because the particles' own volume and their attractions can no longer be ignored.
Can I use any units I like?
Almost — the law is a ratio, so units cancel as long as you are consistent: both pressures in the same unit, both volumes in the same unit. Kilopascals with litres, atmospheres with millilitres, psi with cubic inches all work. The one non-negotiable is that pressures must be absolute, not gauge.
What if the temperature changes while I compress the gas?
Then Boyle's law alone is not enough, because warming a gas raises its pressure on top of the squeezing effect. Use the combined gas law, P1V1/T1 = P2V2/T2, with temperatures in kelvin — it reduces to Boyle's law when T1 = T2.
Does Boyle's law work for liquids?
Effectively no. Liquids are nearly incompressible — their particles are already touching — so halving a liquid's volume is practically impossible and the pressure response is nothing like the tidy reciprocal law gases obey. The law is a property of gases, whose particles have space to be crowded into.
What does "fixed mass of gas" mean in practice?
That no particles enter or leave during the change: a sealed syringe, a closed cylinder, a bubble. If the container leaks, or a valve is open, P × V drifts as the amount of gas changes and the calculation no longer holds.
How much pressure is in a scuba tank, in Boyle terms?
A typical tank holds about 12 L of air compressed to roughly 200 times atmospheric pressure — meaning the air inside would occupy some 2,400 L at the surface. Boyle's law run backwards is how divers estimate their air supply: pressure gauge reading times tank volume gives the free-air volume available.
Why does a sealed crisp packet swell on a mountain or a plane?
The packet was sealed at ground-level pressure with a fixed mass of air inside. As the outside pressure falls, the trapped air expands to match it (at constant temperature, roughly), inflating the packet — a pocket-sized demonstration of the law, and the reason packets are sometimes filled with nitrogen at slightly raised pressure instead.
Who discovered Boyle's law, and how?
Robert Boyle published it in 1662, working with his assistant Robert Hooke and a long J-shaped glass tube: mercury poured into the long arm compressed air trapped in the short arm, and Boyle tabulated pressure against volume, finding their product constant. It is often called Mariotte's law in France, after Edme Mariotte, who published the same result independently in 1676.