Skip to main content
Science & Math

Boyle's Law Calculator

Boyle's law calculator: solve P1 V1 = P2 V2 for pressure or volume in atm, kPa, bar, mmHg, psi, L, mL or m3, with gauge pressure and examples.

Created by Muhammad Asif Zaheer
Reviewed by CalculatorPlanet Editorial Team

Published

Last updated

Answer (in the unit you chose)
4.00000
Initial pressure P1
1.0000
Initial volume V1
10.00000
Final pressure P2
2.5000
Final volume V2
4.00000
P1 absolute
101.325 kPa
P2 absolute
253.313 kPa
Constant P x V (absolute)
10.0000
Pressure ratio P2 / P1
2.5000
Volume ratio V2 / V1
0.4000
Change in volume
-60.00%

How the Boyle's Law Calculator Formula Works

Boyle's law says that for a fixed amount of gas at a constant temperature, pressure times volume stays the same. If the gas is squeezed into a smaller space, the pressure goes up by the same factor. If it is allowed to expand, the pressure goes down.

Write the law as P1 times V1 equals P2 times V2, where 1 is the starting state and 2 is the final state. Three of the four numbers give the fourth. To find the final volume, multiply the starting pressure by the starting volume and divide by the final pressure. The other three versions follow the same pattern.

The pressures must be absolute, not gauge, and both pressures must use the same unit, as must both volumes. The calculator converts everything to pascals and litres, solves, then converts back to your units. It can add one atmosphere to a gauge reading for you, and it also reports the constant k, the pressure ratio, the volume ratio and the percentage change in volume.

P1 × V1 = P2 × V2; V2 = P1 × V1 / P2; V1 = P2 × V2 / P1; P2 = P1 × V1 / V2; P1 = P2 × V2 / V1
What goes in, what comes out
  • P1atm, kPa, bar, mmHg, psi or PaStarting absolute pressure of the gas.
  • V1L, mL or m3Starting volume of the gas.
  • P2same as P1Final absolute pressure.
  • V2same as V1Final volume.
  • kpressure x volumeThe constant product P x V while temperature and amount stay fixed.
Answer (in the unit you chose)
4
Values shown are from the worked example below
P1
atm, kPa, bar, mmHg, psi or Pa
Starting absolute pressure of the gas.
V1
L, mL or m3
Starting volume of the gas.
P2
same as P1
Final absolute pressure.
V2
same as V1
Final volume.
k
pressure x volume
The constant product P x V while temperature and amount stay fixed.

Using the Boyle's Law Calculator

  1. Enter solve for

    Choose from Final volume (V2), Final pressure (P2), Initial volume (V1), Initial pressure (P1).

  2. Enter pressure type

    Choose from Absolute pressure, Gauge pressure (adds 1 atm).

  3. Enter pressure unit

    Choose from atm, kPa, bar, mmHg, psi, Pa.

  4. Enter volume unit

    Choose from litres (L), millilitres (mL), cubic metres (m3).

  5. Enter initial pressure p1 (ignored when solving for p1)

    Type the figure you already have, then press Calculate.

  6. Enter initial volume v1 (ignored when solving for v1)

    Type the figure you already have, then press Calculate.

  7. Enter final pressure p2 (ignored when solving for p2)

    Type the figure you already have, then press Calculate.

  8. Enter final volume v2 (ignored when solving for v2)

    Type the figure you already have, then press Calculate.

  9. Read the result

    Press Calculate to update the result. Until you do, the last result is dimmed and marked as out of date, so you always know which numbers belong to the values in the boxes.

A Real Worked Example

A gas is 10 L at 1 atm and is compressed to 2.5 atm. Solve for V2. V2 = P1 x V1 / P2 = 1 × 10 / 2.5 = 4 L.

The pressure rose by a factor of 2.5, so the volume fell to 0.4 of its original size, a drop of 60 percent. The constant P x V is 10 atm L both before and after, as it must be.

1
solveFor
v2
2
pressureType
absolute
3
pressureUnit
atm
4
volumeUnit
L
5
pressure1
1
6
volume1
10
7
pressure2
2.5
8
volume2
4
This calculator returns4answer1pressure12.5pressure210volume14volume2101.325pressure1AbsKPa253.313pressure2AbsKPa10constantK2.5pressureRatio0.4volumeRatio-60volumeChangePercent

