GALAXY OF TOOLS

SCIENCE SECTOR

Ideal Gas Law Calculator — Solve PV = nRT for P, V, n or T, with Steps

Solve PV = nRT for pressure, volume, moles or temperature in any units, with density and the working.

Solve PV = nRT for any variable. The box for the quantity you solve is ignored; its unit sets the answer’s unit.
Mass units use the molar mass of the gas below.
22.414 Lvolume of 1.0000 mol of dry air as an ideal gas
1.2923 kg/m³Density ρ = P M ÷ R T
28.965 gMass of the gas
22.414 L/molMolar volume
287.06 J/(kg·K)Specific gas constant R = R ÷ M
StepWorkingResult
GasDry airM = 28.965 g/mol
In SI unitsP in Pa, V in m³, n in mol, T in KP = 101,325 Pa · V = 0.022414 m³ · n = 1.0000 mol · T = 273.15 K
Ideal gas lawV = nRT ÷ PR = 8.314462618 J/(mol·K)
Answer in SIvolume0.022414 m³
Answer in your unitconverted22.414 L

Molar volume at common reference conditions

ConditionsMolar volume of an ideal gas
0 °C, 101.325 kPa (IUPAC former STP, 1 atm)22.414 L/mol
0 °C, 100 kPa (IUPAC STP since 1982)22.711 L/mol
20 °C, 101.325 kPa (NTP)24.055 L/mol
25 °C, 100 kPa (SATP)24.790 L/mol

R = 8.314 462 618 J/(mol·K), the exact CODATA 2018 value. Atomic masses: IUPAC 2021 table; dry air 28.9647 g/mol. The ideal law ignores molecular size and attraction, so accuracy falls at high pressure and near condensation. Read 24 October 2026.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

An ideal gas law calculator with units and steps

The ideal gas law, PV = nRT, links the pressure, volume, amount and temperature of a gas. This ideal gas law calculator solves it for whichever of the four you do not know, accepts the units you actually have (kPa, bar, atm, mmHg, psi; litres, cubic metres, cubic feet, gallons; °C, K, °F) and shows the conversion to SI and every step of the working.

You can enter the amount of gas in moles or as a mass in grams, kilograms or pounds. Mass uses the molar mass of the gas you pick, so the same page covers the PV = nRT chemistry form and the PV = mRsT engineering form, where Rs is the specific gas constant of the gas. The result also gives the gas density, the mass and the molar volume at your conditions.

The ideal gas law is an excellent approximation for gases at moderate pressure and well above their boiling point, and a poor one at high pressure or near condensation. The calculator warns you when you leave that range.

How to use the Ideal Gas Law Calculator

  1. Choose the variable to solve for: volume, pressure, amount or temperature.
  2. Fill in the other three, picking the unit beside each. The box of the quantity you solve for is ignored and its unit becomes the answer’s unit.
  3. Select the gas if you work in mass or want density, or enter a custom molar mass.
  4. Read the answer, then open the steps to check each conversion.

Ideal Gas Law Calculator features

Any unit

Pressure, volume, amount and temperature units are converted for you.

Moles or mass

PV = nRT and PV = mRsT in one tool.

Density and molar volume

Gas density, mass and specific gas constant at your conditions.

Step by step

SI conversion, rearranged formula and the converted answer.

The equation and its constants

The law is PV = nRT, with pressure in pascals, volume in cubic metres, n in moles and T in kelvin, and the gas constant R = 8.314 462 618 J/(mol·K), an exact value since the 2019 redefinition of the SI. Rearranged: V = nRT ÷ P, P = nRT ÷ V, n = PV ÷ RT and T = PV ÷ nR. Dividing the amount by the molar mass M gives the mass form PV = mRsT with Rs = R ÷ M, and the density is ρ = P M ÷ R T.

Example: one mole of gas at 0 °C (273.15 K) and 101.325 kPa occupies 8.314462618 × 273.15 ÷ 101,325 = 0.022414 m³, or 22.414 L. At 25 °C and 100 kPa the molar volume is 24.790 L, and for dry air at 20 °C and 1 atm the density works out to about 1.204 kg/m³.

QuantitySI unitCommon conversions
PressurePa1 atm = 101,325 Pa; 1 bar = 100,000 Pa; 1 psi = 6,894.76 Pa
Volumem³1 L = 0.001 m³; 1 ft³ = 0.0283168 m³
TemperatureKK = °C + 273.15
Amountmoln = mass ÷ molar mass

When the ideal law is not enough

  • At pressures above roughly 50 bar, or near the temperature where the gas liquefies, use the real-gas form PV = ZnRT with a compressibility factor Z.
  • Steam and refrigerants near saturation need property tables, not the ideal law; see the steam table calculator.
  • Temperatures must be absolute in the formula, which is why the calculator converts °C and °F to kelvin first.
  • Gauge pressure is not absolute pressure. Add atmospheric pressure to a gauge reading before using this page.

Ideal Gas Law Calculator FAQ

How do I use the ideal gas law calculator?

Pick what to solve for, enter the other three quantities with their units and read the answer. Remember that pressure must be absolute and the calculator converts temperature to kelvin.

How do I calculate gas density from the ideal gas law?

ρ = P M ÷ (R T). For air (M = 28.9647 g/mol) at 101,325 Pa and 293.15 K that is about 1.204 kg/m³; the calculator shows the density for any gas you choose.

What is the PV = mRT form?

It is the same law written with the mass m of the gas and the specific gas constant R = R ÷ M of that gas. Enter the amount in kilograms and pick the gas to use it.

What value of R does it use?

8.314 462 618 J/(mol·K). The calculator converts your units to SI, so you never need to pick a different R such as 0.08206 L·atm/(mol·K).

Why does the answer look wrong at high pressure?

The ideal law neglects molecular volume and attraction, so real gases deviate above tens of bar. A compressibility factor corrects it.

Is gauge pressure accepted?

No. Convert gauge to absolute by adding the local atmospheric pressure first.

You might also need