Skip to content
Tool · Chemistry

Ideal gas law calculator (PV = nRT)

Pick the unknown, type the other three in the units you have, and read the answer with the working. Switch to the combined gas law for a sealed gas that is heated, cooled or squeezed.

Pick what to solve for, then type the other values
Solve for
mol
Volume22.414 L
Absolute pressure1 atm
Molar volume22.41 L/molvolume of one mole here
Nitrogen speed493 m/srms speed of N₂ at this temperature
Working

R = 8.314462618 J/(mol·K), exact (NIST CODATA 2022). Pressure conversions from NIST SP 811.

One equation, four quantities

Pressure times volume equals the amount of gas times the gas constant times the absolute temperature. Know any three and the fourth follows.

PV = nRT

Kelvin, always

The law only works with absolute temperature and absolute pressure. Add 273.15 to Celsius, and add one atmosphere to a gauge reading.

T = t + 273.15 K

Same gas, new conditions

For a sealed amount of gas, nR cancels, which leaves the combined gas law. Boyle's and Charles's laws are its special cases.

P1V1 ÷ T1 = P2V2 ÷ T2

How do you use the ideal gas law?

Write PV = nRT, put every quantity in SI units (pascals, cubic metres, moles, kelvin) and rearrange for the one you do not know. One mole of any ideal gas at 0 °C and 1 atm fills 22.414 L; at 25 °C it fills 24.465 L. The gas constant R is 8.314462618 J/(mol·K), an exact value since the 2019 SI.

The calculator accepts pressure in Pa, kPa, atm, bar, mmHg or psi, volume in L, mL or m³ and temperature in °C, °F or K, converts everything for you and shows each step. Its combined gas law mode handles the classic before-and-after problems, including gauge pressures, which is the trap behind why tyre pressure rises on a hot day.

Key results from the calculator

  • Molar volume: 22.414 L/mol at 0 °C and 1 atm, 22.711 L/mol at the IUPAC standard of 0 °C and 100 kPa, and 24.465 L/mol at 25 °C and 1 atm.
  • A tyre at 32 psi on a 15 °C morning reads 35.2 psi at 35 °C, about 0.9 psi for every 10 °F, because the law works on the absolute pressure of 46.7 psi.
  • A 12 L scuba cylinder at 200 bar holds 98.5 mol of gas, enough to fill about 2,370 L at sea-level pressure.
  • Temperature must be in kelvin. Doubling 10 °C to 20 °C raises the absolute temperature by only 3.5%, and the volume of a gas at constant pressure rises by the same 3.5%, not 100%.

Eight setups people ask about

Each section gives the numbers the calculator shows and a button that loads the setup on the cylinder.

The volume of one mole of gas at 0 °C and 1 atm

Solve for V

V = nRT ÷ P = 1 × 8.3145 × 273.15 ÷ 101,325 = 0.022414 m³, which is 22.414 L. That is the famous 22.4 L per mole, the same for nitrogen, helium or carbon dioxide as long as the gas behaves ideally.

Be careful with "STP". IUPAC now uses 100 kPa (1 bar) as standard pressure, not 1 atm, which gives 22.711 L/mol. Many textbooks still use 1 atm. The calculator lets you pick either by typing the pressure in the unit you need.

At 1 atm 22.414 L At 100 kPa 22.711 L N₂ speed 493 m/s

The volume of one mole at room temperature

Solve for V

Warming the same mole from 0 °C to 25 °C raises the absolute temperature from 273.15 K to 298.15 K, a 9.15% increase, so the volume grows to 24.465 L.

Chemists use 24.5 L/mol as the quick room-temperature figure for gas stoichiometry. Note how a 25 degree change on the Celsius scale is only a 9% change in what the gas actually responds to.

Volume 24.465 L Temperature 298.15 K

How many moles of helium in a party balloon?

Solve for n

An 11 inch latex balloon holds roughly 14 L. At 1 atm and 20 °C, n = PV ÷ RT = 101,325 × 0.014 ÷ (8.3145 × 293.15) = 0.582 mol. At 4.0026 g/mol for helium that is 2.3 g of gas.

The rubber squeezes the gas a little above atmospheric pressure, by a few percent at most, so the true amount is slightly higher. That is well inside the uncertainty of the balloon's size.

Amount 0.582 mol Helium mass 2.3 g

How much air is in a scuba tank?

Solve for n

A common 12 L steel cylinder is filled to 200 bar. At 20 °C the ideal gas law gives 98.5 mol. Released at 1 atm and the same temperature it would fill about 2,370 L, which is why divers describe tanks by "free air" volume.

At 200 bar, air is no longer quite ideal: its molecules take up space and attract each other, and the real amount differs from the ideal estimate by a few percent. The calculator flags anything above 10 atm for this reason.

Amount 98.5 mol Free gas at 1 atm 2,370 L

A car tyre on a hot afternoon

Combined law, gauge pressure

Set to 32 psi on a 15 °C morning, a tyre that warms to 35 °C reads 35.2 psi, if its volume stays the same. The calculation must use absolute pressure: 32 psi on the gauge is 46.7 psi absolute, scaled by 308.15 ÷ 288.15, minus the atmosphere again.

Using the gauge reading directly would give 34.2 psi, and using Celsius would give 74.7 psi, both wrong. The full explanation is in why tyre pressure rises on a hot day.

Morning 32 psi at 15 °C Afternoon 35.2 psi at 35 °C Rise 0.9 psi per 10 °F

Why the tyre warning light comes on in the first frost

Combined law, gauge pressure

A tyre filled to 32 psi in a 25 °C garage reads 27.3 psi at −5 °C. Nothing leaked; the gas simply has less thermal energy, so it pushes less on the walls.

