Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles or temperature.

Please note: Results use idealised models — point masses, no air resistance, ideal gases and uniform materials. Real experiments deviate. Use these for study and estimation, not for engineering sign-off.

What the Ideal Gas Law Calculator does

The ideal gas law combines Boyle’s, Charles’s and Avogadro’s laws into one relationship linking pressure, volume, amount and temperature. It holds well for real gases at ordinary pressures and temperatures well above their boiling point.

Formula

  • PV = nRT
  • V = nRT ÷ P
  • P = nRT ÷ V
  • n = PV ÷ RT
  • R = 8.314462618 J/(mol·K)

Inputs explained

InputUnitRequiredNotes
Solve forone of 4 optionsYes
PressurenumberIn some modesShown in 3 of the 4 modes.
Pressure unitone of 7 optionsIn some modesShown in 3 of the 4 modes.
VolumenumberIn some modesShown in 3 of the 4 modes.
Volume unitone of 6 optionsIn some modesShown in 3 of the 4 modes.
Amount of gasmolIn some modesAccepts more than 0. Shown in 3 of the 4 modes.
TemperaturenumberIn some modesShown in 3 of the 4 modes.
Temperature unitone of 3 optionsIn some modesShown in 3 of the 4 modes.
Molar massg/molOptionalOptional — gives the gas mass and density. Air is 28.96, oxygen 32.00, CO₂ 44.01. Accepts 0 or more.

How to use it

  1. Choose Solve for.
  2. Fill in the remaining inputs the form shows for your choice.
  3. Optionally add Molar mass.
  4. Select Calculate.

Worked example

One mole of an ideal gas at 1 atm and 0 °C.

Pressure
1 atm
Moles
1
Temperature
0 °C

V = 1 × 8.3145 × 273.15 ÷ 101,325 = 0.022414 m³, which is 22.414 litres — the classic molar volume at STP.

Frequently asked questions

Why must temperature be in kelvin?

Because the law is proportional to absolute temperature. Using Celsius would make a gas at 0 °C occupy zero volume, which is plainly wrong.

When does the ideal gas law fail?

At high pressure and low temperature, where molecules are close enough that their own volume and mutual attraction matter. Then equations like van der Waals are needed.

Related calculators