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
Amount of gasmol
Number of molecules (× 10²³)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Pressure, in kPa: enter 0 or more.
- Volume, in L: enter 0 or more.
- Temperature, in °C: enter -273.15 or more.
- 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
| Symbol | Meaning | Unit |
|---|---|---|
| Pressure | kPa | |
| Volume | L | |
| Temperature | °C | |
| Amount of gas | mol |
Worked example
| Pressure | 101.325 kPa |
|---|---|
| Volume | 22.4 L |
| Temperature | 0 °C |
| Number of molecules (× 10²³) | 6.0184 |
|---|
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.