Science Academy
☰✕

Boyle's Law Explained (With a Worked Example)

Boyle's law says pressure and volume move in opposite directions at constant temperature. The formula, why it works, and a worked gas calculation.

Boyle's Law Explained (With a Worked Example): Gas Laws: Gas laws in 3D: a cylinder of gas particles with a movable piston, showing pressure, volume and temperature
The Gas Laws in 3D: open it and try this yourself, free.
Try it in the Gas Laws

Boyle's law says that for a fixed amount of gas at a constant temperature, pressure and volume are inversely proportional: squeeze a gas into half the space and its pressure doubles. The boyle's law formula is P₁V₁ = P₂V₂, and it's one of the three gas laws that describe how gases behave as you change pressure, volume or temperature.

The formula and what it means

P₁V₁ = P₂V₂

P₁ and V₁ are the pressure and volume you start with; P₂ and V₂ are the pressure and volume after a change. As long as the temperature and the amount of gas don't change, the product P × V stays the same number throughout. Double the pressure and the volume halves; triple the volume and the pressure drops to a third.

This only holds for a fixed mass of gas at a constant temperature — that's why it's sometimes written as the isothermal gas law. If you heat the gas while compressing it, Boyle's law alone won't predict the result; you'd need the combined gas law instead.

Why pressure and volume are inversely linked

Gas pressure comes from molecules colliding with the walls of their container. Shrink the container and the same number of molecules are now bouncing around in less space, so they hit the walls more often in a given second — more collisions per second means higher pressure. Nothing about the molecules themselves has changed; only how often they collide with a wall has.

That's also why temperature has to stay fixed for the law to hold: heating the gas speeds the molecules up, which would increase the collision rate for a completely different reason and break the clean inverse relationship.

A worked example

A gas occupies 6.0 L at a pressure of 2.0 atm. It's compressed to 2.0 L at the same temperature. What's the new pressure?

Using P₁V₁ = P₂V₂:

(2.0 atm)(6.0 L) = P₂(2.0 L)

12.0 = P₂ × 2.0

P₂ = 6.0 atm

The volume dropped to a third of its original size, so the pressure tripled — exactly the inverse relationship the law predicts.

Real-world examples of Boyle's law

  • A syringe. Pulling the plunger back increases the volume inside, which drops the pressure below atmospheric, so liquid or air gets pushed in from outside.
  • Scuba diving. As a diver descends, water pressure rises and compresses the air in their lungs and equipment; ascending too fast lets trapped gas expand rapidly, which is why divers are trained to rise slowly and breathe out on the way up.
  • A bicycle pump. Pushing the handle down shrinks the volume of air inside the cylinder, raising its pressure enough to force air into the tyre.

Frequently asked questions

What is Boyle's law in simple terms?

At a constant temperature, a gas's pressure and volume move in opposite directions: shrink the space it's in and the pressure goes up by the same factor; give it more space and the pressure drops. The product of pressure and volume stays constant.

What is the difference between Boyle's law and Charles's law?

Boyle's law relates pressure and volume at constant temperature (P₁V₁ = P₂V₂). Charles's law relates volume and temperature at constant pressure (V₁/T₁ = V₂/T₂) — heating a gas at fixed pressure makes it expand. They're two of the three gas laws combined into the ideal gas law, PV = nRT.

Does Boyle's law apply to all gases?

It's a good approximation for most gases at ordinary pressures and temperatures, where they behave close to an "ideal gas." At very high pressure or very low temperature, real gases deviate because the molecules themselves take up space and attract each other — effects Boyle's law ignores.

Try it in the Gas Laws tool

The Gas Laws tool lets you drag a piston to squeeze or expand a gas and watch the pressure respond in real time, holding temperature constant to test Boyle's law directly, or lifting the constraint to see Charles's and Gay-Lussac's laws alongside it. For the surrounding chemistry, see states of matter and the full set of equations on the Chemistry formulas page.

See it for yourself, in 3D and free.

Try it in the Gas Laws