Convert grams of a gas to liters at STP by picking the gas or entering its molar mass, or find the mass or molar mass from a gas volume at STP.

Ideal-gas estimate. The substance must be gaseous at the selected conditions.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Gas volume from massConverts a mass of gas to the volume it occupies at standard temperature and pressureRequires the mass, the gas (or its molar mass) and the standard conditions
Mass from gas volumeConverts a gas volume at standard temperature and pressure to its massRequires the gas volume, the gas (or its molar mass) and the standard conditions
Molar mass from mass and volumeFinds the molar mass of a gas from the mass of a measured volume at standard temperature and pressureRequires the mass, the gas volume and the standard conditions

Mass can be in g, kg or lb and volume in L, mL, US gallons or m³. The gas is picked from a list of twelve, or Other gas takes any molar mass. Standard conditions are 0 °C with either 1 atm (101.325 kPa) or 1 bar (100 kPa). The first two functions also show the amount of gas in moles and the molar volume used.

Grams to STP Formulas

V = m ÷ M × Vm
VGas volume at standard conditions (L)
mMass of gas (g)
MMolar mass of the gas (g/mol)
VmMolar volume of an ideal gas: 22.414 L/mol at 0 °C and 1 atm [1], or 22.711 L/mol at 0 °C and 1 bar [2]

The molar volume is not rounded in the calculation. It is worked out as Vm = R × T ÷ P, with R = 8.314462618 J/(mol·K) [3], T = 273.15 K and P = 101,325 Pa for 1 atm or 100,000 Pa for 1 bar [4].

Gas volume from mass

Mass divided by molar mass gives moles, and each mole occupies one molar volume. For 7.71 g of fluorine gas (F₂, 37.997 g/mol) at 0 °C and 1 atm, 7.71 ÷ 37.997 = 0.2029 mol, and 0.2029 × 22.414 = 4.548 L. At 1 bar the same mass occupies 4.608 L. The rounded classroom value of 22.4 L/mol gives 4.545 L.

GasMolar mass (g/mol)Liters per gram at 0 °C, 1 atm
Oxygen Oâ‚‚31.9980.7005
Nitrogen Nâ‚‚28.0140.8001
Dry air28.9650.7738
Carbon dioxide COâ‚‚44.0090.5093
Hydrogen Hâ‚‚2.01611.1180
Helium He4.00265.5999
Argon Ar39.9480.5611
Methane CHâ‚„16.0431.3971
Ammonia NH₃17.0311.3161
Fluorine Fâ‚‚37.9970.5899
Chlorine Clâ‚‚70.9060.3161
Carbon monoxide CO28.0100.8002

Mass from gas volume

m = V ÷ Vm × M

The volume divided by the molar volume gives moles, and moles times molar mass gives grams. For 10 L of oxygen at 0 °C and 1 atm, 10 ÷ 22.414 × 31.998 = 14.276 g.

Molar mass from mass and volume

M = m × Vm ÷ V

A gas sample of 1.25 g that fills 1 L at 0 °C and 1 atm has a molar mass of 1.25 × 22.414 ÷ 1 = 28.017 g/mol, close to nitrogen. Mass and volume must both be above zero.

Limits of This Estimate

  • The result is an ideal-gas estimate. Real gases deviate from it, and the deviation is not modeled.
  • The substance has to be a gas at the selected conditions. The formula does not predict condensation, and it does not convert the volume of a solid or liquid.
  • STP has two common definitions. A volume at 1 bar is 1.325% larger than at 1 atm, so the conditions a problem or data sheet uses need to match the setting.
  • Dry air is a mixture, and 28.965 g/mol is a mean value for it. These estimates are based on the best available data and estimations.

Sources