Skip to content
ScienceQuest
Thermodynamics Calculator School

Boyle’s Law Calculator

Boyle’s law, P₁V₁ = P₂V₂: squeeze a gas at constant temperature into half the space and its pressure doubles. Solve for any value and see the work done.

Calculator

Absolute pressure, measured from vacuum. Add atmospheric pressure to a gauge reading.

Absolute too, so add atmospheric pressure to a gauge reading.

4

Working, with your numbers

  1. P1 V1 = P2 V2
  2. V2 = P1 V1 / P2
  3. = 1 atm x 10 L / 2.5 atm
  4. = 4 L

Values are converted into the units the equation is worked in before the arithmetic.

PV, before and after
The product Boyle’s law keeps constant. A kilopascal times a litre is exactly a joule, and 1 atm times 1 L is 101.325 J.
1013.3 / 1013.3 J
Volume ratio, V₂/V₁
Always equal to P₁/P₂, the pressure ratio turned upside down.
0.4 x
Work done on the gas
For a slow change at constant temperature: W = P₁V₁ ln(V₁/V₂). The same energy leaves the gas as heat when it is squeezed and enters as heat when it expands. A sudden change does a different amount of work.
928.4 J

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

P1V1=P2V2P_1V_1 = P_2V_2

Boyle (1662), pressure and volume at constant temperature

Boyle’s law: pressure times volume stays the same

Boyle’s law says that for a fixed amount of gas at constant temperature, pressure and volume are inversely proportional, so their product does not change: P₁V₁ = P₂V₂. Halve the volume and the pressure doubles; give the gas three times the space and the pressure falls to a third. For the values loaded above, 10 L at 1 atm squeezed to 2.5 atm, V₂ = P₁V₁ ÷ P₂ = 1 × 10 ÷ 2.5 = 4 L.

Enter any three of the four values, in whatever units the question uses, and choose Solve for this on the fourth. Alongside the answer the calculator shows PV for both states, which the law says must be equal, the volume ratio, which is always the pressure ratio turned upside down, and the work done in the change if it happens slowly.

Why squeezing a gas raises its pressure

A gas presses on its container because its molecules keep striking the walls. Push the same gas into half the space at the same temperature and the molecules move just as fast on average as before, but twice as many sit in every cubic centimetre, so the walls are struck twice as often and the pressure doubles. That is also why the temperature has to stay fixed: warm the gas and every impact lands harder as well as more often.

The kinetic theory gas simulator shows this as a result rather than an assumption. Shrink its box with the Box side slider and the pressure it measures from the atoms’ impacts rises; the box is two-dimensional, so doubling its area at a fixed temperature halves that pressure.

Worked example: a sealed syringe pushed in

A syringe holds 60 mL of air at 1 atm with its tip sealed, and the plunger is pushed slowly in to 20 mL. What is the pressure inside?

  • P₂ = P₁V₁ ÷ V₂ = 1 atm × 60 mL ÷ 20 mL = 3 atm, which is 303,975 Pa.
  • Check: P₁V₁ = 1 atm × 60 mL = 60 atm·mL and P₂V₂ = 3 atm × 20 mL = 60 atm·mL. The product has not changed, and the readout gives it in joules, 6.0795 J.
  • A tyre-style gauge on the syringe would read 2 atm, because it measures only the excess over the 1 atm outside.

Squeezing the air took work: W = P₁V₁ ln(V₁/V₂) = 6.0795 J × ln 3 = 6.68 J, done on the air. Not all of it came from the hand: the atmosphere pressing on the back of the plunger did 1 atm × 40 mL = 4.05 J of it, so the hand did only about 2.6 J, since it feels only the excess over the air outside, the pressure a gauge reads. The air ended at the temperature it started at, so its internal energy did not change, and the same 6.68 J left it as heat through the barrel. That is what pushing slowly means here: slowly enough for the heat to get out as fast as the work goes in.

Push the plunger in quickly instead and the heat has no time to leave. The air warms, the pressure overshoots to about 4.7 atm if none of the heat escapes, and about 8.4 J of work is done on the air. As the syringe cools back to room temperature with the plunger held at 20 mL, the pressure settles at the 3 atm Boyle’s law predicts, and all 8.4 J leaves as heat. Both routes end in the same state, but only the slow one follows the law along the way, which is why the work readout assumes a slow change.

Absolute pressure, not gauge pressure

