Skip to content

Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles or temperature in common units.

Pressure
Volume
Amount
Temperature

Calculated on your device. Nothing you enter is sent anywhere.

Volume

1,018.2862 L

40.8 mol of an ideal gas at 298.15 K and 0.98026316 atm takes up 1,018.2862 litres.

Pressure (atm)
0.98026316
Pressure (kPa)
99.325164
Volume (L)
1,018.2862
Amount (mol)
40.8
Temperature (K)
298.15

In short

The ideal gas law links the pressure P, volume V, amount n and absolute temperature T of a gas: PV = nRT, where R is the gas constant, 8.314 kPa·L per mole per kelvin. Temperature must be in kelvin, so 25 °C is 298.15 K. At 0 °C and 1 atm one mole of ideal gas fills about 22.4 litres.

How it works

Ideal gas law

PV = nRT R = 8.314462618 kPa·L/(mol·K) = 0.0820574 L·atm/(mol·K)

T is the absolute temperature: K = °C + 273.15. Real gases follow this law closely at ordinary temperatures and pressures; at high pressure or near condensation, molecules’ size and attraction make them deviate. OpenStax Chemistry uses R = 0.08206 and rounds temperatures to whole kelvins, so its answers can differ slightly in the last digit.

Worked examples

655 g of methane (40.8 mol) at 25 °C and 745 torr

V = nRT ÷ P = 1,018.2862 L, about 269 US gallons. OpenStax Example 9.9 gives 1.02 × 10³ L.

Open this example in the calculator

2,520 mol of hydrogen in a 180 L tank at 27 °C

P = nRT ÷ V = 349.38203 bar, which OpenStax rounds to 350 bar.

Open this example in the calculator

One mole at 0 °C and 1 atm

V = 1 × 8.314 × 273.15 ÷ 101.325 = 22.41397 L, the standard molar volume of about 22.4 L.

Open this example in the calculator

Using this calculator well

  • Always use kelvin inside the formula. Using °C directly gives nonsense, and at 0 °C would mean zero volume.
  • Grams to moles: divide the mass by the molar mass first, e.g. 655 g of CH₄ ÷ 16.04 g/mol = 40.8 mol.
  • Gauge pressure from a tyre or tank gauge reads above atmospheric; add about 1 atm (14.7 psi) to get the absolute pressure the law needs.

Frequently asked questions

What is R in PV = nRT?

R is the gas constant, 8.314462618 J per mole per kelvin, exact since the 2019 SI redefinition. Its numerical value depends on the units: 8.314 kPa·L/(mol·K), 0.08206 L·atm/(mol·K) or 62.36 L·torr/(mol·K).

What volume does one mole of gas occupy?

At 0 °C and 1 atm, about 22.414 litres. At 0 °C and 1 bar, the newer IUPAC standard pressure, it is about 22.711 litres, and at 25 °C and 1 atm about 24.465 litres.

Why must temperature be in kelvin?

The law needs a scale that starts at absolute zero, where an ideal gas would have no pressure. The Celsius and Fahrenheit zeros are arbitrary, so doubling a Celsius temperature does not double the volume, but doubling a kelvin temperature does.

When is the ideal gas law not accurate?

At high pressures and low temperatures, when molecules are close together. Their own volume and the attractions between them then matter, and equations such as van der Waals’ are used instead. Near room temperature and atmospheric pressure, most common gases behave very nearly ideally.

Sources and methodology

  1. Chemistry 2e, 9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law, OpenStax, Rice University, PV = nRT, R = 0.08206 L atm/(mol K) = 8.314 kPa L/(mol K); STP 273.15 K and 1 atm, about 22.4 L/mol; Example 9.9: 40.8 mol at 298 K and 0.980 atm → 1.02 × 10³ L; check: 2520 mol H₂ at 27 °C in 180 L → 350 bar (accessed November 24, 2026)
  2. CODATA Value: molar gas constant, National Institute of Standards and Technology, R = 8.314 462 618… J mol⁻¹ K⁻¹ (exact, 2022 CODATA) (accessed November 24, 2026)
  3. NIST Guide to the SI (Special Publication 811), Appendix B.8: Factors for Units Listed Alphabetically, National Institute of Standards and Technology, atmosphere = 101.325 kPa; bar = 100 kPa; torr = 101.325/760 kPa; psi = 6.894757 kPa (accessed November 24, 2026)

Rounding: Uses the exact gas constant R = 8.314462618 J/(mol·K). Results keep 12 significant digits and are shown to 8.

Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.

Changelog
  • 1.0.0 · November 24, 2026: First published.

How we build and test calculators

Embed this calculator on your site

Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.

<iframe src="https://northcalculator.com/embed/en/ideal-gas" title="Ideal Gas Law Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>