Skip to main content
Science & Math

Ideal Gas Law Calculator

Ideal gas law calculator: solve PV = nRT for pressure, volume, moles or temperature in atm, kPa, bar, mmHg, psi, L, m3, K, C or F, with mass.

Created by Muhammad Asif Zaheer
Reviewed by CalculatorPlanet Editorial Team

Published

Last updated

Answer (in the unit you chose)
22.4140
Pressure
101.325 kPa
Pressure
1.0000 atm
Pressure
1.0133 bar
Pressure
760.00 mmHg
Pressure
14.696 psi
Volume
22.4140 L
Volume
0.022414 m3
Volume
22,414.0 mL
Temperature
273.15 K
Temperature
0.00 C
Temperature
32.00 F
Amount of gas
1.0000 mol

How the Ideal Gas Law Calculator Formula Works

The ideal gas law says the pressure of a gas times its volume equals the amount of gas times a constant times its absolute temperature. If you know three of pressure, volume, amount and temperature, the fourth follows by rearranging the equation. The constant R is the same for every gas and is 8.31446261815324 joules per mole kelvin, an exact value since the 2019 SI redefinition.

The calculator first converts every entry to pascals, cubic metres, kelvin and moles. Temperatures in Celsius or Fahrenheit become kelvin, because the law needs an absolute temperature. If you enter a mass, it is divided by the molar mass to get moles, n = m / M, and the mass and density are reported back in the results.

Once the unknown is solved, the answer is shown in the unit you picked, and the whole result is also shown in every pressure, volume and temperature unit, so you can read it as atmospheres, kilopascals, bar, millimetres of mercury or pounds per square inch.

P V = n R T; P = nRT / V; V = nRT / P; n = PV / (RT); T = PV / (nR); R = 8.31446261815324 J/(mol K); n = m / M
What goes in, what comes out
  • Patm, kPa, bar, mmHg or psiAbsolute pressure of the gas.
  • VL, m3 or mLVolume the gas occupies.
  • nmolAmount of gas, or mass divided by molar mass.
  • TK, C or FTemperature, converted to kelvin.
  • RJ/(mol K)Gas constant, 8.31446261815324.
  • + 1 more input below
Answer (in the unit you chose)
22.414
Values shown are from the worked example below
P
atm, kPa, bar, mmHg or psi
Absolute pressure of the gas.
V
L, m3 or mL
Volume the gas occupies.
n
mol
Amount of gas, or mass divided by molar mass.
T
K, C or F
Temperature, converted to kelvin.
R
J/(mol K)
Gas constant, 8.31446261815324.
M
g/mol
Molar mass, used only when the amount is a mass.

Using the Ideal Gas Law Calculator

  1. Enter solve for

    Choose from Pressure (P), Volume (V), Temperature (T), Amount of gas (n).

  2. Enter pressure, absolute (ignored when solving for pressure)

    Type the figure you already have, then press Calculate.

  3. Enter pressure unit

    Choose from atm, kPa, bar, mmHg, psi.

  4. Enter volume (ignored when solving for volume)

    Type the figure you already have, then press Calculate.

  5. Enter volume unit

    Choose from litres (L), cubic metres (m3), millilitres (mL).

  6. Enter temperature (ignored when solving for temperature)

    Type the figure you already have, then press Calculate.

  7. Enter temperature unit

    Choose from kelvin (K), Celsius (C), Fahrenheit (F).

  8. Enter enter the amount of gas as

    Choose from Moles, Mass and molar mass.

  9. Enter amount of gas (moles, ignored when solving for amount)

    Type the figure you already have, then press Calculate.

  10. Enter mass of gas (grams, ignored when solving for amount)

    Type the figure you already have, then press Calculate.

  11. Enter molar mass (grams per mole)

    Type the figure you already have, then press Calculate.

  12. Read the result

    Press Calculate to update the result. Until you do, the last result is dimmed and marked as out of date, so you always know which numbers belong to the values in the boxes.

A Real Worked Example

Find the volume of 1 mole of gas at 0 C and 1 atm. Solve for volume, enter 1 atm, 1 mole and 0 C, which is 273.15 K. V = nRT / P = 1 × 8.31446 × 273.15 / 101,325 = 0.022414 cubic metres, which is 22.414 litres.

This is the classic molar volume of a gas at 0 C and 1 atm. The same pressure reads 101.325 kPa, 760 mmHg and 14.696 psi.

