Boyle's Law Calculator
Calculate final pressure, final volume, initial pressure, or initial volume of a gas at constant temperature using P₁V₁ = P₂V₂. Includes worked steps, real-world presets, and a labelled piston diagram.
Boyle's Law Piston Diagram
Both gas states are drawn to scale, so the inverse pressure–volume relationship is visible at a glance.
Step-by-Step Boyle's Law Solution
Here's exactly how this answer was calculated, one step at a time.
Given: P₁ = 100 kPa, V₁ = 2 L, P₂ = 200 kPa, V₂ = 1 L
Step 1: Write Boyle's law
For a fixed amount of gas held at constant temperature, pressure and volume always trade off against each other.
P₁V₁ = P₂V₂Step 2: Rearrange for the unknown quantity
P₂ = P₁V₁ / V₂Step 3: Substitute the known values
P₂ = 100 × 2 / 1Step 4: Calculate the missing value
Final pressure = 200 kPa
The Boyle's law result is:
200 kPa
Free Boyle's Law Calculator
This Boyle's Law Calculator works out the final pressure, final volume, initial pressure, or initial volume of a fixed amount of gas held at a constant temperature. Pick which quantity you need, type in the other three values, and the calculator applies P₁V₁ = P₂V₂ instantly. Every result comes with a full rearrangement, a substitution line, a check that the pressure-volume product stays the same in both states, and a scaled piston diagram that shows the compression or expansion visually.
It is built for physics and chemistry students, lab write-ups, quick homework checks, and anyone who wants to understand how a gas behaves when it is squeezed or allowed to expand. Four quick-fill examples, based on a syringe, a scuba tank, a bicycle pump, and a rising weather balloon, let you see real numbers in action without typing anything yourself.
What Is Boyle's Law?
Boyle's law says that the pressure of a fixed amount of gas is inversely proportional to its volume, as long as the temperature does not change. In plain words, squeeze a gas into a smaller space and its pressure goes up; let it spread into a bigger space and its pressure drops. The relationship was described by the Irish scientist Robert Boyle in 1662 and remains one of the first gas laws taught in any chemistry or physics course.
The law only applies to a fixed mass of gas. If gas is added, removed, heated, or cooled during the process, Boyle's law on its own no longer gives an accurate answer, and a different formula such as the combined gas law is needed instead.
Boyle's Law Formula
The Boyle's law formula is P₁V₁ = P₂V₂, where P₁ and V₁ are the pressure and volume of the gas at the starting state, and P₂ and V₂ are the pressure and volume at the final state. Because the product of pressure and volume never changes for this fixed-temperature process, the formula can be rearranged to solve for any one of the four values as long as the other three are known.
The four rearranged forms are P₂ = P₁V₁ / V₂, V₂ = P₁V₁ / P₂, P₁ = P₂V₂ / V₁, and V₁ = P₂V₂ / P₁. This calculator supports all four, which makes it useful not only for the common textbook question of finding a final pressure or volume, but also for working backward to find an unknown starting condition.
Solving for Final Pressure
This is the most common Boyle's law question: a gas starts at a known pressure and volume, gets compressed or expanded to a new volume, and the new pressure needs to be found. The formula becomes P₂ = P₁V₁ / V₂.
For example, a gas at 100 kPa occupying 2 litres is compressed down to 1 litre. Applying the formula gives P₂ = 100 × 2 / 1 = 200 kPa. The volume was cut in half, so the pressure exactly doubled, which is the inverse relationship at the heart of Boyle's law.
Solving for Final Volume
When the final pressure is known instead of the final volume, the formula rearranges to V₂ = P₁V₁ / P₂. This version answers questions like how much room a gas will take up once its pressure has changed.
As an example, a gas at 100 kPa occupying 2 litres expands until its pressure drops to 50 kPa. Then V₂ = 100 × 2 / 50 = 4 litres. Halving the pressure doubled the volume, again showing the same inverse pattern in the opposite direction.
Solving for Initial Pressure
Sometimes the final state is what you measured, and the original starting pressure is the unknown. Rearranging the formula gives P₁ = P₂V₂ / V₁, which is useful for working backward from a lab result to figure out what pressure a gas must have started at.
For instance, if a gas ends up at 150 kPa and 1 litre after starting in a 3-litre container, then P₁ = 150 × 1 / 3 = 50 kPa. The gas began at a lower pressure in a larger space and was compressed into the smaller, higher-pressure final state.
Solving for Initial Volume
In the same way, the initial volume can be found from a known final pressure, final volume, and initial pressure, using V₁ = P₂V₂ / P₁. This mode is helpful when a container's starting size was never recorded but its starting pressure was.
As an example, a gas that finishes at 300 kPa and 2 litres started at 100 kPa. Then V₁ = 300 × 2 / 100 = 6 litres, meaning the gas originally filled a much larger volume before being compressed to a third of its size.
Why Pressure and Volume Are Inversely Related
Gas pressure comes from countless tiny particles colliding with the walls of their container. At a fixed temperature, the average speed and kinetic energy of those particles does not change. What changes is how much space they have to move around in.
Shrink the container and the same number of particles now hit the walls far more often, since there is less distance between collisions. That higher collision frequency is exactly what pressure measures, so pressure rises as volume falls. Let the container expand and the particles travel further between wall hits, so pressure falls as volume rises. Temperature has to stay fixed for this reasoning to hold, since heating or cooling the gas would change how fast the particles move as well.
Real-Life Examples of Boyle's Law
Boyle's law shows up in far more everyday situations than most people realise, and recognising it helps make an otherwise abstract formula feel concrete.
- A medical syringe: pulling the plunger back increases the volume inside, dropping the pressure below atmospheric so liquid or air is drawn in.
- A bicycle pump: pushing the handle down shrinks the air's volume inside the barrel, raising the pressure enough to force air into the tyre.
- Human lungs: the diaphragm expanding the chest cavity lowers the pressure inside the lungs just enough for outside air to rush in.
- An aerosol can: the propellant inside is kept at high pressure in a small, fixed volume, which is why heating a can is dangerous.
- A scuba diver's lungs and equipment: pressure changes constantly with depth, and understanding Boyle's law is part of basic diver safety training.
Boyle's Law and Scuba Diving Safety
Diving is one of the clearest real-world demonstrations of Boyle's law, because water pressure increases quickly with depth. A gas pocket that occupies a certain volume at depth will expand as a diver rises and the surrounding pressure drops, which is exactly why divers are trained to ascend slowly and breathe continuously rather than holding their breath.
This calculator's scuba preset shows a simplified version of that expansion: gas trapped at depth reaches a much larger volume once it reaches the lower pressure at the surface. This is an educational illustration only. Real dive planning depends on certified training, dive tables, and equipment that this calculator does not replace.
Boyle's Law at High Altitude and in Weather Balloons
Atmospheric pressure falls steadily as altitude increases, which is why a sealed gas pocket behaves very differently at sea level compared to high in the sky. A weather balloon filled at ground level starts at roughly 101.325 kPa and keeps expanding as it rises, because the surrounding air pressure keeps dropping while the gas inside is still trying to reach the same pressure as its environment.
This is the same reasoning behind the weather balloon preset on this calculator: a fixed amount of gas that starts small at sea-level pressure ends up occupying several times its original volume once it reaches the much lower pressure found at high altitude. Eventually the balloon's material can no longer stretch further and it bursts, which is exactly what happens to real weather balloons used for atmospheric research.
Units and Problem-Solving Tips
Boyle's law only cares about the ratio between values, so any pressure unit works as long as both P₁ and P₂ use the same one, and any volume unit works as long as both V₁ and V₂ use the same one. This calculator uses kilopascals and litres by default because they are common in classroom problems, and it also converts the pressure result into atmospheres for convenience.
If your original numbers are in a different unit, such as psi, atm, or mmHg for pressure, or millilitres or cubic metres for volume, convert both values in that pair to the same unit before entering them here. A dedicated pressure converter or volume converter tool is the fastest way to do that conversion cleanly before running the Boyle's law calculation.
Common Mistakes When Using Boyle's Law
A few errors come up again and again in Boyle's law homework and lab work, and most of them are easy to avoid once you know to look for them.
- Mixing pressure units between the two states, such as entering P₁ in kPa and P₂ in atm without converting first.
- Using gauge pressure instead of absolute pressure, which matters most in situations close to a vacuum or in diving calculations.
- Applying Boyle's law when the temperature has actually changed, which calls for the combined gas law instead.
- Applying Boyle's law when the amount of gas has changed, such as a leak or an added gas cylinder, which calls for the ideal gas law instead.
- Forgetting that the relationship is inverse, so an increase in one quantity always means a decrease in the other, never an increase in both.
Boyle's Law vs Charles's Law vs the Combined Gas Law
Boyle's law, Charles's law, and the combined gas law are closely related, and knowing which one applies to a given problem saves a lot of confusion. Boyle's law, P₁V₁ = P₂V₂, applies when temperature is constant and only pressure and volume change. Charles's law, V₁/T₁ = V₂/T₂, applies when pressure is constant and only volume and temperature change.
The combined gas law, P₁V₁/T₁ = P₂V₂/T₂, merges both of these into one formula that works even when pressure, volume, and temperature are all changing at once, as long as the amount of gas stays fixed. If a problem mentions a temperature change alongside a pressure or volume change, the combined gas law calculator on this site is the better tool to reach for instead of Boyle's law alone.
When Boyle's Law Does Not Apply
Boyle's law assumes an ideal gas: particles with no real volume of their own and no attraction or repulsion between them. Real gases follow this closely at ordinary pressures and temperatures, but they start to deviate at very high pressure or very low temperature, especially as a gas gets close to condensing into a liquid.
For everyday classroom and laboratory pressures, the ideal-gas assumption behind Boyle's law is a very good approximation. For industrial, medical, or engineering work involving extreme pressures or precise safety margins, a more detailed real-gas model or professional guidance should be used instead of a general calculator like this one.
How to Use This Calculator
Start by choosing which of the four quantities you need to find from the dropdown menu: final pressure, final volume, initial pressure, or initial volume. Then fill in the three values you already know, or click one of the quick-fill example buttons to load a realistic scenario automatically. The result, the ratios, the piston diagram, and the full step-by-step working all update immediately as you type.
This tool is meant for education, revision, and quick estimation. It does not replace professional calculations for pressurised equipment, medical devices, diving safety, or industrial gas systems, all of which need to follow proper engineering standards and certified training rather than a general-purpose web calculator.
Boyle's Law Calculator FAQ Summary
Boyle's law is P₁V₁ = P₂V₂ for a fixed amount of gas at constant temperature. This calculator can solve for any one of the four quantities, includes real-world presets, converts the result into atmospheres alongside kilopascals, and shows the pressure-volume product staying constant in both states as a built-in accuracy check.
Frequently Asked Questions
What is Boyle's law formula?
P₁V₁ = P₂V₂, for a fixed amount of gas at constant temperature.
What must stay constant for Boyle's law to apply?
Temperature and the amount of gas must both stay fixed.
Does pressure increase when volume decreases?
Yes, pressure and volume are inversely proportional in Boyle's law.
Can this calculator find the initial pressure or volume, not just the final ones?
Yes, it has four modes: final pressure, final volume, initial pressure, and initial volume.
Should I use absolute or gauge pressure?
Use absolute pressure for accurate results, especially near vacuum conditions.
What units does this calculator use?
Kilopascals for pressure and litres for volume by default, with the pressure result also shown in atmospheres.
When does Boyle's law not apply?
When temperature or the amount of gas changes, or at very high pressure where real-gas effects appear.
How is Boyle's law used in scuba diving?
It explains why a gas pocket expands as a diver rises and surrounding pressure drops, which is why controlled ascent matters.
What is the difference between Boyle's law and the combined gas law?
Boyle's law only handles pressure and volume at constant temperature; the combined gas law also allows temperature to change.
What is the P × V product used for?
It should stay the same in the initial and final state, so it works as a quick check on your answer.