The Boyle's law calculator above handles the simplest and most useful statement in gas physics: at fixed temperature and fixed amount of gas, pressure and volume multiply to a constant. Squeeze the gas into half the space and the pressure doubles. Give the calculator any three of the four quantities and it returns the fourth, converting freely between pascals, bars, atmospheres, psi and millimetres of mercury on the pressure side, and between cubic metres, litres, cubic feet and gallons on the volume side.
Arb Digital builds free tools that do one job completely rather than half of several. It solves a two-state transition at constant temperature, which is what almost every homework question, diving table and syringe problem actually asks for. If your temperature is also changing, or you need moles and absolute temperature in the same expression, the ideal gas law calculator and the combined gas law calculator are the right pages, and both are linked below.
What This Boyle's Law Calculator Does
The relationship is P₁V₁ = P₂V₂, where state 1 is the gas before the change and state 2 is the gas after it. Because the product is a constant, any one of the four terms can be made the subject. Solving for final volume gives V₂ = P₁V₁ ÷ P₂. Solving for final pressure gives P₂ = P₁V₁ ÷ V₂. The initial-state versions are the mirror images of those two.
The calculator does the algebra in SI internally. Every pressure you enter is converted to pascals and every volume to cubic metres before anything is multiplied, then the answer is converted back into whichever unit you selected for the quantity being solved. That means you can enter an initial pressure in psi, an initial volume in cubic inches and a final pressure in bar, and ask for the final volume in litres, without doing a single conversion by hand.
Alongside the headline answer, the result panel reports the PV product itself. Pressure in pascals multiplied by volume in cubic metres has units of joules, which is not a coincidence: pressure is force per unit area and volume is area multiplied by length, so their product is force multiplied by length. That number is the invariant of the whole problem, and if it differs between the two states you have entered inconsistent data. The panel also gives the two ratios and the percentage change in volume, which is usually the figure a diver, a compressor operator or a lab technician actually wants.
How to Use It
- Choose what you are solving for first. That field stops being an input and becomes the output, so the value sitting in it is ignored.
- Convert gauge readings to absolute pressure before entering them. Add about 101.3 kPa, or 14.7 psi, or 1 atm, to anything read from a dial gauge. This is the single most common source of a wrong answer.
- Pick each unit independently. There is no need for the two pressures to share a unit, or for the two volumes to share one. The conversions are exact rather than rounded.
- Check the PV constant. If you have entered all four values and the calculator's constant does not match the product you expected, one of the four numbers is wrong or the temperature is not actually fixed.
- Read the percentage change, not just the answer. A volume that grows by 150 per cent tells you more about whether a container will burst than a bare figure in litres does.
The Formula: How Boyle's Law Is Calculated
OpenStax states the relationship directly in section 9.2 of Chemistry 2e, on relating pressure, volume, amount and temperature: the volume of a given amount of gas held at constant temperature is inversely proportional to the pressure under which it is measured, which is written P ∝ 1/V, or PV = k, or P₁V₁ = P₂V₂. Those are four ways of saying the same thing, and the last of them is the form this calculator implements.
Work the default values by hand. The initial pressure is 1 atm, which the same textbook's section 9.1 on gas pressure defines as exactly 101,325 pascals. The initial volume is 2 litres, which is 0.002 cubic metres. Their product is 101,325 × 0.002 = 202.65 joules, and that is the constant for this gas at this temperature. The final pressure is 2.5 atm, which is 253,312.5 pascals. The final volume is therefore 202.65 ÷ 253,312.5 = 0.0008 cubic metres, which is 0.8 litres. Pressure went up by a factor of 2.5, so volume came down by a factor of 2.5, and the change in volume is minus 60 per cent.
The units themselves are worth a moment. The pascal is the SI derived unit of pressure, equal to one newton per square metre, and the BIPM SI Brochure is the document that defines it. The atmosphere, the bar, the torr and the pound per square inch are all conventional units defined by fixed conversion factors to the pascal, which is why the arithmetic above is exact rather than approximate. Our pressure converter covers those conversions on their own if that is all you need.
Why Constant Temperature Is Not a Technicality
Every statement of Boyle's law carries the phrase "at constant temperature", and it is doing real work. Compressing a gas does work on it, and that work becomes internal energy unless it can escape as heat. A gas compressed slowly enough for heat to leak away into the surroundings stays at ambient temperature, and Boyle's law describes it accurately. A gas compressed quickly has nowhere to dump that energy, so it heats up, and a hotter gas at a given volume exerts more pressure than a cooler one.
The practical consequence is that this calculator underestimates the final pressure of any fast compression. Pump a bicycle tyre hard and the barrel of the pump becomes noticeably warm; that heat is the difference between the isothermal answer this page gives and the adiabatic reality. Diesel engines rely on exactly the same effect, compressing air enough to raise its temperature past the ignition point of the fuel, and no isothermal calculation will ever predict that.
The reverse holds for expansion. Gas escaping quickly from a cylinder cools, sometimes enough to frost the valve. If you are sizing something for a rapid release, treat the Boyle's law figure as a floor on the volume rather than a prediction. For slow processes, laboratory syringes, sealed samples left to equilibrate, and anything where the container is a good conductor sitting in a large room, the constant-temperature assumption is close enough that you will not measure the difference.
Absolute Pressure Versus Gauge Pressure
Boyle's law is a statement about absolute pressure, measured upward from a perfect vacuum. Almost every pressure instrument in ordinary use reads gauge pressure, measured upward from whatever the local atmosphere happens to be. A tyre gauge showing 32 psi is describing air at about 46.7 psi absolute, because the atmosphere is already pressing at roughly 14.7 psi and the gauge subtracts it automatically.
Feed gauge values into P₁V₁ = P₂V₂ and the ratio you compute is wrong, badly so at low pressures. Take a gas at 1 psi gauge compressed to 3 psi gauge. In gauge terms that looks like a factor of three, implying the volume falls to a third. In absolute terms it is 15.7 psi going to 17.7 psi, a factor of 1.13, so the volume only falls by about eleven per cent. The two answers are not close, and the smaller the gauge numbers the further apart they get.
The fix is a single addition. Add local atmospheric pressure to every gauge reading before it goes into the calculator. At sea level that is 101.325 kPa by convention; at altitude it is meaningfully less, and our air pressure at altitude calculator gives the figure for a given elevation. Vacuum work needs the same care in reverse, since a reading of "25 inches of vacuum" is a description of how far below atmospheric the gas sits, not an absolute pressure.
Where Boyle's Law Stops Being Accurate
Boyle's law is the ideal gas law with temperature and quantity held fixed, so it inherits every assumption behind the ideal gas model: molecules with no volume of their own and no attraction to each other. Real molecules have both, and the errors from the two effects pull in opposite directions.
At moderate pressures, intermolecular attraction dominates. The molecules pull on each other slightly as they approach a wall, so they strike it a little less hard than the ideal model predicts, and the real gas is a fraction more compressible than Boyle's law says. Push further and the finite size of the molecules takes over, because the space they occupy is no longer negligible compared with the container. From that point on the gas resists compression more strongly than the ideal model expects.
For air near room temperature and a few atmospheres, the discrepancy is well under one per cent and can be ignored. At tens or hundreds of atmospheres, or anywhere near the temperature at which the gas would liquefy, it becomes large enough to matter and a real-gas equation of state is required. Carbon dioxide is the classic trap: it is easy to liquefy, so a compression that looks routine on paper can push it across a phase boundary where PV = k stops describing anything at all. The density calculator and the pressure calculator handle the adjacent questions once you are outside the ideal regime.
Diving, Lungs and Syringes
Boyle's law is the reason a scuba diver must never hold their breath while ascending. Pressure underwater rises by roughly one atmosphere for every ten metres of depth, so a lungful taken at thirty metres is at about four atmospheres absolute. Bring that gas to the surface with a closed airway and it wants to expand to four times its volume, which the chest cannot accommodate. Divers are taught to breathe continuously on ascent for exactly this reason, and the same arithmetic explains why a partly inflated balloon released underwater swells as it rises.
The syringe version is the one you can do on a desk. Seal the nozzle of a plastic syringe, note the plunger position, and press. Halving the enclosed volume doubles the absolute pressure inside, and the force you feel on the plunger is that pressure difference multiplied by the plunger area. It is also why a blocked syringe becomes so much harder to depress near the end of its travel: the same additional millimetre of travel represents a much larger fractional volume change once the trapped column is short.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Entering gauge pressure instead of absolute pressure — add roughly one atmosphere to any dial reading first, or every ratio you compute will be too large.
- Applying Boyle's law when the temperature changed — if the gas warmed or cooled between the two states, the combined gas law is the correct relation and Boyle's law will be wrong in a predictable direction.
- Letting gas in or out during the change — P₁V₁ = P₂V₂ assumes a fixed number of molecules, so a leaking seal or a topped-up cylinder breaks it immediately.
- Mixing units within one product — pressure in psi multiplied by volume in litres is not a meaningful constant, which is why this calculator converts everything to SI before it multiplies.
- Using it near a phase change — once a gas begins to condense, pressure stops responding to volume in the way the ideal model predicts and the answer becomes meaningless.
Related Free Tools From Arb Digital
When temperature changes as well, move up to the combined gas law calculator, or to the Charles's law calculator if pressure is what stays fixed. For a single state described by moles and absolute temperature, use the ideal gas law calculator. Unit work is handled by the pressure converter and the temperature converter. For the surrounding conditions, the air pressure at altitude calculator and the air density calculator give the ambient figures a gas problem usually needs. The full free online tools hub lists everything Arb Digital publishes.
Frequently Asked Questions
Boyle's law states that P1 times V1 equals P2 times V2 for a fixed amount of gas at constant temperature. Rearranged, the final volume is the initial pressure times the initial volume divided by the final pressure, and the other three unknowns follow from the same product.
Always absolute pressure, measured from a perfect vacuum. Dial gauges read pressure above the surrounding atmosphere, so add about 101.325 kilopascals, 14.7 psi or 1 atmosphere to a gauge reading before entering it. Skipping this step is the most common cause of a wrong answer.
Because compressing a gas does work on it, and that energy raises its temperature unless it can escape as heat. A hotter gas exerts more pressure at the same volume, so a fast compression produces a higher final pressure than Boyle's law predicts. Slow changes in a conductive container stay close to the ideal answer.
It works well for any gas that is far from condensing and not under extreme pressure. Real molecules occupy space and attract one another, so at high pressures or near the liquefaction temperature the product of pressure and volume drifts away from a constant and a real-gas equation of state is needed instead.
Pressure in pascals multiplied by volume in cubic metres gives joules, because pressure is force per unit area and volume is area times length. The calculator reports that figure so you can check consistency between the two states, since it must be identical for both.
The ideal gas law describes a single state using pressure, volume, moles and absolute temperature together. Boyle's law is what remains when the amount of gas and the temperature are both held fixed, which reduces the problem to a two-state comparison of pressure against volume.
Pressure falls by roughly one atmosphere for every ten metres of ascent, so trapped air in the lungs expands as the diver rises. Air taken at thirty metres would try to occupy about four times its volume at the surface, which the chest cannot accommodate, so divers are trained to breathe continuously throughout an ascent.
This tool is provided for educational and estimating use. It models an ideal gas at constant temperature and is not a substitute for engineering design, pressure-vessel certification or dive planning carried out by a qualified professional.