1
solveFor
volume
2
pressure
1
3
pressureUnit
atm
4
volume
10
5
volumeUnit
L
6
temperature
0
7
temperatureUnit
C
8
amountBasis
moles
9
moles
1
10
mass
32
11
molarMass
32
This calculator returns22.414answer101.325pressureKPa1pressureAtm1.0133pressureBar760pressureMmHg14.696pressurePsi22.414volumeL0.022414volumeM322414volumeMl273.15temperatureK0temperatureC32temperatureF1moles

Pressure of 2 mol in 10 L at 25 C

Solve for pressure with 2 moles in a 10 litre container at 25 C, 298.15 K, and ask for kPa. P = nRT / V = 2 × 8.31446 × 298.15 / 0.010 = 495,791 pascals.

That is 495.8 kPa, 4.893 atm or 71.9 psi absolute. A gauge would read about one atmosphere less.

solveFor: pressurepressure: 1pressureUnit: kPavolume: 10volumeUnit: Ltemperature: 25temperatureUnit: CamountBasis: molesmoles: 2mass: 32molarMass: 32495.7914answer495.791pressureKPa4.8931pressureAtm4.9579pressureBar3718.74pressureMmHg71.908pressurePsi10volumeL0.01volumeM310000volumeMl298.15temperatureK25temperatureC77temperatureF2moles

Moles and mass of air in 5 L

Choose amount, switch the amount to mass and enter 28.96 g per mole for dry air, 5 L, 20 C and 1 atm. n = PV / RT = 101,325 × 0.005 / (8.31446 × 293.15) = 0.2079 mol.

The mass is 6.020 g, so the density is 1.2039 g per L. The published density of dry air at 20 C is 1.2041 kg per cubic metre, a very close match.

solveFor: amountpressure: 1pressureUnit: atmvolume: 5volumeUnit: Ltemperature: 20temperatureUnit: CamountBasis: massmoles: 1mass: 32molarMass: 28.966.0195answer101.325pressureKPa1pressureAtm1.0133pressureBar760pressureMmHg14.696pressurePsi5volumeL0.005volumeM35000volumeMl293.15temperatureK20temperatureC68temperatureF0.2079moles6.02massG1.2039densityGL

Temperature of 0.4 mol at 2 atm in 5 L

Solve for temperature with 2 atm, 5 L and 0.4 mol, and ask for Celsius. T = PV / (nR) = 202,650 × 0.005 / (0.4 × 8.31446) = 304.66 K.

Subtracting 273.15 gives 31.51 C, which is 88.73 F.

solveFor: temperaturepressure: 2pressureUnit: atmvolume: 5volumeUnit: Ltemperature: 0temperatureUnit: CamountBasis: molesmoles: 0.4mass: 32molarMass: 3231.5149answer202.65pressureKPa2pressureAtm2.0265pressureBar1520pressureMmHg29.392pressurePsi5volumeL0.005volumeM35000volumeMl304.66temperatureK31.51temperatureC88.73temperatureF0.4moles

Volume of 16 g of oxygen at 1 bar and 300 K

Switch the amount to mass: 16 g of oxygen with a molar mass of 31.998 g per mole is 0.5000 mol. Solve for volume at 1 bar and 300 K.

V = nRT / P = 0.5000 × 8.31446 × 300 / 100,000 = 12.472 litres. The calculator also reports the density, 1.2828 g per L.

solveFor: volumepressure: 1pressureUnit: barvolume: 10volumeUnit: Ltemperature: 300temperatureUnit: KamountBasis: massmoles: 1mass: 16molarMass: 31.99812.4725answer100pressureKPa0.9869pressureAtm1pressureBar750.06pressureMmHg14.504pressurePsi12.4725volumeL0.012472volumeM312472.5volumeMl300temperatureK26.85temperatureC80.33temperatureF0.5moles16massG1.2828densityGL

Pressure in psi of 1.5 mol in 10 L at 77 F

Solve for pressure, enter 1.5 mol, 10 L and 77 F, and choose psi. 77 F is 25 C, 298.15 K. P = nRT / V = 1.5 × 8.31446 × 298.15 / 0.010 = 371,844 Pa.

That is 53.93 psi, 3.670 atm or 371.8 kPa, all absolute.

solveFor: pressurepressure: 1pressureUnit: psivolume: 10volumeUnit: Ltemperature: 77temperatureUnit: FamountBasis: molesmoles: 1.5mass: 32molarMass: 3253.9313answer371.844pressureKPa3.6698pressureAtm3.7184pressureBar2789.06pressureMmHg53.931pressurePsi10volumeL0.01volumeM310000volumeMl298.15temperatureK25temperatureC77temperatureF1.5moles