Final pressure of 500 mL squeezed to 125 mL

A sample is 500 mL at 760 mmHg and is squeezed into 125 mL. Solve for P2 in mmHg with the volume unit in millilitres. P2 = 760 × 500 / 125 = 3,040 mmHg.

That is 4 atm, or 405.3 kPa. The volume is a quarter of the start, so the pressure is four times higher.

solveFor: p2pressureType: absolutepressureUnit: mmHgvolumeUnit: mLpressure1: 760volume1: 500pressure2: 2.5volume2: 1253040answer760pressure13040pressure2500volume1125volume2101.325pressure1AbsKPa405.3pressure2AbsKPa380000constantK4pressureRatio0.25volumeRatio-75volumeChangePercent

Initial volume before compression to 250 kPa

A gas ends at 250 kPa in 2 L, and it started at 100 kPa. Solve for V1. V1 = P2 x V2 / P1 = 250 × 2 / 100 = 5 L.

The starting gas filled 5 L, so compression to 2 L raised the pressure by a factor of 2.5. This is the case to use when only the final state was measured.

solveFor: v1pressureType: absolutepressureUnit: kPavolumeUnit: Lpressure1: 100volume1: 10pressure2: 250volume2: 25answer100pressure1250pressure25volume12volume2100pressure1AbsKPa250pressure2AbsKPa500constantK2.5pressureRatio0.4volumeRatio-60volumeChangePercent

Initial pressure from a volume that shrank to a third

A 6 L sample is reduced to 2 L and reads 3 atm at the end. Solve for P1. P1 = P2 x V2 / V1 = 3 × 2 / 6 = 1 atm.

The volume fell to one third, so the pressure tripled. The starting pressure was therefore one third of 3 atm, which is ordinary atmospheric pressure.

solveFor: p1pressureType: absolutepressureUnit: atmvolumeUnit: Lpressure1: 1volume1: 6pressure2: 3volume2: 21answer1pressure13pressure26volume12volume2101.325pressure1AbsKPa303.975pressure2AbsKPa6constantK3pressureRatio0.3333volumeRatio-66.67volumeChangePercent

Gauge pressure: 2 bar to 4 bar gauge on 10 L

A 10 L gas is at 2 bar gauge and is compressed to 4 bar gauge. Set the pressure type to gauge and the unit to bar. The calculator adds 1.01325 bar to each reading, giving 3.01325 and 5.01325 bar absolute.

V2 = 3.01325 × 10 / 5.01325 = 6.0106 L. Using gauge values directly would give 5 L, which is wrong by about a litre.

solveFor: v2pressureType: gaugepressureUnit: barvolumeUnit: Lpressure1: 2volume1: 10pressure2: 4volume2: 46.01057answer2pressure14pressure210volume16.01057volume2301.325pressure1AbsKPa501.325pressure2AbsKPa30.1325constantK1.6637pressureRatio0.6011volumeRatio-39.89volumeChangePercent

Cubic metres and psi: 0.05 m3 at 30 psi to 90 psi

A 0.05 cubic metre vessel of gas at 30 psi is taken to 90 psi absolute. Choose psi and cubic metres. V2 = 30 × 0.05 / 90 = 0.01667 m3.

That is 16.67 litres. The pressure tripled and the volume fell to a third, a change of about 66.67 percent. The same answer comes out in litres or millilitres.

solveFor: v2pressureType: absolutepressureUnit: psivolumeUnit: m3pressure1: 30volume1: 0.05pressure2: 90volume2: 40.01667answer30pressure190pressure20.05volume10.01667volume2206.843pressure1AbsKPa620.528pressure2AbsKPa1.5constantK3pressureRatio0.3333volumeRatio-66.67volumeChangePercent

What Else to Know

What Boyle's Law Says

Boyle's law describes how a trapped gas responds to being squeezed or stretched. At a constant temperature, with no gas added or lost, the pressure and the volume are inversely proportional. Halve the volume and the pressure doubles. Double the volume and the pressure halves.