Both pressures have to be absolute, measured from a vacuum. Many gauges, a tyre gauge among them, read the difference from the air around them instead, so add atmospheric pressure, about 1 atm or 101.3 kPa at sea level, to a gauge reading before using it. Leaving it out gives an answer that is wrong without looking wrong: take that gauge’s 2 atm as the final pressure and the 60 mL of air would come out at 30 mL instead of 20 mL.

Under water the same rule decides the answer. Each 10 m of seawater adds about 1 atm, so a diver at 10 m is under about 2 atm absolute and at 20 m under about 3 atm. Air in the diver’s lungs at 20 m fills a third of the space it would at the surface. Coming up reverses it: from 20 m to 10 m the air grows by half, and from 10 m to the surface it doubles. The shallowest 10 m change the volume most, which is why a diver has to keep letting air out of their lungs all the way to the surface rather than hold it in. The pressure calculator shows where the extra atmosphere for every 10 m comes from.

The isotherm is a hyperbola

Because PV is fixed, one number sets the pressure at every volume. For the sample loaded above that number is 10 atm·L, and every row of this table multiplies out to it.

One isotherm: the 10 L of gas at 1 atm loaded above
VolumePressureP × V
20 L0.5 atm10 atm·L
10 L1 atm10 atm·L
5 L2 atm10 atm·L
4 L2.5 atm10 atm·L
2 L5 atm10 atm·L
1 L10 atm10 atm·L

Plotted with pressure up the side and volume along the bottom, the points lie on a hyperbola called an isotherm: steep at small volumes, flat at large ones, and in the ideal model never meeting either axis. Plot pressure against 1/V instead and the same points fall on a straight line through the origin, which makes a set of measurements easy to check against the law. The work readout is the area under the hyperbola between the two volumes, and the heat engine simulator draws isotherms like this one on a PV diagram, where the Carnot and Stirling cycles each run a gas along two of them. The same gas at a higher temperature sits on a hyperbola further out, because PV rises in proportion to absolute temperature, and that is where Charles’s law and Gay-Lussac’s law take over. The combined gas law calculator handles all three together.

How Boyle found it

Robert Boyle published the measurements behind the law in 1662, in the second edition of his New Experiments Physico-Mechanical, Touching the Spring of the Air, the spring of the air being his name for its pressure. He trapped air in the sealed short leg of a J-shaped glass tube and poured mercury into the long one. When the air had been squeezed into half its space, the mercury in the long leg stood 29 inches higher than in the short one. The trapped air was now holding up those 29 inches as well as the atmosphere, which on its own balances about 29 inches of mercury, so its pressure had doubled. Squeezed into half that space again, it pushed back about four times as hard as ordinary air.

Boyle set each reading beside what the pressure “should be according to the hypothesis, that supposes the pressures and expansions to be in reciprocal proportion”, and the tube was so tall that it had to be set up on a staircase. The hypothesis was not his own: he credited it to Richard Towneley, who with Henry Power had experimented with air trapped in a barometer tube on Pendle Hill in 1661, and Boyle’s tube was its test. He also saw the condition the law depends on: a candle flame held near the squeezed air had a noticeable effect, and he held back from more heat only for fear of breaking the glass. In France the result is known as the Boyle-Mariotte law, after Edme Mariotte, who reached it independently in the 1670s.

Common mistakes

  • Using gauge pressure. A tyre gauge or a scuba cylinder’s gauge reads the excess over the air around it. Add atmospheric pressure first, or a gauge on an open syringe would read zero, as if it held no gas at all.
  • Turning the ratio over. The new volume is V₁ × P₁ ÷ P₂, not V₁ × P₂ ÷ P₁. Check the direction before trusting the number: a higher final pressure must give a smaller volume.
  • Using it while the temperature changes. A quick compression heats the gas, a weather balloon cools as it climbs and a tyre warms on the road. All three need the combined gas law.
  • Letting gas in or out. A leak or a pump stroke changes the amount of gas, and the law is about one fixed sample. Follow all of the gas from start to finish, as the scuba cylinder example below does, and it applies again.
  • Mixing units between the two states. The two pressures need one unit between them and so do the two volumes, though neither has to be SI. Each field here converts on its own, so any mix is safe to type.

What this calculator does not cover

It treats the gas as ideal, and real gases drift from Boyle’s law as they are squeezed. Air stays within about 3 percent of it up to 200 atm at room temperature, but carbon dioxide is already about 5 percent off at 10 atm and turns liquid at about 56.5 atm at 20 °C, and butane liquefies at about 2 atm at the same temperature. The calculator warns above 10 atm for that reason.