What Else to Know

What the Ideal Gas Law Says and How to Calculate PV = nRT

The ideal gas law is PV = nRT. P is the absolute pressure, V is the volume, n is the amount of gas in moles, T is the absolute temperature in kelvin and R is the gas constant. It ties four measurable quantities together, so any one can be found from the other three.

Ideal gas law formula diagram: PV equals nRT, with pressure, volume, amount of gas and kelvin temperature

To calculate it by hand, choose the unknown and rearrange. Pressure is P = nRT / V, volume is V = nRT / P, temperature is T = PV / (nR) and amount is n = PV / (RT). Put every value in matching units, multiply and divide, and check that the units cancel.

The calculator does the unit work for you. Choose what to solve for, enter the other three values with their units, and read the answer in the unit you picked. The same result is also shown in every other pressure, volume and temperature unit.

Worked ideal gas law example: 1 mole at 0 C and 1 atm occupies 22.414 litres

The Gas Constant R and Which Value to Use

R is the same for every ideal gas. Since the 2019 redefinition of the SI it is exactly the Avogadro constant times the Boltzmann constant, 8.31446261815324 joules per mole kelvin, and NIST lists it as 8.314 462 618 J per mole kelvin. The calculator uses the full value.

The number changes with the units of pressure and volume. In litres and atmospheres it is 0.0820574, in litres and kilopascals it is 8.31446, in litres and bar it is 0.0831446. The gas constant table lists them. To find R from measurements, rearrange to R = PV / (nT): one mole at 273.15 K and 1 atm fills 22.414 L, so R = 22.414 / 273.15 = 0.08206 L atm per mole kelvin.

Table of the gas constant R in Pa m3, kPa L, bar L, atm L, mmHg L and psi L per mole kelvin

Mixing a value of R in one unit system with pressure or volume in another is the most common reason a hand calculation is off by 100 or 1,000. Converting everything to SI avoids it.

Units, Absolute Pressure and Kelvin

Pressure must be absolute, not gauge. A gauge shows the pressure above the surrounding air, so add about 1 atm, 101.325 kPa or 14.696 psi before using it. The calculator accepts atm, kPa, bar, mmHg and psi, converting through pascals with 1 atm equal to exactly 101,325 Pa. It treats mmHg as the torr, so 760 mmHg is exactly 1 atm.

Temperature must be absolute too. Celsius becomes kelvin by adding 273.15, and Fahrenheit by subtracting 32, multiplying by 5/9 and adding 273.15. Zero kelvin is the lowest possible temperature, so the calculator rejects anything at or below it.

Volume can be litres, cubic metres or millilitres. One cubic metre is 1,000 litres. The molar volume table shows what one mole occupies under common reference conditions such as 0 C and 1 atm, 22.414 L, or 25 C and 1 bar, 24.789 L.

Bar chart of the volume of 1 mole of ideal gas at 0 C, 20 C and 25 C with 1 atm or 1 bar

Using Mass and Molar Mass, Density and Specific Volume

Most real problems give grams, not moles. Switch the amount to mass, enter the molar mass in grams per mole and the calculator uses n = m / M. When you solve for the amount, it reports both the moles and the mass, together with the gas density in grams per litre.

Density at a given pressure and temperature is rho = PM / (RT). For dry air, M is about 28.96 g per mole, which gives 1.204 g per litre at 20 C and 1 atm. Specific volume is the reciprocal, volume per unit mass. The mass form of the law, PV = mRT, uses a specific gas constant equal to R divided by the molar mass, about 287.1 J per kilogram kelvin for air.

Bar chart of gas density in grams per litre at 25 C and 1 atm for hydrogen, helium, air, oxygen and chlorine

The gas density table lists molar mass and density for ten common gases at 25 C and 1 atm. Molar masses come from conventional atomic weights, such as 1.008 for hydrogen, 12.011 for carbon, 14.007 for nitrogen and 15.999 for oxygen.

Temperature Change, the Combined Gas Law and the Five Gas Laws

The ideal gas law contains the older gas laws. Hold the amount and temperature fixed and it becomes Boyle's law, P1V1 = P2V2. Hold the amount and pressure and it becomes Charles's law, V1/T1 = V2/T2. Hold the amount and volume and it becomes Gay-Lussac's law, P1/T1 = P2/T2. Avogadro's law, V1/n1 = V2/n2, fixes pressure and temperature. Together they give the combined gas law, P1V1/T1 = P2V2/T2.

