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
Molar volume of an ideal gas by temperature
| Temperature | Kelvin | At 1 atm (L/mol) | At 100 kPa (L/mol) |
|---|---|---|---|
| −50 °C | 223.15 K | 18.3111 | 18.5537 |
| 0 °C | 273.15 K | 22.414 | 22.711 |
| 20 °C | 293.15 K | 24.0551 | 24.3738 |
| 25 °C | 298.15 K | 24.4654 | 24.7896 |
| 100 °C | 373.15 K | 30.6197 | 31.0254 |
| 200 °C | 473.15 K | 38.8254 | 39.3399 |
| 500 °C | 773.15 K | 63.4427 | 64.2833 |
The gas constant R in common units
| Units | Value of R | How it follows from R |
|---|---|---|
| J/(mol·K), the same as m³·Pa/(mol·K) | 8.314463 | R as defined: N_A × k_B |
| L·kPa/(mol·K) | 8.314463 | R ÷ (1,000 Pa × 0.001 m³) |
| L·bar/(mol·K) | 0.08314463 | R ÷ (100,000 Pa × 0.001 m³) |
| L·atm/(mol·K) | 0.08205737 | R ÷ (101,325 Pa × 0.001 m³) |
| L·Torr/(mol·K), same as L·mmHg | 62.3636 | R ÷ (101,325 ÷ 760 Pa × 0.001 m³) |
| mL·atm/(mol·K), same as cm³·atm | 82.05737 | R ÷ (101,325 Pa × 1 × 10⁻⁶ m³) |
| cal/(mol·K), thermochemical calorie | 1.987204 | R ÷ 4.184 J |
| psi·ft³/(lbmol·°R) | 10.73158 | R × 453.59237 mol per lbmol × 5 ÷ 9 K per °R ÷ (6,894.757293 Pa × 0.02831684659 m³) |
Unit factors the calculator uses
| Unit | Equals | Basis |
|---|---|---|
| 1 kPa | 1,000 Pa | kilo = 1,000 |
| 1 atm | 101,325 Pa | standard atmosphere, a definition |
| 1 bar | 100,000 Pa | a definition |
| 1 mmHg (Torr) | 133.3223684 Pa | 1 Torr = 101,325 ÷ 760 Pa, a definition |
| 1 psi | 6,894.757293 Pa | 1 lbf per in²: lbf = 0.45359237 kg × 9.80665 m/s², in = 0.0254 m |
| 1 L | 0.001 m³ | a litre is a cubic decimetre |
| 1 mL | 1 × 10⁻⁶ m³ | a millilitre is a cubic centimetre |
| 1 ft³ | 0.02831684659 m³ | 0.3048³, the international foot |
| 0 °C | 273.15 K | K = °C + 273.15 |
| 32 °F | 273.15 K | K = (°F + 459.67) × 5 ÷ 9 |
| 1 kmol | 1,000 mol | kilo = 1,000 |
Worked examples
| Case | Inputs | Result |
|---|---|---|
| Volume of one mole at 0 °C and 1 atm | 1 atm, 1 mol, 0 °C | V = 22.414 L |
| Pressure of a gas in a vessel | 10 L, 2 mol, 25 °C | P = 495.791 kPa |
| Moles of gas in a cylinder (ideal approximation) | 150 bar, 10 L, 20 °C | n = 61.5414 mol |
| Temperature of a gas sample | 2 atm, 10 L, 0.5 mol | T = 214.314 °C |
| Mixed units | 760 mmHg (Torr), 0.001 mol, 32 °F | V = 22.414 mL |
| Combined law: volume after compression and heating | 1 atm, 5 L, 20 °C to 2 atm, 100 °C | V₂ = 3.18224 L |
| Combined law: pressure in a sealed rigid vessel | 101.325 kPa, 5 L, 20 °C to 5 L, 100 °C | P₂ = 128.976 kPa |
| Combined law: temperature that gives a target state | 1 atm, 5 L, 20 °C to 2 atm, 3 L | T₂ = 78.63 °C |
How to use the ideal gas law calculator
- 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.
- 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.
- 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.
- 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.
- 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
- NIST, CODATA value of the molar gas constant R
- BIPM, The International System of Units (SI Brochure), 2019 redefinition of the Boltzmann and Avogadro constants
- IUPAC Gold Book, entries for standard pressure and standard temperature and pressure (STP)
- International yard and pound agreement (1959): 1 inch = 0.0254 m, 1 lb = 0.45359237 kg; standard gravity 9.80665 m/s² (CGPM)
More free tools
- Temperature ConverterConvert Celsius, Fahrenheit, Kelvin, Rankine and Réaumur exactly, with a temperature-change mode, reference points, a °C to °F table and oven temperatures.
- Wavelength and Frequency CalculatorConvert between wavelength and frequency for light, radio and sound (λ = v / f), with photon energy in joules and eV, the band name and antenna lengths.
- Energy and Power ConverterConvert joules, kWh, kcal, BTU, therms and eV, plus watts, kW, horsepower and BTU/h, with exact factors, a table and worked examples.
- Heat Index and Wind Chill CalculatorHeat index from temperature and humidity, wind chill from temperature and wind speed, and dew point, using the NWS formulas in °F or °C, mph or km/h.
- Unit ConverterConvert length, area, volume, weight and temperature with exact factors, plus cubic yards, tons and bags for gravel, soil, sand and concrete.
- Cubic Yards to TonsConvert cubic yards to tons and back for gravel, sand, topsoil, river rock and concrete, with weight-per-yard tables for each material.