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.
Leave exactly one field blank - it will be solved from the other three using PV = nRT.
PV = nRT - what it means
Increasing T (heat) pushes the piston up (↑V or ↑P). Squeezing the piston (↓V) raises P or T.
How to use this tool
- Leave exactly one of pressure, volume, moles, or temperature blank, or choose a classroom preset.
- Enter the other three values and choose each value’s unit.
- 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) | Units | Pressure unit | Calculator use |
|---|---|---|---|
| 8.314462618 | J/(mol·K) | Pa | Reference equivalent |
| 0.082057366 | L·atm/(mol·K) | atm | Uses 0.082057 (6 decimal places) |
| 0.083144626 | L·bar/(mol·K) | bar | Reference equivalent |
| 62.363598 | L·mmHg/(mol·K) | mmHg or torr | Reference 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
| Standard | Temperature | Pressure | Molar 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 atm | 24.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.
Related tools
- Pressure ConverterConvert pressure into the unit selected beside the gas-law input.
- Volume ConverterPrepare gas volume in the exact unit selected for the equation.
- TemperatureConvert temperature to an absolute scale before solving PV = nRT.
- Molar MassRelate the solved mole amount to the mass of a specific gas formula.