Boyle's law formula diagram: P1 times V1 equals P2 times V2 at constant temperature and amount of gas

In symbols, P1 x V1 = P2 x V2. The 1 marks the starting state and the 2 marks the final state. Robert Boyle published the relationship in 1662, and the French physicist Edme Mariotte found it independently, which is why it is sometimes called the Boyle-Mariotte law.

The calculator solves for any one of the four values. Pick the unknown, enter the other three, choose the units, and read the answer. It also shows the constant P x V, the pressure ratio, the volume ratio and the percentage change in volume.

Graph of pressure against volume for a fixed amount of gas, a curve with P times V equal to 10 atm litres

Boyle's Law Formula for V2, V1, P2 and P1

To solve by hand, isolate the unknown. The formula for V2 is V2 = P1 x V1 / P2. For V1 it is V1 = P2 x V2 / P1. For P2 it is P2 = P1 x V1 / V2, and for P1 it is P1 = P2 x V2 / V1. The rearranged formula table shows all four with a worked check.

The steps never change. Convert to one pressure unit and one volume unit, multiply the two known values that sit on the same side of the equation, and divide by the remaining known value. Then ask whether the answer makes sense: if pressure went up, the volume should have gone down.

Worked Boyle's law example: 10 L at 1 atm compressed to 2.5 atm gives a final volume of 4 L

A useful shortcut is the ratio form. The new volume is the old volume times P1 / P2. Doubling the pressure multiplies the volume by one half.

Units, Gauge Pressure and Absolute Pressure

Boyle's law uses absolute pressure, measured from a perfect vacuum. Most gauges show pressure above the surrounding air, so a reading of zero on a tyre gauge still means about 1 atm absolute. Adding the atmosphere before using the formula matters: a tyre at 32 psi gauge is 46.7 psi absolute.

The pressure type box handles this. Choose gauge and the calculator adds exactly one standard atmosphere, 101,325 Pa, to each pressure you enter, then subtracts it from any pressure it solves. A gauge reading cannot go below minus one atmosphere, which would be a perfect vacuum.

Table converting gauge pressure in psi to absolute psi and atm by adding 14.696 psi

Pressure can be in atm, kPa, bar, mmHg, psi or Pa, and volume in litres, millilitres or cubic metres. The unit table lists the factors. The calculator treats mmHg as the torr, so 760 mmHg is exactly 1 atm. Both pressures must share a unit and both volumes must share a unit.

Compression, Expansion and Everyday Examples

Compressing a gas raises its pressure. A syringe sealed at the tip, a bicycle pump and a squeezed balloon all show it. The compression table starts with 10 L at 1 atm and lists the volume at several final pressures. At 4 atm the gas takes 2.5 L, a drop of 75 percent.

Bar chart of the final volume of 10 L of gas at 1 atm after changing to pressures from 0.5 to 5 atm

Expansion is the reverse. The expansion table starts with 1 L at 101.325 kPa and shows the volume when the pressure falls to 90, 80, 70, 60, 50 and 30 kPa. Halving the pressure doubles the volume.

Bar chart of the volume of 1 L of gas starting at 101.325 kPa when pressure falls to between 90 and 30 kPa

A bubble rising in water is a classic case. Because pressure increases by about 1 atm for every 10 m of seawater depth, a bubble is larger near the surface. The bubble table assumes a seawater density of 1,025 kg per cubic metre and a constant temperature. It is physics practice, not guidance for diving or for any pressure equipment.

Bar chart of a bubble that is 10 L at 30 m depth growing as it rises to the surface in seawater

Boyle's Law, Charles's Law and the Combined Gas Law

Boyle's law fixes the temperature. When the temperature changes too, other gas laws take over. Charles's law, V1/T1 = V2/T2, links volume and temperature at constant pressure. Gay-Lussac's law, P1/T1 = P2/T2, links pressure and temperature at constant volume. In both, temperatures must be in kelvin.

The combined gas law, P1V1/T1 = P2V2/T2, merges them for a fixed amount of gas. If the two temperatures are equal, the T terms cancel and you get Boyle's law. All of them are special cases of the ideal gas law, PV = nRT, which also lets the amount of gas change.

