Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Ideal gas law calculator

Solve PV = nRT for any one of pressure, volume, amount of gas or temperature, with unit conversions done for you.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Need moles from grams? Get the molar mass from the molar mass calculator, or work through a reaction with the stoichiometry calculator.

What it does

The ideal gas law ties together the pressure, volume, temperature and amount of a gas. Know any three and you can find the fourth. Use it for chemistry homework, to estimate how much gas is in a cylinder, or to see how pressure changes when a sealed container warms up. The calculator accepts common units for each quantity and converts them before solving.

How it's calculated

P × V = n × R × T
P = nRT ÷ V  ·  V = nRT ÷ P  ·  n = PV ÷ RT  ·  T = PV ÷ nR
R = 8.314 462 618… J/(mol·K) (exact)

P is absolute pressure in pascals, V is volume in cubic meters, n is the amount of gas in moles, and T is the absolute temperature in kelvins (°C + 273.15). Since the 2019 SI redefinition, R is exact: it's the Avogadro constant times the Boltzmann constant. In other units, R ≈ 0.082057 L·atm/(mol·K). The pressure conversions are exact too: 1 atm = 101,325 Pa, 1 bar = 100,000 Pa, and 1 psi = 6,894.757 Pa.

Worked examples

  • Molar volume: 1 mol of gas at 0 °C (273.15 K) and 1 atm (101,325 Pa). V = 1 × 8.314462618 × 273.15 ÷ 101,325 = 0.022414 m3 = 22.414 L. That's the "22.4 L per mole" from chemistry class.
  • A sealed container: 2 mol in 10 L (0.01 m3) at 300 K. P = 2 × 8.314462618 × 300 ÷ 0.01 = 498,868 Pa = 498.87 kPa, about 4.92 atm.
  • Finding the temperature: 1 mol in 25 L at 100 kPa. T = 100,000 × 0.025 ÷ (1 × 8.314462618) = 300.68 K, or 27.53 °C.

Getting a realistic number

  • Always use absolute temperature and pressure. The calculator converts °C and °F to kelvins for you. But a tire gauge reads gauge pressure, which is pressure above the atmosphere. Add about 101.3 kPa (14.7 psi) to get absolute pressure first.
  • Real gases aren't ideal. The law works well for air, nitrogen and oxygen near room conditions. At high pressure (tens of atmospheres or more), or close to the temperature where the gas turns liquid, the real volume can differ noticeably.
  • Which "STP"? Older textbooks use 0 °C and 1 atm (22.414 L/mol). IUPAC's current standard uses 0 °C and 100 kPa (22.711 L/mol). Check which one your course uses.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • 1 mol at 0 °C and 101.325 kPa fills 22.414 L ✓
  • 2 mol in 10 L at 300 K: 498.868 kPa ✓
  • 1 mol in 25 L at 100 kPa: 300.681 K ✓
  • 1 atm, 24.4654 L at 77 °F is 1 mol ✓
  • Below absolute zero is refused ✓
  • A volume of zero is refused ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking cookies, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the ideal gas law?

PV = nRT: pressure × volume = moles × gas constant × absolute temperature. It describes how a gas behaves when its molecules are far apart and don't stick to each other.

What is the value of R?

R = 8.314462618 J/(mol·K), exact since 2019 (CODATA 2022). In liter-atmospheres it's about 0.082057 L·atm/(mol·K).

Why must temperature be in kelvins?

Because the law is built on absolute temperature. At 0 °C a gas still has volume, but at 0 K the ideal law predicts zero. Using °C would give wrong or even negative answers.

What volume does 1 mole of gas take up?

22.414 L at 0 °C and 1 atm, or 24.465 L at 25 °C and 1 atm.

Does the ideal gas law work for all gases?

Approximately, at low pressure and moderate temperature. Real gases deviate at high pressures and low temperatures, where equations like van der Waals do better.

Related calculators