Boyle's Law Calculator

Final pressure P21.00 atm
Constant P x V10.00 atm·L
How this was calculated
  1. Boyle's law: at constant temperature P1 x V1 = P2 x V2, and here P1 x V1 = 2.50 x 4.00 = 10.00 atm·L.
  2. Solving for the unknown gives 1.00 atm.
  3. Pressure and volume move in opposite directions: squeeze the gas and its pressure climbs in exact proportion.

This Boyle's law calculator applies the relationship for a fixed amount of gas at constant temperature, where pressure and volume are inversely proportional. Using the formula P1V1 = P2V2, it solves for the missing pressure or volume when you provide the other three values. For example, a gas at 2.5 atm in 4 L that expands to 10 L drops to 1.00 atm, giving a P x V constant of 10.00 atm·L. Similarly, 6 L at 1 atm compressed to 3 atm occupies 2.00 L, and a gas ending at 1.5 atm in 8 L with a constant of 12.00 that now occupies 2 L was at 6.00 atm. Pressures and volumes may use any consistent units (atm and liters, kPa and milliliters) as long as both states use the same pair.

Boyle's law is the accepted standard for isothermal gas calculations because it is the isothermal special case of the ideal gas law. Named for Robert Boyle, who published the relationship in 1662, it provides a reliable, experimentally verified method for determining how pressure changes with volume when temperature and gas amount remain constant. This page shows the formula, step-by-step workings, worked examples, and sources so you can understand and verify every result the calculator produces.

Worked examples

Gas expands 4 L to 10 L

Primary result: 1.00 atm — the P x V constant is 10.00 atm·L, spread over a bigger volume. (Final pressure P2 · 2.5 atm · 4 L · 1 atm · 10 L)

Final pressure P21.00 atm
Constant P x V10.00 atm·L

Compressed to 3 atm

Primary result: 2.00 L — tripling the pressure thirds the volume. (Final volume V2 · 1 atm · 6 L · 3 atm · 2 L)

Final volume V22.00 L
Constant P x V6.00 atm·L

Back out the starting pressure

Primary result: 6.00 atm — working the same constant backwards. (Initial pressure P1 · 6 atm · 2 L · 1.5 atm · 8 L)

Initial pressure P16.00 atm
Constant P x V12.00 atm·L

Boyle's law explained

Boyle's law describes a relationship you can feel with your hands. Picture a balloon filled with air. Squeeze the balloon and it shrinks, but the air pushes back harder against your fingers. Release the balloon and it expands, and the push weakens. That is inverse proportionality at work: when volume goes down, pressure goes up by the same factor. When volume goes up, pressure goes down by the same factor. The two quantities move in opposite directions so that their product stays constant, expressed as P1V1 = P2V2.

The relationship holds under two conditions: a fixed amount of gas and constant temperature. If you add or remove gas, the balance shifts. If the temperature changes, the numbers no longer follow the simple equation. Hold those two variables steady, though, and pressure and volume stay locked in their inverse pattern. The law is named for Robert Boyle, who published the relationship in 1662, and it is the isothermal special case of the ideal gas law.

The numbers confirm the pattern. If a gas sits at 2.5 atm in 4 L and expands to 10 L, the pressure drops to 1.00 atm. Multiply pressure by volume at either end and you get the same constant of 10.00 atm·L. The same logic works in reverse. A gas that now ends at 1.5 atm in 8 L has a constant of 12.00. If that same gas occupies 2 L instead, it must have started at 6.00 atm. The product never changes.

You can also watch the law in action through compression. Take 6 L of gas at 1 atm and squeeze it to 3 atm. The volume falls to 2.00 L. Pressure tripled, so volume fell to one third. The units you choose do not matter as long as you stay consistent across both states. Pair atm with liters or kPa with milliliters. Use the same pair on both sides of the equation and the math holds.

Solving for each variable