It also holds the temperature and the amount of gas fixed. If the temperature changes too, use the combined gas law; if the amount of gas matters, as in a question that gives moles, use the ideal gas law calculator. And the work it reports is for a slow change at constant temperature, the only route along which the law holds at every moment. A sudden change does a different amount of work between the same two states, and a gas rushing into an empty vessel does none at all.

Boyle’s Law Calculator: the equation P₁V₁ = P₂V₂, solved for any of P₁, V₁, P₂ and V₂.
The equation the calculator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Worked examples

Each one runs through the calculator above, so the arithmetic here is the arithmetic it does.

What volume would 6 L of air in a diver’s lungs at 20 m take up at the surface?

  1. P1 V1 = P2 V2
  2. V2 = P1 V1 / P2
  3. = 3 atm x 6 L / 1 atm
  4. = 18 L

18 L, three times as much, because at 20 m of seawater the diver is under about 3 atm absolute: 1 atm of air plus about 1 atm for each 10 m of water. Lungs cannot hold three times their fill, so a diver coming up has to let the air out. The shallowest 10 m matter most, since from 10 m to the surface the pressure halves and the volume doubles.

How much air at 1 bar does a 12 L scuba cylinder filled to 200 bar hold?

  1. P1 V1 = P2 V2
  2. V1 = P2 V2 / P1
  3. = 197.4 atm x 12 L / 0.9869 atm
  4. = 2400 L

2,400 L by Boyle’s law, which applies although a compressor pumped the air in, because it follows the same air from the atmosphere into the cylinder. Real air at 200 bar is a little stiffer than an ideal gas, so at 15 °C the cylinder holds about 2 percent less, near 2,350 L, and one filled hot loses pressure as it cools.

What is the pressure in a sealed syringe of air pulled out from 20 mL to 50 mL?

  1. P1 V1 = P2 V2
  2. P2 = P1 V1 / V2
  3. = 1 atm x 0.02 L / 0.05 L
  4. = 0.4 atm = 40,530 Pa

0.4 atm, a partial vacuum, which a gauge reading from the surrounding air would show as 0.6 atm below atmospheric. Let go and the outside air, pressing harder than the air inside, pushes the plunger back towards 20 mL. Pulling further never reaches zero pressure: at 200 mL the air inside would still be at 0.1 atm.

Common questions

What does Boyle’s law state?

That for a fixed amount of gas at constant temperature, pressure and volume are inversely proportional, so their product stays the same: P₁V₁ = P₂V₂. Double the pressure and the volume halves; let the gas expand to three times its volume and the pressure falls to a third. Robert Boyle published the measurements behind it in 1662.

How do you find the new volume with Boyle’s law?

Multiply the starting pressure by the starting volume and divide by the new pressure: V₂ = P₁V₁ ÷ P₂. For 10 L at 1 atm squeezed to 2.5 atm, that is 1 × 10 ÷ 2.5 = 4 L. The two pressures must be in the same unit and both absolute, and the volume comes out in whatever unit V₁ was given in.

Does Boyle’s law use gauge pressure or absolute pressure?

Absolute pressure, measured from a vacuum. Many gauges, tyre gauges among them, show only the excess over the surrounding air, so add atmospheric pressure, about 1 atm or 101.3 kPa at sea level, before using a gauge reading. A diver 10 m down is under about 2 atm absolute, 1 atm of air plus about 1 atm of seawater, which is why air carried down from the surface has half its volume there.

What are some real-life examples of Boyle’s law?

A sealed syringe, a diver’s lungs and a scuba cylinder are the classic ones. Push in a syringe with its tip covered and the pressure rises as the volume falls; the air in a diver’s lungs at 20 m would need three times the space at the surface; and a 12 L cylinder filled to 200 bar holds about 2,400 L of air at 1 bar. Breathing works the same way: the chest enlarges the lungs, the pressure inside drops just below the air outside, and air flows in.

How much work does it take to compress a gas at constant temperature?

W = P₁V₁ ln(V₁/V₂), if the compression is slow enough for the gas to stay at one temperature. Squeezing 10 L at 1 atm down to 4 L takes about 928 J, and because the gas ends as warm as it started, all 928 J leaves it as heat. Compress it quickly instead and the gas heats up, the work is greater, and Boyle’s law holds again only once it has cooled.