Ideal gas law calculator
Pick the unknown, fill in the other three quantities with the units you prefer, and read the answer. The box for the quantity you solve for is ignored. The calculator uses R = 8.314462618 J/(mol·K) and treats the gas as ideal.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Choose the unknown: pressure, volume, amount or temperature.
- Fill in the other three values and choose their units.
- The result appears in the unit you chose for it. The list also shows the absolute temperature in kelvin.
How it works
Everything is converted to pascals, cubic metres, moles and kelvin, then solved with P = nRT/V, V = nRT/P, n = PV/(RT) or T = PV/(nR), and converted back. 1 atm = 101,325 Pa exactly, 1 bar = 100,000 Pa, 1 mmHg = 101,325/760 Pa and 1 L = 0.001 m³.
Worked example
1 mol at 0 °C and 1 atm: V = 1 × 8.314462618 × 273.15 ÷ 101,325 = 0.022414 m³ = 22.414 L.
Tips
- Gauge pressure (such as tyre pressure) must be turned into absolute pressure first by adding the ambient pressure.
- Round only at the end; the calculator keeps full precision internally.
Frequently asked questions
What is the ideal gas law?
PV = nRT: pressure times volume equals the amount of gas in moles times the gas constant times the absolute temperature. It describes a gas whose particles do not attract each other and take up no volume.
What value of R does it use?
R = 8.314462618 J/(mol·K), which is the Avogadro constant times the Boltzmann constant. Both are exact in the SI since 2019. The same value is 0.082057 L·atm/(mol·K), but you do not need to convert since the calculator handles the units.
Why must temperature be in kelvin?
The law relies on absolute temperature, which starts at zero at absolute zero. You can enter °C or °F and the calculator converts them (K = °C + 273.15), but a result with zero or negative kelvin is impossible, so it gives an error.
How accurate is it for real gases?
It is a good approximation at low pressure and high temperature. At high pressures or near the point where the gas condenses, real gases deviate and you would need a model such as van der Waals.
What is the volume of 1 mole at standard conditions?
At 0 °C (273.15 K) and 1 atm (101,325 Pa) the ideal gas occupies about 22.414 litres per mole. That is the default example here.