Boyle's law states that for a fixed amount of gas at constant temperature, pressure and volume are inversely proportional, expressed as P1V1 = P2V2. This single equation contains four variables: the initial pressure (P1), the initial volume (V1), the final pressure (P2), and the final volume (V2). To solve for any one of them, you rearrange the equation so the missing variable sits alone on one side. The calculator does this automatically: you enter the three values you know, and it identifies which variable is blank, selects the matching rearrangement, and computes the result.

Each rearrangement follows directly from dividing both sides by the known variable that sits next to the unknown one. To find the initial pressure P1, divide P2V2 by V1, giving P1 = P2V2 / V1. To find the initial volume V1, divide P2V2 by P1, giving V1 = P2V2 / P1. To find the final pressure P2, divide P1V1 by V2, giving P2 = P1V1 / V2. To find the final volume V2, divide P1V1 by P2, giving V2 = P1V1 / P2. The calculator applies the correct formula based on which field you leave empty.

The worked examples show each rearrangement in action. When a gas at 2.5 atm in 4 L expands to 10 L, the pressure drops to 1.00 atm; the P x V constant is 10.00 atm·L. When 6 L at 1 atm is compressed to 3 atm, the volume becomes 2.00 L. A gas ending at 1.5 atm in 8 L, with a constant of 12.00, that now occupies 2 L was at 6.00 atm before the change. In each case, multiplying the known pressure by its matching volume and dividing by the remaining known value yields the missing number.

Pressures and volumes may use any consistent units, such as atm and liters or kPa and milliliters, as long as both states use the same pair. The calculator does not convert between unit systems, so mixing units across the two states will produce incorrect results. Enter the three known values in their shared units, leave the fourth field blank, and read the answer in those same units.

  • P1 = P2V2 / V1 (initial pressure)
  • V1 = P2V2 / P1 (initial volume)
  • P2 = P1V1 / V2 (final pressure)
  • V2 = P1V1 / P2 (final volume)

Worked examples

Boyle's law states that for a fixed amount of gas at constant temperature, pressure and volume are inversely proportional, expressed as P1V1 = P2V2. The following worked examples show how to apply this relationship to expansion, compression, and back-solving for an initial pressure. Each example includes a verification step using the P × V constant, which should remain the same before and after the change.

Expansion example: A gas starts at 2.5 atm in a 4 L container and is allowed to expand to 10 L. Using Boyle's law, P2 = P1V1 / V2 = (2.5 atm × 4 L) / 10 L = 1.00 atm. To verify, calculate the P × V constant for both states. The initial constant is 2.5 atm × 4 L = 10.00 atm·L, and the final constant is 1.00 atm × 10 L = 10.00 atm·L. Because both values match, the result is consistent with Boyle's law.

Compression example: A gas occupies 6 L at 1 atm and is compressed to a pressure of 3 atm. Solving for the new volume, V2 = P1V1 / P2 = (1 atm × 6 L) / 3 atm = 2.00 L. Checking the P × V constant confirms the result: the initial value is 1 atm × 6 L = 6.00 atm·L, and the final value is 3 atm × 2.00 L = 6.00 atm·L. The constant is preserved, so the calculation is correct.

Back-solving an initial pressure: A gas ends at 1.5 atm in 8 L, and the P × V constant is known to be 12.00. If the gas now occupies 2 L, what was the original pressure? Rearranging P1V1 = P2V2 gives P1 = P2V2 / V1 = (1.5 atm × 8 L) / 2 L = 6.00 atm. Verification: the final constant is 1.5 atm × 8 L = 12.00, and the initial constant is 6.00 atm × 2 L = 12.00. Both values agree, confirming the back-solved pressure.

These examples use atmospheres and liters, but pressures and volumes may use any consistent units, such as kPa and milliliters, as long as both states use the same pair. The law is named for Robert Boyle, who published the relationship in 1662, and it represents the isothermal special case of the ideal gas law. In every case, checking that P × V stays constant is a quick way to confirm a Boyle's law calculation.

Where Boyle's law shows up

