Skip to main content
ponderloop

Ideal Gas Law Calculator

1 mol of an ideal gas at 0 °C and 1 atm occupies 22.414 L, from PV = nRT with R = 8.314462618 J/(mol·K). With the combined gas law, 5 L of gas at 1 atm and 20 °C that is taken to 2 atm and 100 °C ends up at 3.18224 L. Choose the unknown, enter the other values in any of the supported units, and the calculator converts temperatures to kelvin before it solves.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Ideal gas law: PV = nRT

Solve for
mol

V = 22.414 L

  • V = nRT ÷ P
  • V = (1 mol × 8.314462618 J/(mol·K) × 273.15 K) ÷ 101,325 Pa = 0.022414 m³
Volume in mL
22,414 mL
Volume in m³
0.022414 m³
Volume in ft³
0.791542 ft³
Temperature used in the formula
273.15 K
Molar volume V ÷ n
22.414 L/mol
Number of molecules N = n × N_A
6.02214 × 10²³

Reference: molar volume of an ideal gas, computed with the same R

  • Molar volume of an ideal gas at 0 °C and 1 atm (STP, the classic definition): 22.414 L/mol.
  • At 25 °C and 1 atm: 24.465 L/mol.
  • At 0 °C and 100 kPa (1 bar, the IUPAC standard pressure): 22.711 L/mol.

Combined gas law: P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂

For a fixed amount of gas that changes state. Pressure and volume units cancel, so any unit works if both states use it.

Solve for

Initial state

Final state

V₂ = 3.18224 L

  • V₂ = P₁ × V₁ × T₂ ÷ (P₂ × T₁)
  • V₂ = (1 atm × 5 L × 373.15 K) ÷ (2 atm × 293.15 K) = 3.18224 L
Volume in mL
3,182.24 mL
Volume in m³
0.00318224 m³
Volume in ft³
0.11238 ft³
Temperatures used in the formula
T₁ = 293.15 K, T₂ = 373.15 K
Pressure ratio P₂ ÷ P₁
2
Volume ratio V₂ ÷ V₁
0.636449
Temperature ratio T₂ ÷ T₁ (kelvin)
1.2729

Molar volume of an ideal gas by temperature

Volume of one mole of an ideal gas in litres at 1 atm and at 100 kPa (1 bar) for common temperatures, computed from V = RT ÷ P.
TemperatureKelvinAt 1 atm (L/mol)At 100 kPa (L/mol)
−50 °C223.15 K18.311118.5537
0 °C273.15 K22.41422.711
20 °C293.15 K24.055124.3738
25 °C298.15 K24.465424.7896
100 °C373.15 K30.619731.0254
200 °C473.15 K38.825439.3399
500 °C773.15 K63.442764.2833

The gas constant R in common units

The same exact constant written for different pressure, volume and energy units, each derived from R in J/(mol·K) and the exact unit conversion factors.
UnitsValue of RHow it follows from R
J/(mol·K), the same as m³·Pa/(mol·K)8.314463R as defined: N_A × k_B
L·kPa/(mol·K)8.314463R ÷ (1,000 Pa × 0.001 m³)
L·bar/(mol·K)0.08314463R ÷ (100,000 Pa × 0.001 m³)
L·atm/(mol·K)0.08205737R ÷ (101,325 Pa × 0.001 m³)
L·Torr/(mol·K), same as L·mmHg62.3636R ÷ (101,325 ÷ 760 Pa × 0.001 m³)
mL·atm/(mol·K), same as cm³·atm82.05737R ÷ (101,325 Pa × 1 × 10⁻⁶ m³)
cal/(mol·K), thermochemical calorie1.987204R ÷ 4.184 J
psi·ft³/(lbmol·°R)10.73158R × 453.59237 mol per lbmol × 5 ÷ 9 K per °R ÷ (6,894.757293 Pa × 0.02831684659 m³)

Unit factors the calculator uses

Every unit is converted to pascals, cubic metres, kelvin and moles with these exact factors before the formula is applied.
UnitEqualsBasis
1 kPa1,000 Pakilo = 1,000
1 atm101,325 Pastandard atmosphere, a definition
1 bar100,000 Paa definition
1 mmHg (Torr)133.3223684 Pa1 Torr = 101,325 ÷ 760 Pa, a definition
1 psi6,894.757293 Pa1 lbf per in²: lbf = 0.45359237 kg × 9.80665 m/s², in = 0.0254 m
1 L0.001 m³a litre is a cubic decimetre
1 mL1 × 10⁻⁶ m³a millilitre is a cubic centimetre
1 ft³0.02831684659 m³0.3048³, the international foot
0 °C273.15 KK = °C + 273.15
32 °F273.15 KK = (°F + 459.67) × 5 ÷ 9
1 kmol1,000 molkilo = 1,000

