Free Ideal Gas Law Calculator (PV = nRT)

This Ideal Gas Law Calculator solves the equation PV = nRT for any one unknown quantity — pressure (P), volume (V), amount of substance (n), or temperature (T) — when you supply the other three. The ideal gas law links the four state variables of a gas through a single proportionality constant, the universal gas constant R, and gives a remarkably good description of real gases at low pressures and moderate-to-high temperatures. Enter your known values in consistent SI units and the calculator rearranges the equation to return the missing one, so you do not have to do the algebra or unit-tracking by hand.

Pressure (P)
101,383 Pa

PV = nRT with R = 8.314 J/(mol·K). Use pascals, cubic meters, moles, and temperature in kelvin (°C + 273.15). Assumes an ideal gas.

Quick answer

The ideal gas law is PV = nRT, where P is pressure (Pa), V is volume (m³), n is the amount of substance (mol), T is absolute temperature (K), and R is the universal gas constant, 8.314 J/(mol·K). To find any one unknown, rearrange the equation: P = nRT/V, V = nRT/P, n = PV/(RT), or T = PV/(nR). Temperature must always be in kelvin.

Formula & method

PV = nRT   →   P = nRT/V,  V = nRT/P,  n = PV/(RT),  T = PV/(nR)

R = 8.314 J/(mol·K). Use P in pascals, V in m³, n in moles, and T in KELVIN.

Examples

Example 1: Solve for pressure (P)
Input
n = 1 mol, V = 0.0224 m³ (22.4 L), T = 273.15 K
Result
P ≈ 101,300 Pa (about 1 atm)
Why
Rearrange to P = nRT/V. P = (1 × 8.314 × 273.15) / 0.0224 = 2271.1 / 0.0224 ≈ 1.013 × 10⁵ Pa. This is one mole of an ideal gas at 0 °C occupying 22.4 L, which reproduces the familiar molar volume at standard temperature and pressure (~1 atm).
Example 2: Solve for volume (V)
Input
n = 2 mol, P = 200,000 Pa, T = 300 K
Result
V ≈ 0.02494 m³ (24.94 L)
Why
Rearrange to V = nRT/P. V = (2 × 8.314 × 300) / 200000 = 4988.4 / 200000 ≈ 0.02494 m³. Doubling the moles roughly doubles the volume at fixed P and T, which reflects the direct proportionality between V and n.
Example 3: Solve for amount of substance (n)
Input
P = 101,325 Pa, V = 0.010 m³ (10 L), T = 298.15 K
Result
n ≈ 0.409 mol
Why
Rearrange to n = PV/(RT). n = (101325 × 0.010) / (8.314 × 298.15) = 1013.25 / 2478.8 ≈ 0.409 mol. This tells you how many moles of gas fill a 10 L vessel at room temperature and atmospheric pressure.
Example 4: Solve for temperature (T)
Input
P = 150,000 Pa, V = 0.005 m³ (5 L), n = 0.30 mol
Result
T ≈ 301 K (about 28 °C)
Why
Rearrange to T = PV/(nR). T = (150000 × 0.005) / (0.30 × 8.314) = 750 / 2.4942 ≈ 300.7 K. Convert to Celsius by subtracting 273.15 if you want a more intuitive reading: about 28 °C.
Example 5: Using the L·atm form of R
Input
n = 0.50 mol, T = 350 K, V = 12 L, find P in atm
Result
P ≈ 1.20 atm
Why
With volume in litres, pressure in atmospheres, and T in kelvin, use R = 0.08206 L·atm/(mol·K). P = nRT/V = (0.50 × 0.08206 × 350) / 12 = 14.36 / 12 ≈ 1.20 atm. The numerical answer matches the SI calculation; only the units of R and the inputs differ.

When to use this tool

  • Finding the pressure, volume, temperature, or number of moles of a gas when the other three quantities are known.
  • Estimating the molar volume of a gas at a given temperature and pressure (for example, checking the ~22.4 L/mol value at standard temperature and pressure).
  • Converting between an amount of gas and the space it occupies in chemistry, physics, and engineering problems.
  • Checking homework or laboratory results in introductory chemistry and physics courses.
  • Quick design estimates for gas storage, ventilation, or low-pressure process calculations where ideal behaviour is a reasonable approximation.
  • Determining the molar mass of an unknown gas indirectly, by combining a measured mass with the moles found from PV = nRT.

