Boyle's Law Calculator
Boyle's law says the pressure and volume of a fixed amount of gas at constant temperature are inversely proportional, so P1V1 = P2V2. Enter any three of the four values and leave the unknown blank to solve for it. Choose your pressure and volume units, see the isothermal pressure-volume curve, and add a temperature to find how many moles of gas you have.
Formula
Worked example
A gas at P1 = 100 kPa fills V1 = 2 L. Compress it to V2 = 1 L at the same temperature. Then P2 = P1V1/V2 = (100 x 2) / 1 = 200 kPa. Halving the volume exactly doubles the pressure, because the product P x V stays fixed at 200 kPa·L. At 25 °C that gas is about 0.0807 mol from PV = nRT.
What Boyle's law says and when it applies
Boyle's law describes how a fixed quantity of an ideal gas behaves when its temperature is held constant: the pressure and volume are inversely proportional, so their product stays the same before and after any change. Written as P1V1 = P2V2, it lets you solve for any one of the four quantities once the other three are known. Physically, squeezing a gas into half the space forces its molecules to strike the container walls twice as often, which doubles the pressure. The law assumes the temperature does not change and the amount of gas (the number of moles) is fixed, so it is a constant-temperature, constant-amount special case of the more general ideal gas law PV = nRT.
Choosing units and rearranging for each unknown
Because the equation is a simple product equality, every unknown comes from a single division. To find a final pressure, use P2 = P1V1 / V2; for a final volume, V2 = P1V1 / P2; the initial quantities follow the same pattern, P1 = P2V2 / V1 and V1 = P2V2 / P1. This calculator lets you pick the pressure unit from ten options (Pa, kPa, MPa, bar, mbar, atm, psi, torr, mmHg, inHg) and the volume unit from seven (m³, L, mL, cm³, ft³, in³, gal). The only rule is that both pressures share one unit and both volumes share another, because the units cancel pair by pair. The constant P x V product is reported so you can sanity-check that it really stays fixed across the change.
Finding the amount of gas, and the P-V curve
Turn on "find moles of gas" and enter the constant temperature to also get the amount of gas n from the ideal gas law PV = nRT, with R = 8.314463 J/(mol·K). The calculator converts the state you entered to SI units (pascals, cubic metres, kelvin) and divides PV by RT. Because Boyle's law keeps the PV product constant, either the initial or the final state gives the same number of moles at that temperature. The pressure-volume chart plots the isotherm P = constant / V, a hyperbola that passes through both your states, so you can see at a glance how steeply pressure climbs as the gas is squeezed into a smaller volume.
Where Boyle's law shows up in the real world
The inverse pressure-volume relationship explains a surprising amount of everyday physics. Your lungs breathe by it: the diaphragm enlarges the chest cavity, the larger volume drops the internal pressure, and air rushes in to equalise. Scuba divers depend on it because a lungful of air at depth expands dangerously as they ascend into lower pressure, which is why they are taught never to hold their breath while surfacing. Syringes, bicycle pumps, and the bubbles rising from a deep-sea vent all obey the same rule. In each case the temperature stays roughly constant during the quick change, so the simple P1V1 = P2V2 form predicts the outcome well without needing the full ideal gas law.
Pressure and volume unit references
| Unit | Type | In SI base |
|---|---|---|
| 1 atm | Pressure | 101.325 kPa |
| 1 bar | Pressure | 100 kPa |
| 1 psi | Pressure | 6.895 kPa |
| 1 mmHg (torr) | Pressure | 0.1333 kPa |
| 1 L | Volume | 0.001 m³ |
| 1 gal (US) | Volume | 3.785 L |
| 1 ft³ | Volume | 28.317 L |
Both pressures must use one unit and both volumes another; these conversions show how they relate.
Frequently asked questions
What does Boyle's law actually state?
Boyle's law states that for a fixed amount of gas at constant temperature, pressure and volume are inversely proportional: if you halve the volume the pressure doubles, and vice versa. Mathematically the product P x V is constant, so P1V1 = P2V2. It only holds when the temperature and the amount of gas do not change.
Which pressure and volume units can I use?
You can choose pressure in Pa, kPa, MPa, bar, mbar, atm, psi, torr, mmHg or inHg, and volume in m³, L, mL, cm³, ft³, in³ or US gallons. Both pressures must share one unit and both volumes another, since the units cancel pair by pair. The constant P x V product is shown in whatever units you picked.
How does it find the number of moles of gas?
Switch on "find moles of gas" and enter the temperature. The calculator converts your initial pressure, volume and temperature to SI units (pascals, cubic metres and kelvin) and applies the ideal gas law PV = nRT with R = 8.314463 J/(mol·K). Because Boyle's law keeps PV constant, the initial and final states give the same number of moles at that temperature.
Why does the temperature have to stay constant?
Boyle's law is the constant-temperature slice of the ideal gas law PV = nRT. Heating a gas adds energy and raises the PV product, so P x V is no longer conserved and the simple inverse relationship breaks. If both temperature and pressure change, use the combined gas law P1V1/T1 = P2V2/T2 instead, with temperatures in kelvin.