Worked examples

Each row is the calculator’s own result for the inputs shown, with the unknown named in the first column of its result.
CaseInputsResult
Volume of one mole at 0 °C and 1 atm1 atm, 1 mol, 0 °CV = 22.414 L
Pressure of a gas in a vessel10 L, 2 mol, 25 °CP = 495.791 kPa
Moles of gas in a cylinder (ideal approximation)150 bar, 10 L, 20 °Cn = 61.5414 mol
Temperature of a gas sample2 atm, 10 L, 0.5 molT = 214.314 °C
Mixed units760 mmHg (Torr), 0.001 mol, 32 °FV = 22.414 mL
Combined law: volume after compression and heating1 atm, 5 L, 20 °C to 2 atm, 100 °CV₂ = 3.18224 L
Combined law: pressure in a sealed rigid vessel101.325 kPa, 5 L, 20 °C to 5 L, 100 °CP₂ = 128.976 kPa
Combined law: temperature that gives a target state1 atm, 5 L, 20 °C to 2 atm, 3 LT₂ = 78.63 °C

How to use the ideal gas law calculator

  1. Pick the unknown. Under PV = nRT choose pressure, volume, amount or temperature as the value to solve for. That box becomes read-only and shows the answer; the other three are yours to fill in.
  2. Enter the other three values with their units. Type each number and pick its unit: pressure in Pa, kPa, atm, bar, mmHg or psi, volume in L, mL, m³ or ft³, temperature in K, °C or °F and the amount in mol. The example is 1 mol at 0 °C and 1 atm.
  3. Use absolute pressure and a temperature above zero kelvin. Pressure must be absolute, not gauge. Temperatures are converted to kelvin, and anything at or below absolute zero (0 K = −273.15 °C = −459.67 °F) is refused with a message.
  4. Read the result and the working. The headline is the answer (V = 22.414 L for the example) in the unit you chose, with the same value in the other units below it and the formula with your numbers substituted.
  5. Change a gas from one state to another. For a gas whose amount does not change, use the combined gas law box: enter the initial pressure, volume and temperature and two of the three final values. The example gives V₂ = 3.18224 L.

Frequently asked questions

What is the ideal gas law formula?
PV = nRT, where P is the absolute pressure, V the volume, n the amount of gas in moles, T the absolute temperature in kelvin and R the molar gas constant. Solved for the volume, V = nRT ÷ P: for 1 mol of an ideal gas at 0 °C and 1 atm it is 0.022414 m³ (22.414 L). The other three forms are P = nRT ÷ V, n = PV ÷ (RT) and T = PV ÷ (nR).
Which value of R should I use?
Use the one that matches your units. In SI units R = 8.314462618 J/(mol·K), which is the same as m³·Pa/(mol·K) and L·kPa/(mol·K). With pressure in atm and volume in litres it is 0.08205737 L·atm/(mol·K), and with Torr or mmHg 62.3636 L·Torr/(mol·K). This calculator converts everything to SI first, so you never have to pick.
Is the gas constant an exact number?
Yes, since the 2019 redefinition of the SI. The Avogadro constant (6.02214076 × 10²³ per mole) and the Boltzmann constant (1.380649 × 10⁻²³ J/K) are fixed by definition, and R is their product, 8.31446261815324 J/(mol·K). The calculator multiplies the two exactly and shows 8.314462618 in the working.
Is the molar volume of a gas 22.414 L or 22.711 L?
Both, for different standard conditions. At 0 °C and 1 atm, the older definition of standard temperature and pressure, one mole of ideal gas fills 22.414 L. At 0 °C and 100 kPa (1 bar), the IUPAC standard pressure since 1982, it fills 22.711 L, and at 25 °C and 1 atm 24.465 L. Always check which standard conditions a textbook or exam means.
Do I need to convert temperature to kelvin myself?
No. Enter °C, °F or K and the calculator converts exactly: 0 °C and 32 °F are both 273.15 K (the mixed-unit example uses 273.15 K). It refuses a temperature at or below absolute zero, and for −300 °C it says: “The temperature must be above absolute zero (0 K = −273.15 °C = −459.67 °F).” The law is proportional to the absolute temperature, which is why a scale with its zero at absolute zero is required.
Should the pressure be gauge or absolute?
Absolute. Gauge pressure is measured above the surrounding air, so add the atmospheric pressure first: one standard atmosphere is 14.6959 psi, so a gauge reading of 30 psi is 44.6959 psi absolute at sea-level pressure. Using the gauge value directly gives a wrong volume or temperature.
What is the combined gas law?
P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂ for a fixed amount of gas, with temperatures in kelvin. It joins Boyle’s, Charles’s and Gay-Lussac’s laws. Starting from 1 atm, 5 L, 20 °C and going to 2 atm, 100 °C, the final volume is 3.18224 L; starting from 1 atm, 5 L, 20 °C and needing 2 atm, 3 L, the final temperature is 78.63 °C.
Why does the combined gas law not need R or the amount of gas?
Because n and R are the same on both sides of PV = nRT and cancel, which leaves only ratios. Pressure and volume units cancel in those ratios too, so any pressure unit works as long as both states use the same one; only the temperature must be in kelvin. A rigid vessel shows it (101.325 kPa, 5 L, 20 °C to 5 L, 100 °C): the volume is unchanged, so the pressure rises by the temperature ratio 1.2729, from 101.325 kPa to 128.976 kPa.
How many molecules are in a given amount of gas?
Multiply the amount in moles by the Avogadro constant. One mole holds 6.02214076 × 10²³ molecules (the exact Avogadro constant), so 1 mol of an ideal gas at 0 °C and 1 atm contains 6.02214 × 10²³ of them. The calculator shows this count, to 6 significant figures, with every result.
Is mmHg the same as Torr?
Almost. One Torr is exactly 101,325 ÷ 760 Pa, which is 133.3223684 Pa, and the calculator uses that for “mmHg (Torr)”. The conventional millimetre of mercury is 133.3223874 Pa, larger by a factor of 1.000000142, a difference far below the precision of any manometer.
When does the ideal gas law stop being accurate?
It treats molecules as points that do not attract each other, so real gases drift away from it at high pressure and at temperatures close to where they condense. The n = 61.5414 mol for 150 bar, 10 L, 20 °C is exactly what the law predicts, not what a real cylinder holds; engineers use a compressibility factor or an equation such as van der Waals for that. The calculator applies no correction.
Can I solve for temperature in Fahrenheit or Celsius?
Yes. Choose temperature as the unknown and pick the unit; the answer is also listed in the other two. For 2 atm, 10 L, 0.5 mol the result is T = 214.314 °C, which is 487.464 K and 417.765 °F. Zero kelvin is −459.67 °F.

How it works

The ideal gas law PV = nRT relates the absolute pressure P, volume V, amount of substance n and thermodynamic temperature T of a gas through the molar gas constant R = N_A × k_B. Since the 2019 SI redefinition N_A = 6.02214076 × 10²³ per mole and k_B = 1.380649 × 10⁻²³ J/K are exact, so R = 8.31446261815324 J/(mol·K) is exact too; the working shows it as 8.314462618. Inputs are read as exact decimal fractions and converted to pascals, cubic metres, moles and kelvin with exact factors: the standard atmosphere (101,325 Pa), the bar (100,000 Pa), the Torr (101,325 ÷ 760 Pa), the psi (0.45359237 kg × 9.80665 m/s² per 0.0254² m²), the foot (0.3048 m), and the offsets 273.15 K and 459.67 °R. The unknown is solved with exact fractions, so no rounding occurs inside the calculation; only the displayed result is rounded, to 6 significant figures (10 in the unit factor table, 7 for R). The combined gas law P₁V₁/T₁ = P₂V₂/T₂ follows from the same relation for a fixed amount of gas; pressure and volume units cancel in it and temperatures are used in kelvin. The ideal gas model ignores intermolecular forces and molecular volume, so results for real gases at high pressure or near condensation are approximations, and pressure must be absolute. Reference molar volumes: 22.414 L/mol at 0 °C and 1 atm, 22.711 L/mol at 0 °C and 100 kPa.

Sources

All convertersAll toolsHome & DIY calculators