Skip to main content

Ideal Gas Law Calculator (PV = nRT)

Choose which variable to find, enter the other three in whatever units you have — pressure in atm, kPa or mmHg; temperature in °C, K or °F — and get the answer with conversions and substitution shown.

PV = nRT

Pressure
Temperature

Gas constant values (choose R to match your units when working by hand):

  • R = 0.082057 L·atm/(mol·K)
  • R = 8.314 L·kPa/(mol·K) (= J/(mol·K))
  • R = 62.364 L·torr/(mol·K)

The equation and its constant

Ideal gas law

PV = nRT

P is pressure, V volume, n moles, T temperature in kelvin, and R the gas constant. R's numeric value depends on your units — 0.0821 L·atm/(mol·K) for atmospheres, 8.314 for kPa. This calculator converts everything to atm/L/K internally, so you never have to pick.

Worked example

What volume does 2.0 mol of gas occupy at 27 °C and 1.5 atm?

  1. Convert: 27 °C = 300.15 K.
  2. V = nRT ÷ P = (2.0 × 0.0821 × 300.15) ÷ 1.5

Answer: ≈ 32.9 L

💡 Tip: Sanity-check answers with the STP landmark: 1 mole of ideal gas ≈ 22.4 L at 0 °C and 1 atm. Two moles near room temperature should be somewhere in the 40–50 L range at 1 atm.

When the ideal gas law breaks down

The law treats molecules as size-less points with no attraction to each other. That's excellent near room conditions (within ~1%) but fails at high pressure (molecules crowd together) and low temperature (attractions dominate — gases liquefy). For schoolwork at ordinary conditions, PV = nRT is the right tool.

⚠ Common mistake: Temperature must be kelvin. Using 25 instead of 298 doesn't just shift the answer — it wrecks it by more than a factor of ten. This calculator converts °C and °F automatically, but on paper the conversion is on you.

Frequently asked questions

Which R value should I use?

Match R to your pressure unit: 0.0821 L·atm/(mol·K) with atm, 8.314 L·kPa/(mol·K) with kPa, 62.36 L·torr/(mol·K) with torr. Here the conversion is automatic.

What is STP?

Standard temperature and pressure — classically 0 °C and 1 atm, where one mole of ideal gas occupies 22.4 L.

Does the law work for gas mixtures?

Yes — use the total moles for n. Each gas also individually obeys the law through its partial pressure (Dalton's law).

Related chemistry tools

Learn the concepts