Gas Laws Calculator — Boyle's, Charles's, Gay-Lussac's & Ideal Gas Law

Solve all common gas law equations. Supports pressure, volume, temperature unit conversion.

  • Ideal Gas Law PV=nRT
  • Boyle's & Charles's
  • Combined gas law
  • Browser-only
Solve for:

Volume V: 0.0224127 m³

About the Gas Laws Calculator

Solves the ideal gas law (PV = nRT) and the two-state laws: Boyle's, Charles's, Gay-Lussac's and the combined gas law. Every field has its own unit menu: Pa, kPa, atm, bar or mmHg for pressure, m³, L, mL or cm³ for volume, and K or °C for temperature. The calculator converts to SI internally, so you never have to choose a value of R or convert Celsius to Kelvin yourself.

How to use the Gas Laws Calculator

  1. Pick a law: Ideal Gas PV=nRT, Boyle's, Charles's, Gay-Lussac's or Combined.
  2. Under Solve for, choose the unknown: P, V, T or n for the ideal gas law, or P₂, V₂ or T₂ for the others.
  3. Enter each known value and set its unit menu. Each field can use a different unit.
  4. For the ideal gas law, set Result unit to the unit you want the answer in. For the two-state laws, the answer uses the unit chosen next to that quantity.
  5. Read the result, rounded to 6 significant figures.

Worked example: combined gas law, heating and compressing 2.0 L of air

A gas fills 2.0 L at 25 °C and 1 atm. It is heated to 100 °C and compressed to 1.5 atm. What is its new volume? Choose Combined, solve for V₂, and enter P₁ = 1 atm, V₁ = 2 L, T₁ = 25 °C, P₂ = 1.5 atm, T₂ = 100 °C, with the V₂ unit set to L.

Formula
P₁V₁ / T₁ = P₂V₂ / T₂   so   V₂ = P₁V₁T₂ / (T₁P₂)
Substituted (temperatures in kelvin)
T₁ = 25 + 273.15 = 298.15 K
T₂ = 100 + 273.15 = 373.15 K
V₂ = (1 atm x 2 L x 373.15 K) / (298.15 K x 1.5 atm)
V₂ = 1.66873 L
Ideal gas check: 1 mol at 0 °C, 1 atmValue
InputsP = 101325 Pa, T = 273.15 K, n = 1
V = nRT / P1 x 8.314 x 273.15 / 101325
Result0.0224127 m³ (22.4127 L)

The laws and every variable

P is absolute pressure, V is volume, T is absolute temperature in kelvin, n is the amount of gas in moles and R is the gas constant. The calculator uses R = 8.314 J/(mol·K) with P in Pa and V in m³. Boyle's law (P₁V₁ = P₂V₂) holds T and n fixed. Charles's law (V₁/T₁ = V₂/T₂) holds P and n fixed. Gay-Lussac's law (P₁/T₁ = P₂/T₂) holds V and n fixed. The combined law relates two states of the same amount of gas when all three change. If you solve by hand, the value of R must match your units:

R valueUnits it goes with
8.314 J/(mol·K)P in Pa, V in m³ (what this calculator uses)
8.314 L·kPa/(mol·K)P in kPa, V in L
0.08206 L·atm/(mol·K)P in atm, V in L
0.08314 L·bar/(mol·K)P in bar, V in L
62.36 L·mmHg/(mol·K)P in mmHg (torr), V in L

Unit pitfalls that give wrong answers

  • Celsius in a ratio: warming a gas from 10 °C to 20 °C does not double its volume. In kelvin it goes from 283.15 K to 293.15 K, an increase of only 3.5%. Doing the ratio by hand in Celsius gives a factor of 2. Selecting °C in this calculator is safe because it adds 273.15 before computing.
  • Gauge vs absolute pressure: tire and tank gauges show pressure above the atmosphere. Add 101.325 kPa before using a gauge reading. Take a tire at 220 kPa gauge and 15 °C. At 35 °C the absolute pressure rises from 321.325 kPa to 343.628 kPa, which reads as 242.3 kPa on the gauge. If you plug the gauge value straight in, you get 235.3 kPa, which is wrong.
  • Fahrenheit and psi are not in the menus. Convert them first with the unit converter: °F to °C, or psi to kPa (1 psi = 6.895 kPa).
  • Absolute zero: a temperature of 0 K (-273.15 °C) gives no result, since every gas law divides by T.

The gas laws and their applications

The ideal gas laws model the behavior of gases under varying pressure, temperature, and volume. Real gases deviate from ideal behavior at very high pressures or very low temperatures, but the ideal gas equations are accurate enough for most chemistry and engineering calculations at standard conditions.

Boyle's law explains why a balloon shrinks in cold temperatures and expands at altitude (lower atmospheric pressure). Charles's law explains why a hot air balloon rises — heated air expands at constant pressure, lowering its density. Gay-Lussac's law explains why tire pressure increases when driving (constant volume, rising temperature).

Temperature scales: always use Kelvin

Gas law calculations require absolute temperature in Kelvin. Using Celsius or Fahrenheit directly gives wrong results because those scales have arbitrary zero points. Kelvin starts at absolute zero (the coldest possible temperature), so ratios of Kelvin temperatures are physically meaningful. To convert: K = C + 273.15.

Verification: at standard conditions (STP: 0 degrees C = 273.15 K, 101325 Pa), one mole of ideal gas occupies 22.414 liters. PV = nRT: 101325 times V = 1 times 8.314 times 273.15, so V = 0.02241 m^3 = 22.41 L. This is a useful check for any gas law calculation.

Gas Laws Calculator: frequently asked questions

What is Boyle's law?
Boyle's law states that at constant temperature, the pressure and volume of a gas are inversely proportional: P1 times V1 = P2 times V2. Doubling the pressure halves the volume.
What is Charles's law?
Charles's law states that at constant pressure, the volume of a gas is directly proportional to its absolute temperature: V1/T1 = V2/T2. Temperature must be in Kelvin (K = Celsius + 273.15).
What is the ideal gas law?
PV = nRT, where P is pressure (Pa), V is volume (m^3), n is moles, R is 8.314 J/(mol K), and T is temperature (K). For an ideal gas, this equation relates all four state variables.
How does the combined gas law differ from the ideal gas law?
The combined gas law (P1V1/T1 = P2V2/T2) relates the same gas under two different conditions without needing the mole count. The ideal gas law (PV = nRT) applies to one set of conditions and requires knowing the number of moles.