Table of the gas laws of Boyle, Charles, Gay-Lussac and Avogadro with the combined and ideal gas laws

To find what a change in temperature does, solve for the state before, then re-solve for the state after with the same amount. For a rigid container, pressure scales with the kelvin temperature, so a container at 1 atm and 20 C reaches 129.0 kPa at 100 C. The heated container table lists more cases.

Bar chart of pressure in a sealed rigid container heated from 0 C to 150 C, starting at 1 atm and 20 C

Never treat these figures as permission to heat a sealed vessel. Pressure rises quickly, and containers have ratings that must not be exceeded.

When the Ideal Gas Law Works and When It Does Not

An ideal gas has point-like particles with no attraction between them. Real gases behave that way when the pressure is low and the temperature is well above the boiling point, because the molecules are far apart. Air, nitrogen, oxygen, argon and helium at room conditions are close to ideal.

The approximation weakens at high pressure, where molecule size matters, and near condensation, where attractions matter. Water vapour, ammonia and carbon dioxide near their liquid points deviate more. For those cases a real gas equation of state, such as van der Waals, or a compressibility factor, is more accurate.

Curve of the pressure of 1 mole of ideal gas at 25 C against container volume, falling as 1 over V

As a rule of thumb, treat results as good to a percent or so near one atmosphere and room temperature, and as rougher estimates at tens of atmospheres. The calculator uses the ideal law only.

Limits of the Estimate and Related Calculators

The results are an estimate for education and planning. They assume an ideal gas, a uniform temperature and a steady state, and they do not include moisture, gas mixtures that react, leaks or vessel flexing. For compressed gas cylinders, boilers or anything under pressure, follow the manufacturer's rating, the safety data sheet and local rules, and have a qualified person check the design.

Limits of the ideal gas law calculator: ideal behaviour, absolute pressure, estimate for planning only

For converting temperature scales, use the temperature converter. To work out how much a quantity changed in percent, see the percentage calculator, and to estimate a value between two table entries, try the linear interpolation calculator.

Reference Tables