Table of Boyle's, Charles's, Gay-Lussac's and Avogadro's laws and the combined gas law with what is held constant

The gas laws table lists each law and what it holds constant. If you only know temperatures in Celsius or Fahrenheit, convert them to kelvin first, for example with the temperature converter linked at the bottom of this page.

When Boyle's Law Holds

The law assumes a fixed amount of gas, a constant temperature and ideal behaviour. A leak, a gas that dissolves into a liquid, or a chemical reaction breaks the first assumption. Squeezing a gas quickly warms it, so a fast compression ends at a higher pressure than the formula predicts, and a fast expansion cools it. Slow changes in a bath that holds the temperature are the best match.

Real gases follow Boyle's law closely at ordinary pressures. At high pressure, molecule size and attractions matter, and the product P x V drifts. Near the point where the gas condenses, the law fails altogether.

For most classroom and planning work, the law is accurate to a small percentage. For anything where a pressure limit matters, use a method intended for the equipment.

Limits of the Estimate and Related Calculators

The result is an estimate for education and planning. It does not know about leaks, temperature changes during the process, vessel flexing or non-ideal gas behaviour. Compressed gas can be dangerous, so use containers and equipment rated for the pressure, follow the manufacturer's instructions and any safety data sheet, and have a qualified person check a pressure system.

Limits of the Boyle's law calculator: fixed gas, constant temperature, absolute pressure, estimate only

To compare two values as a percentage, try the percentage calculator. To convert Celsius or Fahrenheit to kelvin before using the combined gas law, use the temperature converter. For values between two entries of a table, the linear interpolation calculator can help.

Reference Tables

Boyle's law formula rearranged for V2, V1, P2 and P1, with a worked check (P1 = 1 atm, V1 = 10 L, P2 = 2.5 atm, V2 = 4 L)
UnknownFormulaNumbersAnswer
V2 (final volume)V2 = P1 x V1 / P21 × 10 / 2.54 L
V1 (initial volume)V1 = P2 x V2 / P12.5 × 4 / 110 L
P2 (final pressure)P2 = P1 x V1 / V21 × 10 / 42.5 atm
P1 (initial pressure)P1 = P2 x V2 / V12.5 × 4 / 101 atm
Variables in P1 V1 = P2 V2 and the units the calculator accepts
SymbolMeaningUnits in the calculator
P1Starting absolute pressureatm, kPa, bar, mmHg, psi, Pa
V1Starting volumeL, mL, m3
P2Final absolute pressureSame unit as P1
V2Final volumeSame unit as V1
kConstant product P x V for a fixed amount of gas at fixed temperaturePressure unit x volume unit
Pressure unit conversions used by the calculator
UnitPascalskPaatm
1 atm101,325101.3251
1 kPa1,00010.00987
1 bar100,0001000.98692
1 mmHg (torr)133.3220.13330.001316
1 psi6,894.7576.89480.06805
Pressure and volume for a fixed amount of gas with P x V = 10 atm L (the product never changes)
Volume (L)Pressure (atm)Pressure (kPa)P x V (atm L)
1.010.0001,013.210.0
2.05.000506.610.0
2.54.000405.310.0
4.02.500253.310.0
5.02.000202.710.0
10.01.000101.310.0
20.00.50050.710.0
40.00.25025.310.0
Volume of 10 L of gas starting at 1 atm after compression or expansion to a new pressure
Final pressure (atm)Final pressure (kPa)Final volume (L)Volume change
0.2525.340.000300.0 %
0.5050.720.000100.0 %
0.8081.112.50025.0 %
1.50152.06.667-33.3 %
2.00202.75.000-50.0 %
3.00304.03.333-66.7 %
4.00405.32.500-75.0 %
5.00506.62.000-80.0 %
Gauge pressure and the absolute pressure Boyle's law needs (sea level, 1 atm = 14.696 psi)
Gauge reading (psi)Absolute (psi)Absolute (kPa)Absolute (atm)
014.70101.31.000
519.70135.81.340
1529.70204.72.021
3044.70308.23.041
3246.70322.03.177
3549.70342.63.382
6074.70515.05.083
100114.70790.87.805
Expansion of 1 L of gas that starts at 101.325 kPa when the pressure falls
Final pressure (kPa)Final volume (L)Pressure changeVolume change
90.01.126-11.2 %12.6 %
80.01.267-21.0 %26.7 %
70.01.448-30.9 %44.8 %
60.01.689-40.8 %68.9 %
50.02.026-50.7 %102.6 %
30.03.377-70.4 %237.8 %
A bubble that is 10 L at 30 m depth, as it rises (seawater 1,025 kg per cubic metre, g = 9.80665, constant temperature)
Depth (m)Absolute pressure (atm)Volume of the bubble (L)Compared with 30 m
303.97610.001.00 times
202.98413.321.33 times
101.99219.962.00 times
51.49626.582.66 times
01.00039.763.98 times
Boyle's law alongside the other gas laws, including Charles's law
LawFormulaHeld constantRelationship
Boyle's lawP1 V1 = P2 V2Temperature, amountP and V inverse
Charles's lawV1 / T1 = V2 / T2Pressure, amountV and T direct (kelvin)
Gay-Lussac's lawP1 / T1 = P2 / T2Volume, amountP and T direct (kelvin)
Avogadro's lawV1 / n1 = V2 / n2Pressure, temperatureV and n direct
Combined gas lawP1 V1 / T1 = P2 V2 / T2AmountAll three together
Common Boyle's law mistakes
MistakeEffectFix
Using gauge pressureAnswer off by about one atmosphereSwitch the calculator to gauge or add 1 atm yourself
Mixing units for P1 and P2Wrong by the conversion factorUse the same pressure unit for both, as the calculator does
Mixing litres and millilitresOff by a factor of 1,000Pick one volume unit for V1 and V2
Forgetting temperature must stay the sameResult misses the heating or cooling effectUse the combined gas law when temperature changes
Treating a leaky container as closedThe amount of gas changesBoyle's law needs a fixed amount of gas

