Calculateus

Boyle's Law Calculator

Calculate the pressure or volume of a gas at constant temperature using Boyle's Law.

Result

Final Pressure
4 atm
Final Volume
2 L

About the Boyle's Law Calculator

The Boyle's Law calculator finds the missing pressure or volume value for a fixed amount of gas held at constant temperature. It's the standard tool for the classic gas-compressed-in-a-piston problem, where squeezing a gas into a smaller space raises its pressure by a predictable, inverse amount. Chemistry and physics students use it to check homework, while anyone working with compressed gas can use it to estimate pressure or volume changes.

How It Works

Choose whether you're solving for the final pressure or the final volume, then enter the initial pressure and volume along with whichever final value you already know. The calculator applies Boyle's Law, which holds that pressure and volume are inversely proportional at constant temperature, and rearranges the equation to isolate the unknown.

P1 x V1 = P2 x V2, solved as P2 = (P1 x V1) / V2 or V2 = (P1 x V1) / P2 depending on which value is unknown.

Formula & Methodology

To solve by hand, multiply the initial pressure by the initial volume to get a fixed product, since that product stays constant at constant temperature, then divide that fixed product by whichever final value, pressure or volume, is already known to find the missing one.

Examples

Compressing Gas in a Piston

A gas starts at 2 atm and 4 liters, then is compressed to 2 liters. Solving for final pressure gives P2 = (2 x 4) / 2 = 4 atm, doubling as the volume is halved.

Finding Final Volume From a Pressure Change

A gas sample begins at 3 atm and 6 liters and is compressed until its pressure rises to 9 atm. Solving for final volume gives V2 = (3 x 6) / 9 = 2 liters, matching the inverse relationship: tripling pressure cuts volume to a third.

Advantages

  • Solves in either direction, for pressure or for volume, from the same set of inputs, without requiring the user to rearrange the algebra.
  • Guards against divide-by-zero errors when a final value is left at zero, prompting for a valid number instead of returning a nonsensical result.
  • Quick way to verify by-hand homework answers or estimate pressure changes for compressed gas equipment like syringes, pumps, or gas cylinders.

Common Mistakes

  • Applying Boyle's Law when temperature is also changing, when the Combined Gas Law, which includes a temperature term, is the correct formula.
  • Mixing pressure units, such as entering one value in atm and another in psi or kPa without converting first.
  • Expecting the inverse relationship to hold exactly at very high pressures, where real gases compress somewhat less than an ideal gas would predict.

Edge Cases to Watch For

  • If the final volume is zero when solving for final pressure, or the final pressure is zero when solving for final volume, the calculator returns an error instead of dividing by zero.
  • Temperature is assumed constant throughout the process; if the gas heats up or cools down while being compressed or expanded, Boyle's Law alone no longer applies and the Combined Gas Law is the appropriate formula instead.
  • The law strictly describes an ideal gas; real gases deviate somewhat from this relationship at very high pressure or low temperature, where intermolecular forces and molecular volume become significant.

Common Use Cases

  • Chemistry students working through gas law problem sets and checking their algebra.
  • Divers and technicians estimating how compressed air volume changes with depth-related pressure changes.
  • Anyone working with syringes, pistons, or sealed gas containers who wants a quick pressure or volume estimate.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

What does Boyle's Law describe?

At constant temperature, a gas's pressure and volume are inversely proportional (P₁V₁ = P₂V₂) - compress a gas into a smaller volume and its pressure rises proportionally, which is why, for example, a bicycle pump's air gets noticeably compressed and pressurized as you push the handle down.

Conclusion

Boyle's Law describes one of the simplest and most reliable relationships in gas behavior: pressure up, volume down, in exact inverse proportion, as long as temperature and the amount of gas stay fixed. This calculator handles that algebra instantly in either direction.