Variables in PV = nRT, with the units the calculator accepts
SymbolQuantitySI unitUnits in the calculator
PAbsolute pressurepascal (Pa)atm, kPa, bar, mmHg, psi
VVolume of the gascubic metre (m3)L, m3, mL
nAmount of gasmole (mol)mol, or grams with a molar mass
TAbsolute temperaturekelvin (K)K, C, F
RGas constantJ per mole kelvinFixed at 8.31446261815324
The gas constant R in the units used with PV = nRT (from R = 8.31446261815324 J per mole kelvin)
Pressure and volume unitsValue of RFull unit
Pa and m38.314463J per mole kelvin, or Pa m3 per mole kelvin
kPa and L8.314463L kPa per mole kelvin
bar and L0.0831446L bar per mole kelvin
atm and L0.0820574L atm per mole kelvin
mmHg and L62.3636L mmHg per mole kelvin
psi and L1.20591L psi per mole kelvin
Energy in calories1.98720cal per mole kelvin (thermochemical calorie, 4.184 J)
Pressure units and how many pascals each one is, as used by the calculator
UnitPascalskPaatm
1 atm101,325101.3251
1 kPa1,00010.00987
1 bar100,0001000.98692
1 mmHg (torr)133.3220.13330.001316
1 psi6,894.7576.89480.06805
Volume of one mole of an ideal gas at common reference conditions
ConditionsTemperature (K)Pressure (kPa)Volume of 1 mol (L)
0 C and 1 atm273.15101.32522.414
0 C and 1 bar273.15100.00022.711
20 C and 1 atm293.15101.32524.055
25 C and 1 atm298.15101.32524.465
25 C and 1 bar298.15100.00024.790
Volume of 1 mole of an ideal gas at 1 atm as temperature changes
Temperature (C)Temperature (K)Volume (L)Compared with 0 C
-50223.1518.3181.7 %
0273.1522.41100.0 %
20293.1524.06107.3 %
25298.1524.47109.2 %
50323.1526.52118.3 %
100373.1530.62136.6 %
200473.1538.83173.2 %
Pressure of 1 mole of an ideal gas at 25 C in containers of different volume
Container volume (L)Pressure (kPa)Pressure (atm)Pressure (psi)
1.02,478.9624.465359.54
2.01,239.4812.233179.77
5.0495.794.89371.91
10.0247.902.44735.95
24.5101.331.00014.70
50.049.580.4897.19
100.024.790.2453.60
Molar mass and ideal gas density of common gases at 25 C and 1 atm (molar volume 24.465 L)
GasMolar mass (g per mol)Density (g per L)Moles in 1 m3
Hydrogen, H22.0160.082440.87
Helium, He4.0030.163640.87
Methane, CH416.0430.655740.87
Ammonia, NH317.0310.696140.87
Nitrogen, N228.0141.145040.87
Dry air (mean)28.9601.183740.87
Oxygen, O231.9981.307940.87
Argon, Ar39.9501.632940.87
Carbon dioxide, CO244.0091.798840.87
Chlorine, Cl270.9002.898040.87
The gas laws that combine into PV = nRT
LawFormulaWhat is held constant
Boyle's lawP1 V1 = P2 V2Amount of gas and temperature
Charles's lawV1 / T1 = V2 / T2Amount of gas and pressure
Gay-Lussac's lawP1 / T1 = P2 / T2Amount of gas and volume
Avogadro's lawV1 / n1 = V2 / n2Pressure and temperature
Combined gas lawP1 V1 / T1 = P2 V2 / T2Amount of gas
Ideal gas lawP V = n R TNothing, R is a constant
Pressure of a fixed amount of gas in a rigid container that starts at 20 C and 1 atm (Gay-Lussac's law)
Temperature (C)Pressure (kPa)Pressure (psi)Pressure (atm)
094.4113.690.932
20101.3314.701.000
40108.2415.701.068
60115.1516.701.136
80122.0617.701.205
100128.9818.711.273
150146.2621.211.443
Common ideal gas law mistakes
MistakeEffectFix
Temperature in Celsius or FahrenheitWildly wrong answer, or a negative oneConvert to kelvin, the calculator does it for you
Gauge pressure used as absolutePressure too low by about 1 atmAdd atmospheric pressure to a gauge reading first
Mixing a litre value of R with kPa in m3Off by a factor of 1,000Pick R to match the units, or use the calculator
Grams used as molesOff by the molar massSwitch the amount to mass and enter the molar mass
Using the law at very high pressureReal gas differs from the ideal resultUse a real gas equation of state

Frequently Asked Questions About the Ideal Gas Law Calculator

How do you calculate the ideal gas law?

Pick the unknown, write PV = nRT and rearrange it. Volume is V = nRT / P, pressure is P = nRT / V, temperature is T = PV / (nR) and moles is n = PV / (RT). With 1 mole at 273.15 K and 1 atm, V = 22.414 litres. Convert temperature to kelvin first.

How to calculate PV nRT?

Multiply moles, the gas constant and the kelvin temperature to get nRT, then divide by volume to find pressure, or by pressure to find volume. For 2 mol at 298.15 K in 10 L, nRT is 4,957.9 joules, so P = 495.8 kPa.

How to calculate R in PV nRT?

Rearrange to R = PV / (nT). At 1 atm, 273.15 K and 1 mole the volume is 22.414 L, so R = 1 × 22.414 / 273.15 = 0.08206 L atm per mole kelvin. In SI it is exactly the Avogadro constant times the Boltzmann constant, 8.31446261815324 J per mole kelvin.

What are the 5 gas laws formulas?

Boyle's law is P1V1 = P2V2, Charles's law is V1/T1 = V2/T2, Gay-Lussac's law is P1/T1 = P2/T2 and Avogadro's law is V1/n1 = V2/n2. Combined, they give the ideal gas law PV = nRT. The combined gas law, P1V1/T1 = P2V2/T2, is the same idea for a fixed amount of gas.

How do I find volume from pressure, moles and temperature?

Use V = nRT / P with the temperature in kelvin. For 0.5 mol at 300 K and 2 atm, V = 0.5 × 0.082057 × 300 / 2 = 6.154 litres. Choose Volume in the Solve for list, enter the other three values and the units, and the calculator does the conversions.

Is there an ideal gas law calculator for air?

Yes. Set the amount to mass and enter 28.96 g per mol, the mean molar mass of dry air. At 20 C and 1 atm the density comes out near 1.2039 g per L, close to the published 1.2041 kg per cubic metre. Air is mostly nitrogen and oxygen, so it behaves almost ideally at normal pressure.

How do I use the ideal gas law with mass?

Divide the mass by the molar mass to get moles, n = m / M, then use PV = nRT. Equivalently, PV = (m / M) RT. For 16 g of oxygen, M = 31.998 g per mol, so n = 0.5000 mol. Choose Mass as the amount type and enter the molar mass.

How do I find specific volume with the ideal gas law?

Specific volume is volume per unit mass, v = V / m = RT / (P M). It is the reciprocal of density. For air at 20 C and 1 atm, the calculator's density is 1.2039 g per L, so v = 0.8306 L per g, or 0.831 cubic metres per kilogram.

What does PV = mRT mean?

It is the mass form of the ideal gas law, where m is mass and R is a specific gas constant equal to the universal R divided by the molar mass. For dry air, R specific is about 287.1 J per kilogram kelvin. It gives the same answer as PV = nRT because n = m / M.

What happens to pressure when temperature changes?

At constant volume and amount, pressure is proportional to the kelvin temperature, P2 = P1 x T2 / T1. A rigid container at 1 atm and 20 C reaches 129.0 kPa at 100 C. Enter the temperature you want and solve for pressure, or use the heated container table.

What is the combined gas law?

The combined gas law is P1V1/T1 = P2V2/T2. It merges Boyle's, Charles's and Gay-Lussac's laws for a fixed amount of gas and lets you change pressure, volume and temperature together. You can get the same result by solving the ideal gas law for n at the start and using that n at the end.

Why must temperature be in kelvin?

The law links pressure and volume to the absolute temperature, which is zero when the molecules have no thermal motion. Celsius and Fahrenheit zeros are arbitrary, so using them gives nonsense, such as zero volume at 0 C. The calculator converts C and F to kelvin by adding 273.15 or using (F - 32) × 5/9 + 273.15.

What pressure and volume units can I use?

Pressure can be atm, kPa, bar, mmHg or psi, and volume can be litres, cubic metres or millilitres. Each is converted to pascals and cubic metres inside, so you never need a matching value of R. The results panel shows the pressure, volume and temperature in every supported unit.

What is the volume of one mole of gas at STP?

It depends on which standard you use. At 0 C and 1 atm it is 22.414 L. At 0 C and 1 bar, the current IUPAC standard, it is 22.711 L. At 25 C and 1 atm it is 24.465 L. The molar volume table lists these and more.

What is an ideal gas?

An ideal gas is a model where the particles are points that do not attract or repel each other and collide perfectly elastically. Real gases come close at low pressure and high temperature, when the molecules are far apart and moving fast. Air, nitrogen, oxygen and helium at room conditions are well described by it.

When does the ideal gas law stop working?

It loses accuracy at high pressure, near the boiling point and for gases with strong attractions, such as water vapour or ammonia. Then molecule size and forces matter, and a real gas equation such as van der Waals does better. Treat results above tens of atmospheres as rough.

Do I use gauge or absolute pressure?

Always absolute. A gauge reading shows pressure above the atmosphere, so add about 1 atm. A tyre at 32 psi gauge is about 46.7 psi absolute at sea level, 322.0 kPa. Using the gauge value alone gives a volume that is far too large.

How do I solve for temperature in PV = nRT?

Rearrange to T = PV / (nR). With 2 atm, 5 L and 0.4 mol, T = 304.66 K, which is 31.51 C. Pick Temperature in the Solve for list, enter the pressure, volume and moles, and choose kelvin, Celsius or Fahrenheit for the answer. The absolute temperature must come out above zero kelvin.

How do I solve for moles in PV = nRT?

Rearrange to n = PV / (RT). A 5 L container at 1 atm and 20 C holds 0.2079 mol. Multiply by the molar mass for grams: with 28.96 g per mol for air that is 6.02 g. The calculator shows both.

Can I heat a sealed container using these results?

The calculation only estimates pressure. Never heat a sealed or unrated container, since pressure rises fast and vessels can fail violently. Use equipment rated for the pressure and temperature, include a relief device where required, and follow the manufacturer's instructions and local safety rules.

References

  1. [1] National Institute of Standards and Technology. “CODATA value: molar gas constant.” NIST Reference on Constants, Units, and Uncertainty. Accessed 2026-10-07.
  2. [2] Wikipedia contributors. “Gas constant.” Wikipedia. Accessed 2026-10-07.
  3. [3] Wikipedia contributors. “Ideal gas law.” Wikipedia. Accessed 2026-10-07.
  4. [4] Wikipedia contributors. “Standard temperature and pressure.” Wikipedia. Accessed 2026-10-07.
  5. [5] Wikipedia contributors. “Density of air.” Wikipedia. Accessed 2026-10-07.
  6. [6] Wikipedia contributors. “Standard atomic weight.” Wikipedia. Accessed 2026-10-07.