Boyle's law is not just a textbook equation. Because it describes how pressure and volume move in opposite directions for a fixed amount of gas at constant temperature, the relationship shows up anywhere a confined gas is squeezed or allowed to expand. The inverse proportion means that doubling the pressure halves the volume, and halving the pressure doubles the volume, provided the temperature holds steady.

Scuba diving is one of the clearest and most consequential examples. As a diver descends, the surrounding water pressure increases, and the air in the diver's lungs and equipment compresses according to Boyle's law. On the way back up, that pressure drops and the trapped gas expands. If a diver holds a full breath during ascent, the expanding air can overstretch or rupture the lungs, which is why training emphasizes continuous exhalation. The same expansion affects air pockets in masks, sinuses, and ears, making equalization a core part of safe diving practice.

Everyday devices rely on the same principle. A syringe works because pulling back the plunger increases the chamber volume, lowering the internal pressure so outside fluid is pushed in. Breathing uses similar mechanics: the diaphragm drops, the chest cavity expands, pressure in the lungs falls, and air flows in. Weather balloons provide another visible case. A balloon filled at ground level rises into thinner air, the outside pressure decreases, and the gas inside expands the balloon as it climbs. In each situation the core idea is the same inverse relationship that Robert Boyle published in 1662.

There are limits, however. Boyle's law is the isothermal special case of the ideal gas law, so it assumes gas molecules behave ideally. At very high pressures or very low temperatures, real gases deviate because molecular attraction and the volume of the molecules themselves become significant. For most everyday pressures and volumes the law is an excellent approximation, and any consistent unit pair works as long as both states share it, whether you use atm and liters or kPa and milliliters.

FAQs

What is the formula for Boyle's law?

Boyle's law states that P1V1 = P2V2 at constant temperature. Pressure and volume are inversely proportional, so when one rises the other falls. For example, expanding 4 L at 2.5 atm to 10 L gives 1.00 atm. This formula lets you predict any unknown pressure or volume as long as temperature stays fixed.

What must stay constant for Boyle's law?

Temperature and the amount of gas must stay constant. Boyle's law only applies when neither changes during the process. If the temperature changes, use the combined gas law instead, because Boyle's law no longer gives accurate results when thermal expansion or contraction is involved.

If pressure triples, what happens to volume?

It falls to a third. Because pressure and volume are inversely proportional, tripling pressure cuts volume by a factor of three. For example, 6 L at 1 atm becomes 2.00 L at 3 atm. This direct inverse relationship is the core of Boyle's law and makes the calculation straightforward.

Do I need absolute pressure for Boyle's law?

Yes. Gauge pressure must be converted to absolute by adding atmospheric pressure before using the formula. Boyle's law depends on the true pressure acting on the gas, not the pressure relative to the surrounding atmosphere. Using gauge pressure directly will give incorrect results in your calculations.

Who discovered Boyle's law?

Robert Boyle published it in 1662. Edme Mariotte found it independently in France, where it is often called the Boyle-Mariotte law. Both scientists recognized the inverse relationship between pressure and volume at constant temperature, but Boyle's publication came first and is most widely cited.

Does Boyle's law work for liquids?

No. It describes gases. Liquids are nearly incompressible, so their volume barely responds to pressure. Boyle's law assumes the substance can expand and contract significantly when pressure changes, which is true for gases but not for liquids. Use other methods for liquid pressure calculations.

Sources

Related calculators

Charles's Law Calculator
V₁/T₁ = V₂/T₂ with the Celsius-to-kelvin conversion handled for you — find a heated gas's new volume, or the temperature a target volume needs.
Combined Gas Law Calculator
P1V1/T1 = P2V2/T2 solved for final pressure, volume or temperature — with the Celsius-to-kelvin conversion done for you, because that is where gas-law homework goes wrong.
Ideal Gas Law Calculator
PV = nRT solved for whichever variable is missing — pressure, volume, moles or temperature — in kPa, litres, moles and kelvin.
Pressure Calculator
Pressure from force and area — or the hydrostatic pressure at depth in water and other fluids — in pascals, kPa, bar, psi and atmospheres.