Ideal Gas Law Calculator
Enter the pressure, volume, and temperature of a gas to get the amount of substance in moles — the ideal gas law PV = nRT, rearranged for n.
Moles in one step
Enter pressure, volume, and temperature and the calculator returns the amount of substance n = (P × V) / (R × T) in moles.
Use SI units
Pressure in pascals, volume in cubic metres, and temperature in kelvin keep the gas constant R consistent — convert °C to K by adding 273.15.
What is the ideal gas law?
PV = nRT
The ideal gas law links the pressure, volume, temperature, and amount of a gas in a single equation, PV = nRT, where R is the universal gas constant. It describes how an idealised gas behaves, and it is accurate for most real gases at everyday pressures and temperatures. This calculator rearranges the equation for n, the amount of substance, so you can find how many moles of gas fill a given volume at a known pressure and temperature.
Enter pressure in pascals, volume in cubic metres, and temperature in kelvin to get the amount of substance in moles instantly.
To find the amount of substance, divide the product of pressure and volume by the product of the gas constant and the absolute temperature.
n = (P × V) ÷ (R × T)The gas constant R = 8.314462618 J/(mol·K) is fixed, so once you supply pressure (P), volume (V), and temperature (T) in SI units, the moles follow directly. Use pascals, cubic metres, and kelvin and the answer comes back in moles.
Suppose a gas is at standard temperature and pressure: 101,325 Pa, 0.0224 m³ (22.4 L), and 273.15 K (0 °C).
Multiply pressure by volume
101325 × 0.0224 = 2269.68 — the numerator P × V in joules.
Multiply R by temperature
8.314462618 × 273.15 ≈ 2271.10 — the denominator R × T.
Divide
2269.68 ÷ 2271.10 ≈ 0.999377 mol — almost exactly one mole, the classic STP result that one mole of gas occupies 22.4 litres.
The ideal gas law is a model, and it is worth keeping its assumptions in mind.
Ideal behaviour and consistent units
This calculator assumes an ideal gas — point particles with no attractions — which is accurate at moderate pressures and temperatures but drifts at very high pressure or near a gas's condensation point, where the van der Waals equation does better. Keep your units consistent: pascals for pressure, cubic metres for volume, and kelvin for temperature, or the moles will be wrong. Temperature must be the absolute value in kelvin, never Celsius.