Skip to content
Toolcroft

Ideal Gas Law Calculator - PV = nRT Solver

Science & Engineering

Solve PV = nRT for pressure, volume, moles, or temperature with atm, Pa, kPa, bar, mmHg, torr, psi, L, mL, m³, K, °C, and °F.

Your inputs are saved in this browser only. No data is ever sent to a server, and saved values won't be visible in other browsers or devices.

Leave exactly one field blank - it will be solved from the other three using PV = nRT.

Try a preset:

PV = nRT - what it means

pistonP ↓VTnPV = nRT

Increasing T (heat) pushes the piston up (↑V or ↑P). Squeezing the piston (↓V) raises P or T.

How to use this tool

  1. Leave exactly one of pressure, volume, moles, or temperature blank, or choose a classroom preset.
  2. Enter the other three values and choose each value’s unit.
  3. Read the live answer, equivalent units, and generated calculation steps.

The ideal gas law

PV = nRT relates pressure (P), volume (V), amount of substance (n), and absolute temperature (T). Leave one variable blank to rearrange the equation and solve for it. The calculator converts pressure to atmospheres, volume to liters, and temperature to kelvin before applying R = 0.082057 L·atm/(mol·K); the answer is then converted to the selected unit. Moles are entered in mol.

  • P - absolute pressure (atm, Pa, kPa, bar, mmHg, torr, or psi)
  • V - volume (L, mL, or m³)
  • n - amount of substance (mol)
  • R - calculator value 0.082057 L·atm/(mol·K)
  • T - absolute temperature (K, °C, or °F; must be above 0 K)

Presets demonstrate one-mole molar volumes at STP (0°C and 1 atm), NTP (20°C and 1 atm), and SATP (25°C and 1 bar), plus one mole at 25°C and 1 atm. For example, at 20°C and 1 atm the selected calculator constant gives about 24.055 L/mol. These named conditions are conventions; a class or laboratory may define a standard differently, so check the pressure and temperature before comparing results from different references.

Ideal vs. real gas

The ideal gas model assumes two things that are never perfectly true: (1) gas molecules have no volume, and (2) there are no intermolecular attractive or repulsive forces. Real gases deviate most at high pressures (molecules are crowded together) and low temperatures (molecules move slowly and attractions become significant). The van der Waals equation corrects for both:

(P + a·n²/V²)(V − n·b) = nRT

where a accounts for intermolecular attractions and b accounts for the volume of the molecules themselves. For most engineering and chemistry calculations near ambient conditions, the ideal gas approximation is accurate to within 1–2%.

Gas constant R in different units

R has the same physical value whichever compatible unit system is used. The reference equivalents below are rounded for display. This calculator consistently uses R = 0.082057 L·atm/(mol·K), so its answers and worked steps use that value even when a pressure, volume, or temperature is entered in a different unit.

Reference value (rounded)UnitsPressure unitCalculator use
8.314462618J/(mol·K)PaReference equivalent
0.082057366L·atm/(mol·K)atmUses 0.082057 (6 decimal places)
0.083144626L·bar/(mol·K)barReference equivalent
62.363598L·mmHg/(mol·K)mmHg or torrReference equivalent

Standard temperature and pressure (STP)

At STP (0°C, 1 atm), one mole of an ideal gas occupies about 22.414 L using the calculator’s R. This is the molar volume under those conditions and provides a quick reasonableness check for a near-ambient gas calculation.

STP vs. NTP vs. SATP

StandardTemperaturePressureMolar volume
STP (IUPAC 1982)0°C (273.15 K)1 atm (101.325 kPa)22.414 L/mol
NTP (Normal)20°C (293.15 K)1 atm24.055 L/mol
SATP (IUPAC 1982+)25°C (298.15 K)1 bar (100 kPa)24.789 L/mol

Note: IUPAC updated the definition of STP in 1982 to use 1 bar rather than 1 atm. Many textbooks still use the older 1 atm definition. Always check which standard applies when comparing molar volumes across sources.

Selectable units are converted to L, atm, and K before solving. For example, 760 mmHg and 14.6959 psi are both about 1 atm; 1 m³ is 1,000 L; and 32°F is 273.15 K. After solving, the calculator reports equivalent values in the other units for the solved pressure, volume, or temperature. Those extra displays are conversions of the same result, not independent measurements.

Frequently asked questions

What is the ideal gas law?

PV = nRT relates an ideal gas’s pressure (P), volume (V), amount (n), and absolute temperature (T). R is approximately 0.082057366 L·atm/(mol·K); this calculator uses the rounded value 0.082057 L·atm/(mol·K).

What units does this calculator use?

Enter pressure in atm, Pa, kPa, bar, mmHg, torr, or psi; volume in L, mL, or m³; and temperature in K, °C, or °F. Values are normalized to L, atm, and K and solved with R = 0.082057 L·atm/(mol·K), then the answer is converted to the selected unit.

Browse all science & engineering