Common mistakes

  • Using Celsius or Fahrenheit instead of kelvin. The ideal gas law requires absolute temperature: convert with K = °C + 273.15 before substituting. Forgetting this is the single most common source of wrong answers.
  • Mixing unit systems. R = 8.314 J/(mol·K) demands pressure in pascals and volume in cubic metres; R = 0.08206 L·atm/(mol·K) demands pressure in atmospheres and volume in litres. Do not combine, say, litres with pascals.
  • Confusing litres and cubic metres. 1 m³ = 1000 L, so 22.4 L = 0.0224 m³. A factor-of-1000 slip here is easy to make in the SI form.
  • Treating n as a mass. n is the amount of substance in moles, not grams. Convert mass to moles first using n = mass / molar mass.
  • Using gauge pressure instead of absolute pressure. P in PV = nRT is absolute pressure; add atmospheric pressure (about 101,325 Pa) to a gauge reading before using it.
  • Applying the law to conditions where the gas is far from ideal — very high pressures or temperatures near the boiling point — where real-gas behaviour deviates and a correction such as the van der Waals equation is needed.

Frequently asked questions

What is the ideal gas law?

The ideal gas law is the equation PV = nRT. It relates the pressure (P), volume (V), amount of substance in moles (n), and absolute temperature (T) of a gas through the universal gas constant R. It is derived by combining Boyle's law, Charles's law, and Avogadro's law, and it describes a hypothetical 'ideal' gas whose particles have negligible volume and no intermolecular forces.

What value of R should I use?

In SI units, R = 8.314 J/(mol·K) (the full CODATA value is 8.314462618… J/(mol·K), which has been exact since the 2019 redefinition of SI base units). Use this value with pressure in pascals, volume in cubic metres, and temperature in kelvin. If you prefer to work in litres and atmospheres, use R = 0.08206 L·atm/(mol·K). Both give the same physical result; pick the one that matches your units.

Why must temperature be in kelvin?

PV = nRT is derived from the absolute temperature scale, where T = 0 corresponds to the theoretical point of zero thermal energy. Pressure and volume of a gas are proportional to absolute temperature, not to Celsius or Fahrenheit readings, which have arbitrary zero points. Always convert first: K = °C + 273.15. Using a non-absolute scale can even produce a negative or zero value that makes no physical sense.

What are the correct SI units for each variable?

In the SI form with R = 8.314 J/(mol·K): pressure P is in pascals (Pa), volume V is in cubic metres (m³), amount of substance n is in moles (mol), and temperature T is in kelvin (K). One pascal is one newton per square metre, and the product Pa·m³ has units of joules, which matches the energy units of R.

When does the ideal gas law break down?

It is most accurate at low pressure and moderate-to-high temperature, where gas particles are far apart and intermolecular forces are negligible. It becomes less accurate at high pressures (particles are crowded and their own volume matters) and at low temperatures near the point where the gas condenses (attractive forces become significant). For those conditions, real-gas equations such as the van der Waals equation give better results.

How do I convert between litres and cubic metres?

1 cubic metre equals 1000 litres, so divide a litre value by 1000 to get cubic metres (for example, 22.4 L = 0.0224 m³) or multiply a cubic-metre value by 1000 to get litres. Getting this conversion right is essential when you use the SI form of R, because volume must be in cubic metres.

Can I use the calculator to find molar mass?

Indirectly, yes. The calculator returns the number of moles n from PV = nRT. If you also know the mass of the gas, you can compute molar mass as M = mass / n. The calculator itself solves only for P, V, n, or T, so you would do the final division separately.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • ✓ Free to use
  • ✓ No sign-up required
  • Runs entirely in your browser — nothing is uploaded.
  • ✓ Formula and method shown above

Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the ideal gas law calculator to appear: