# Ideal Gas Law Calculator

> Solve the ideal gas law for pressure, volume, amount of gas or temperature, with kPa, bar, atm or psi, litres or m³, and kelvin, °C or °F.

Category: Science & engineering · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/ideal-gas-law-calculator

For an ideal gas, pressure × volume = amount × R × absolute temperature. Enter any three of P, V, n and T to get the fourth.

Also called: PV = nRT calculator, Gas law calculator.

## Inputs
- Solve for (options: Pressure (P), Volume (V), Amount of gas (n), Temperature (T); default volume)
- Pressure (absolute) (default 101.325)
- Pressure unit (options: pascals (Pa), kilopascals (kPa), megapascals (MPa), bar, atmospheres (atm), psi, mmHg; default kpa)
- Volume (default 22.4)
- Volume unit (options: cubic metres (m³), litres (L), millilitres (mL), cubic feet (ft³), cubic inches (in³), US gallons; default l)
- Amount of gas (unit mol; default 1)
- Temperature (default 0)
- Temperature unit (options: K, °C, °F; default c)

## Results
- Result
- Pressure
- Volume
- Amount of gas
- Temperature
- Temperature
- Molar volume
- Number of molecules

## Formula

```
P V = n R T;  R = 8.314462618 J/(mol·K);  T(K) = T(°C) + 273.15
```

Where:
- P: absolute pressure in Pa
- V: volume in m³
- n: amount of substance in mol
- R: molar gas constant, 8.314462618… J/(mol·K), exact in the 2019 SI (N_A × k)
- T: absolute temperature in kelvin

## Worked example
1. T = 0 + 273.15 = 273.15 K; P = 101,325 Pa.
2. V = n R T ÷ P = 1 × 8.314462618 × 273.15 ÷ 101,325 = 0.0224140 m³.
3. That is 22.414 L, matching the CODATA molar volume of an ideal gas at 0 °C and 1 atm (22.41397 L/mol).

**Result:** One mole of an ideal gas at 0 °C and 1 atm occupies 22.414 litres.

## What the result means

Real gases follow the ideal law closely at low pressure and well above their boiling point; air at room conditions deviates by well under 1%. Always use absolute pressure and absolute temperature.

## Assumptions and limits
- Ideal gas: no intermolecular forces and negligible molecular volume.
- At high pressure or near condensation, use a real-gas equation (van der Waals, Peng–Robinson) or a compressibility factor Z.
- Gauge pressure readings must have atmospheric pressure added first.

## Questions

### Why must temperature be in kelvin?

The law is proportional to absolute temperature. Doubling from 10 °C to 20 °C is only a 3.5% rise in kelvin (283.15 to 293.15 K).

### What value of R should I use?

R = 8.314462618 J/(mol·K), which equals 8.314462618 kPa·L/(mol·K) or 0.0820574 L·atm/(mol·K). This calculator converts units for you.

## Sources
- [NIST: Fundamental physical constants (CODATA)](https://physics.nist.gov/)
- [BIPM: The International System of Units (SI)](https://www.bipm.org/)

## Related calculators
- [Pressure Calculator](https://calculators.geekmidst.com/calculators/pressure-calculator)
- [Temperature Converter](https://calculators.geekmidst.com/calculators/temperature-converter)
- [Molarity Calculator](https://calculators.geekmidst.com/calculators/molarity-calculator)
- [Molecular Weight Calculator](https://calculators.geekmidst.com/calculators/molecular-weight-calculator)
- [Gas Density Calculator](https://calculators.geekmidst.com/calculators/gas-density-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/ideal-gas-law-calculator
