Free online calculators & unit converters — no sign-up needed.
Free calculators & converters, with plain-English explanations.
Home › Chemistry › Ideal Gas Law Calculator - PV = nRT

Ideal Gas Law Calculator - PV = nRT

Quick answer: The ideal gas law is PV = nRT: pressure × volume = moles × gas constant × absolute temperature. Choose which variable to solve for, enter the other three with their units, and get the answer instantly.

Last reviewed: September 2026

Key facts

  • PV = nRT — pressure × volume = moles × R × absolute temperature.
  • Temperature must always be in kelvin — the #1 student mistake is using °C directly.
  • R = 0.082057 L·atm/(mol·K) when P is in atm and V in litres.
  • At STP (273.15 K, 1 atm), one mole of gas occupies 22.414 L.

This free ideal gas law calculator solves PV = nRT for pressure, volume, moles or temperature. Enter any three values with their units and get the fourth instantly, with automatic kelvin, atm and litre conversions built in. Perfect for chemistry homework and lab work.

Essential for chemistry students, lab work and exam practice. The tool shows the rearranged formula it used, so every answer doubles as a worked solution.

How to use

  1. Pick the variable to solve for (P, V, n or T).
  2. Enter the other three values and choose each unit (atm/kPa/Pa/bar/psi/mmHg, L/mL/m³, mol/mmol, K/°C/°F).
  3. Read the answer, shown with the formula used and the R value.
  4. Temperatures convert to kelvin automatically — no manual conversion needed.

The ideal gas law, rearranged

PV = nRT
FindFormulaWhen to use
PP = nRT ÷ VPressure in a sealed container at known T.
VV = nRT ÷ PVolume a gas sample occupies at given conditions.
nn = PV ÷ RTAmount of gas in a container (convert grams first if given mass).
TT = PV ÷ nRTemperature needed for a target pressure. Answer is in kelvin.

Worked examples

Pressure of 2 mol in 10 L at 300 K

P = nRT ÷ V = (2 × 0.082057 × 300) ÷ 10 = 49.234 ÷ 10 = 4.92 atm.

About five atmospheres — reasonable for a sealed vessel well above room conditions.

Moles in 22.4 L at STP (1 atm, 273.15 K)

n = PV ÷ RT = (1 × 22.4) ÷ (0.082057 × 273.15) = 22.4 ÷ 22.414 = 1.00 mol.

This confirms the STP molar volume: one mole occupies ~22.4 litres.

Gas constant R in common units

R valueUse with
0.082057 L·atm/(mol·K)atm and litres
8.314 J/(mol·K)Pa and m³
0.08314 L·bar/(mol·K)bar and litres
62.364 L·mmHg/(mol·K)mmHg and litres

Frequently asked questions

Why must temperature be in kelvin?

The gas law uses ratios of absolute temperature — 0 K means zero molecular motion. Celsius has an arbitrary zero, so using °C directly gives wildly wrong answers. Always add 273.15 to convert °C to K.

How do I choose the right R value?

Match R to your pressure and volume units: 0.082057 L·atm/(mol·K) for atm and litres, 8.314 J/(mol·K) for pascals and cubic metres. This calculator handles the pairing automatically.

What is STP and why does it matter?

Standard temperature and pressure (273.15 K, 1 atm) is a reference point: one mole of any ideal gas occupies 22.414 L there. Use it as a sanity check — if your answer is far from STP proportions, recheck units.

When does the ideal gas law break down?

At very high pressures or very low temperatures, real gases deviate because molecules interact and occupy space. Near room conditions it is accurate for most gases; for extreme conditions use the van der Waals equation instead.

How do I solve it if I am given grams, not moles?

Convert mass to moles first: n = mass ÷ molar mass. For example, 5.85 g of NaCl (molar mass 58.44 g/mol) is 0.100 mol. Then use PV = nRT normally.

Sources

  • OpenStax — Chemistry: the ideal gas law and kinetic theory
  • NIST — Fundamental physical constants including R

Key takeaways

  • PV = nRT; solve for any one variable from the other three.
  • Always use kelvin for temperature — never °C directly.
  • Match R to your pressure/volume units.
  • STP molar volume (22.414 L/mol) is a quick sanity check.

Explore more tools

Chemistry tools  |  All calculators  |  More tools

Related tools

Comments

Leave a comment