Frequently Asked Questions About the Boyle's Law Calculator

How do you calculate Boyle's law?

Multiply the starting pressure by the starting volume, then divide by whichever final value you know. P1 x V1 = P2 x V2, so V2 = P1 x V1 / P2. With 1 atm, 10 L and a final pressure of 2.5 atm, V2 = 1 × 10 / 2.5 = 4 L. Use absolute pressure and keep the temperature constant.

What is the Boyle's law formula for V2?

V2 = P1 x V1 / P2. The new volume is the old volume multiplied by the ratio of the old pressure to the new one. If the pressure triples, V2 is a third of V1. Starting from 6 L at 1 atm and rising to 3 atm, V2 = 1 × 6 / 3 = 2 L.

What is the Boyle's law formula for V1?

V1 = P2 x V2 / P1. Use it when the final state is known and the starting volume is not. For a final state of 250 kPa and 2 L, with a start of 100 kPa, V1 = 250 × 2 / 100 = 5 L. Choose V1 in the Solve for list and enter the other three values.

How do I find the pressure in Boyle's law?

Rearrange to P2 = P1 x V1 / V2, or P1 = P2 x V2 / V1. A gas at 760 mmHg in 500 mL squeezed into 125 mL ends at 760 × 500 / 125 = 3,040 mmHg, which is 4 atm. The pressure rises by the same factor that the volume falls.

Boyle's law formula example: how does it work?

A syringe holds 20 mL of air at 1 atm. Pushing the plunger until the volume is 5 mL gives P2 = 1 × 20 / 5 = 4 atm, assuming the temperature stays the same. The pressure rises fourfold because the volume is a quarter of what it was. The calculator gives the same result in any unit.

How do you solve Boyle's law step by step?

Write P1 x V1 = P2 x V2. Convert the pressures to one absolute unit and the volumes to one unit. Identify the unknown and rearrange the formula to isolate it. Substitute, calculate, and check that the sign makes sense: a higher pressure should give a smaller volume. The calculator follows exactly these steps.

What is Boyle's law in simple terms?

For a fixed amount of gas at a constant temperature, pressure and volume are inversely proportional: squeeze the gas to half the volume and the pressure doubles. Robert Boyle published the relationship in 1662. The product of pressure and volume stays the same, which is why the graph of P against V is a curve.

