Science / Gases

Ideal Gas Law Calculator (PV = nRT)

Solve PV = nRT for pressure, volume, amount, or temperature, in the units you have, with the working shown in SI units.

Ideal Gas Law Calculator (PV = nRT): The calculator converts each value to SI units (pascals, cubic metres, moles, kelvin), solves PV = nRT with R = 8.314462618 J/(mol·K), and converts the answer back to the unit you chose. R is exact since 2019, when the SI fixed the Avogadro and Boltzmann constants; values agreed with SciPy's constants. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
Ideal gas law calculatorLocal processing

Runs entirely in your browser

Fill in three of pressure, volume, amount, and temperature, and leave the fourth empty.

Volume (V)22.414 L
In SI units101,325 Pa · 0.022414 m³1 mol · 273.15 K

V = nRT ÷ P = 1 × 8.314462618 × 273.15 ÷ 101,325

PV = nRT, with R = 8.314462618 J/(mol·K), the exact value since the SI was redefined in 2019. Real gases follow it closely at ordinary pressures and temperatures, and depart from it when they are compressed hard or close to condensing.

A worked example

A 1-litre bottle at 25 °C and 1 atm holds n = PV ÷ RT = 101,325 × 0.001 ÷ (8.314 × 298.15) = 0.0409 mol of gas. Sealed and heated to 50 °C, its pressure rises to 101,325 × 323.15 ÷ 298.15 = 109,821 Pa, about 1.08 atm.

To turn moles into grams, use the molar mass calculator; to balance the reaction that makes the gas, the chemical equation balancer.

The older gas laws inside it

Hold two of the four quantities fixed and PV = nRT becomes one of the classic laws: Boyle's law (P × V constant at a fixed temperature), Charles's law (V ÷ T constant at a fixed pressure), Gay-Lussac's law (P ÷ T constant at a fixed volume), and Avogadro's law (V ÷ n constant).

How to use it

  1. Fill in three of pressure, volume, amount in moles, and temperature, each with its unit.
  2. Leave the one you want empty.
  3. Read the answer in your unit, with the formula worked out.

Privacy & limitations

Everything is worked out in your browser.

Related tools

Frequently asked questions

What volume does a mole of gas fill?

22.414 L at 0 °C and 1 atm, and 24.79 L at 25 °C and 1 bar.

Why must temperature be in kelvin?

The law is a proportion to absolute temperature, which starts at absolute zero; the calculator converts °C and °F for you.

When does the ideal gas law fail?

At high pressures and low temperatures, when molecules are close together and attract one another; real-gas equations such as van der Waals then do better.

Free tool · runs in your browser · no account required