This ideal gas law calculator solves PV = nRT for any one variable — pressure, volume, amount of gas or temperature. Enter the three you know and get the fourth, in the units chemistry and physics problems actually use.
What Is the Ideal Gas Law?
The ideal gas law, PV = nRT, links a gas’s pressure, volume, amount and temperature in one equation. It merges Boyle’s law (pressure × volume is constant), Charles’s law (volume ∝ temperature) and Avogadro’s law (volume ∝ moles) — and it predicts gas behavior remarkably well at ordinary temperatures and pressures. This calculator sits in our Physics Calculators and Chemistry Calculators collections, because both fields live on it.
Worked Example (Verified)
One mole of gas at 298 K (25 °C) in a 24.45 L container: P = nRT ÷ V = (1 × 0.082057 × 298) ÷ 24.45 = 1.00 atm. That 24.45 L is no accident — it is the molar volume of an ideal gas at room temperature and pressure (at 0 °C it is the famous 22.4 L at STP). Try it above: change T to 273.15 and V to 22.4 and the pressure stays 1 atm.
The Gas Constant R — Pick the Right Units
| R value | Use when pressure is in… |
|---|---|
| 0.082057 L·atm/(mol·K) | atm, volume in liters (this calculator) |
| 8.314 J/(mol·K) | pascals (SI), volume in m³ |
| 62.364 L·mmHg/(mol·K) | mmHg / torr |
| 0.08314 L·bar/(mol·K) | bar |
Two rules that prevent 90% of gas-law mistakes: temperature is always kelvin, and the R you choose must match your pressure and volume units.
When “Ideal” Breaks Down
Real gases deviate at high pressure and low temperature, where molecules’ own volume and attractions stop being negligible (the van der Waals equation patches this). For homework, weather, scuba estimates and most engineering at near-ambient conditions, PV = nRT is accurate to a percent or better. To turn moles into grams for a real gas sample, pair the result with our Molar Mass Calculator.
Related Tools
- Molar Mass Calculator — moles ↔ grams
- Density Calculator — mass per volume
- Physics Calculators — the full collection
Frequently Asked Questions
What does each letter in PV = nRT mean?
P = pressure, V = volume, n = moles of gas, R = the gas constant, T = absolute temperature in kelvin.
Why must temperature be in kelvin?
Because the law is proportional to absolute temperature. 25 °C must be entered as 298 K — using 25 would understate temperature twelvefold.
What is STP?
Standard temperature and pressure: 0 °C (273.15 K) and 1 atm in the classic definition, where one mole of ideal gas occupies 22.4 L.
How do I find moles from pressure and volume?
n = PV ÷ (RT). Choose “Amount (n)” in the calculator — for example, 2 atm in 10 L at 300 K is 0.813 mol.
Does the ideal gas law work for water vapor or steam?
Approximately, away from condensation. Near the boiling point, deviations grow — that is also why dew and steam tables exist.
Is this ideal gas law calculator free?
Yes — free, instant, no sign-up.