What must stay constant for Boyle's law?

The temperature and the amount of gas. If gas leaks out or heat is added, the product P x V changes, and Boyle's law no longer applies on its own. When the temperature changes as well, use the combined gas law, P1V1/T1 = P2V2/T2, with the temperatures in kelvin.

Do I use gauge or absolute pressure?

Boyle's law needs absolute pressure. A gauge shows the pressure above the atmosphere, so add about 1 atm. A tyre at 32 psi gauge is 46.7 psi absolute. Set the Pressure type to gauge and the calculator adds the atmosphere for you, then subtracts it from any pressure it solves.

Which units can the Boyle's law calculator use?

Pressure can be atm, kPa, bar, mmHg, psi or Pa, and volume can be litres, millilitres or cubic metres. Both pressures share one unit and both volumes share one unit, so the answer comes back in the units you chose. Any pair of units gives the same physical result.

Is there a Boyle's law calculator app?

You do not need to install anything. This calculator runs in the browser on a phone, tablet or computer, and it updates as you type. Choose what to solve for, enter three values with their units, and the fourth appears. It works without an account or a download.

What is Charles's law and is there a calculator for it?

Charles's law says volume is proportional to kelvin temperature at constant pressure, V1/T1 = V2/T2. A gas of 10 L at 300 K reaches 11.67 L at 350 K. Boyle's law covers a pressure change at constant temperature, and the two combine into the combined gas law.

Why are pressure and volume inversely related?

Gas pressure comes from molecules hitting the walls. Halve the volume and the same molecules hit the walls twice as often, so the pressure doubles, provided the temperature, and so the average speed of the molecules, is unchanged. That is why the product P x V stays the same.

What does a Boyle's law graph look like?

Pressure plotted against volume is a curve that falls steeply and then flattens, called a hyperbola. A plot of pressure against 1/V is a straight line through the origin. With P x V = 10 atm L, the point (2 L, 5.0 atm) and (5 L, 2.0 atm) both lie on the same curve.

How does Boyle's law apply to a syringe or pump?

Moving the plunger changes the volume, so the pressure of the trapped air changes the opposite way. Pushing in raises the pressure, pulling out lowers it. The effect is largest for small trapped volumes. In a real pump the air also warms when compressed quickly, so the result is an approximation.

How much does a bubble grow as it rises?

Pressure falls as depth falls, so the bubble expands. In seawater the pressure drops by about 1 atm for every 10 m. A bubble that is 10 L at 30 m grows to 20.0 L at 10 m and 39.8 L at the surface, if its temperature is constant. This is for physics practice only.

What happens to volume when pressure is halved?

The volume doubles, at constant temperature. From 1 L at 101.325 kPa, dropping to 50.6625 kPa gives 2 L. A pressure cut to a quarter makes the volume four times larger. The expansion table lists several pressures and the volume each one gives.

Is Boyle's law the same as the ideal gas law?

It is a special case. The ideal gas law, PV = nRT, includes the amount of gas and the temperature. Hold n and T fixed and PV is a constant, which is Boyle's law. Real gases follow Boyle's law closely near normal pressure and temperature, and drift away at high pressure.

When does Boyle's law stop being accurate?

It becomes less accurate at high pressure, at low temperature close to condensation, and for gases with strong attractions between molecules. Rapid compression also warms the gas, which breaks the constant temperature condition. Treat results from very large pressure changes as rough estimates and follow equipment ratings.

Is it safe to compress gas based on these results?

The calculation is an estimate for education and planning. Compressing or storing gas is hazardous. Use containers rated for the pressure, follow the manufacturer's instructions and safety data sheets, and have a qualified person check any pressure system. Never rely on a web calculator for safety limits.

References

  1. [1] Wikipedia contributors. “Boyle's law.” Wikipedia. Accessed 2026-10-07.
  2. [2] Wikipedia contributors. “Gas laws.” Wikipedia. Accessed 2026-10-07.
  3. [3] Wikipedia contributors. “Pressure measurement (gauge pressure).” Wikipedia. Accessed 2026-10-07.
  4. [4] Wikipedia contributors. “Standard atmosphere (unit).” Wikipedia. Accessed 2026-10-07.