US rules (FMVSS 138) make tyre pressure monitors warn when a tyre is 25% below the recommended cold pressure, so a tyre already a little low goes over the edge on the first cold morning. Check pressures cold, before driving, and set them to the placard on the door frame.

Garage 32 psi at 25 °C Frosty morning 27.3 psi at −5 °C

Boyle's law: squeezing a sealed syringe

Combined law, constant T

Seal 60 mL of air at 1 atm in a syringe and push the plunger to 20 mL without letting it warm up. With T unchanged, P₁V₁ = P₂V₂, so the pressure triples to 3 atm.

That is Boyle's law, the constant temperature case of the combined law. Push fast and the gas warms as you compress it, so the pressure briefly goes higher than three atmospheres until the heat leaks away.

Before 60 mL at 1 atm After 20 mL at 3 atm

Charles's law: a balloon dipped in liquid nitrogen

Combined law, constant P

A 5 L balloon at 20 °C cooled to −196 °C (77.15 K) at constant pressure shrinks to 1.32 L by the ideal law. Temperature falls by a factor of 3.8, and so does the volume.

In the real demonstration the balloon goes flatter still, because oxygen in the air condenses to a liquid at that temperature (it boils at 90 K), and the ideal law no longer describes a gas that has turned into liquid.

Before 5 L at 20 °C After 1.32 L at −196 °C

Molar volume of an ideal gas at common conditions

TemperaturePressureVolume of 1 molWhere it is used
0 °C1 atm22.41 LOlder textbooks, "STP"
0 °C100 kPa22.71 LIUPAC standard pressure
20 °C1 atm24.06 LNTP, lab conditions
25 °C1 atm24.47 LRoom temperature (SATP is 25 °C, 100 kPa)
25 °C100 kPa24.79 LSATP
37 °C1 atm25.45 LBody temperature
100 °C1 atm30.62 LBoiling water
-196 °C1 atm6.331 LLiquid nitrogen temperature (most gases condense)

V = RT ÷ P for one mole, with R = 8.314462618 J/(mol·K). Real gases at these conditions are within about 1% of these values, except near condensation.

How the calculator works

Every input is converted to SI: pressure to pascals (1 atm = 101,325 Pa, 1 bar = 100,000 Pa, 1 mmHg = 133.3224 Pa, 1 psi = 6,894.757 Pa, from NIST Special Publication 811), volume to cubic metres, and temperature to kelvin (K = °C + 273.15).

If you tick gauge readings, one standard atmosphere is added to each pressure before solving and taken off the answer. Tyre gauges, compressor gauges and most cylinder gauges read pressure above the atmosphere, but the gas law needs the absolute pressure.

In PV = nRT mode the chosen unknown is found by rearranging: P = nRT ÷ V, V = nRT ÷ P, n = PV ÷ RT or T = PV ÷ nR. In combined mode the amount of gas is fixed, so nR cancels and P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂ is solved for the final pressure, volume or temperature.

The cylinder draws the piston at the solved volume against a graduated scale, the gauge shows the pressure, and the particles move at a speed proportional to the square root of the absolute temperature, as the root mean square molecular speed √(3RT ÷ M) does. The nitrogen speed readout uses M = 28.014 g/mol.

What the model leaves out

  • Real gas behaviour. The ideal law ignores the size of molecules and the attraction between them. It is within about 1% for air near room conditions but drifts by several percent at hundreds of bar or near the temperature where a gas condenses.
  • Vapour and condensation. Below its boiling point a substance is partly liquid, and the law applies only to the part that is still gas.
  • Changing containers. A tyre or balloon stretches a little as the pressure changes. The combined mode assumes you know the final volume; for a tyre, keeping it constant is a good approximation.
  • Gas mixtures. The law works for a mixture as a whole using the total number of moles, which is why air behaves like a single gas here.

Common misconceptions

"Double the Celsius temperature, double the volume." Only absolute temperature counts. Going from 10 °C to 20 °C is 283.15 K to 293.15 K, a 3.5% rise.

"A tyre at 32 psi has 32 psi of air pushing on it." The gauge shows pressure above the atmosphere. The gas inside is at about 46.7 psi absolute, and that is the number the law uses.

"Heavier gases take up more room." At the same temperature and pressure, a mole of any ideal gas occupies the same volume. A mole of hydrogen and a mole of carbon dioxide both fill about 24.5 L at 25 °C.

Frequently asked questions

What is the value of R in PV = nRT?

R = 8.314462618 J/(mol·K), exact since 2019. In other units it is 0.082057 L·atm/(mol·K) or 8.314 L·kPa/(mol·K). Use the version that matches your pressure and volume units, or convert everything to SI.

What volume does one mole of gas occupy at STP?

22.414 L at 0 °C and 1 atm, the classic 22.4 L. With the current IUPAC standard pressure of 100 kPa it is 22.711 L, and at 25 °C and 1 atm it is 24.465 L.

Do I have to use kelvin in the ideal gas law?

Yes. The law is proportional to absolute temperature, so 0 °C must be entered as 273.15 K. The calculator accepts °C and °F and converts them for you, and it rejects anything at or below absolute zero.

What is the combined gas law?

For a fixed amount of gas, P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂. It comes from PV = nRT with n and R constant. Boyle’s law (constant temperature), Charles’s law (constant pressure) and Gay-Lussac’s law (constant volume) are its special cases.

Should I use gauge or absolute pressure?

Absolute. A tyre gauge reading of 32 psi means 46.7 psi absolute. Tick the gauge box in the calculator and it adds one atmosphere before solving and removes it from the answer.

Keep learning

More simulations

More chemistry and lab tools

See all science tools