Skip to content
FiftyCalc Free calculators for all 50 states

Ideal Gas Law Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter a gas's pressure, volume and temperature to find how many moles (and molecules) it holds, from the ideal gas law.

Result

Sample figures

Amount of gas—mol

Number of molecules (× 10²³) —

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Ideal Gas Law Calculator

Pressure, in kPa: enter 0 or more. Prefilled example: 101.325.

Volume, in L: enter 0 or more. Prefilled example: 22.4.

Temperature, in °C: enter -273.15 or more. Prefilled example: 0.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Pressure, in kPa: enter 0 or more.
  2. Volume, in L: enter 0 or more.
  3. Temperature, in °C: enter -273.15 or more.
  4. Read the result: Amount of gas; the panel also shows Number of molecules (× 10²³).

How this calculator works

Ideal gas law: P × V = n × R × T, so n = P × V ÷ (R × T). P is the absolute pressure, V the volume, T the absolute temperature (K = °C + 273.15) and R = 8.314462618 J/(mol·K).

One kPa × one liter is one joule, so with P in kPa and V in liters the amount comes out in moles. Molecules = n × N_A, with the Avogadro constant N_A = 6.02214076 × 10²³ per mole (CODATA 2022 values from NIST (physics.nist.gov/cuu/Constants/Table/allascii.txt, read October 27, 2026)).

The law fits most gases well at everyday pressures and temperatures; it drifts at high pressure and near the point where the gas condenses.

The formula

  1. N=p×vol8.314462618×(t+273.15)
Symbols used in the formula
SymbolMeaningUnit
pPressurekPa
volVolumeL
tTemperature°C
NAmount of gasmol

Worked example

Pressure101.325 kPa
Volume22.4 L
Temperature0 °C
Number of molecules (× 10²³)6.0184
  1. N=101.325×22.48.314462618×(0+273.15)=0.999377

Amount of gas 0.9994 mol

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What are the units of R?

R = 8.314462618 J/(mol·K), which is the same as kPa·L/(mol·K).

How many moles are in 22.4 L of gas at 0 °C and 1 atm?

About 0.9994 mol; one mole of an ideal gas takes 22.41 L under those conditions.

Related calculators