Ideal Gas Density Calculator

Quick answer

The ideal gas density calculator finds the density of a gas from its molar mass (or specific gas constant), pressure and temperature, with values for common gases.

Molar mass
28.965 g/mol
Specific gas constant
287.05205 J/(kg·K)
Density ρ
1.225

Gas density changes with pressure and temperature. Helium is so much less dense than air that it lifts balloons; carbon dioxide is denser and pools in low places.

How to use the Ideal Gas Density Calculator

  1. Gas
  2. Molar mass M (g/mol)
  3. Pressure p
  4. Temperature T

Results update as you type, every field has its own unit menu, and everything is calculated in your browser.

How it works

Choose the gas, enter the pressure and temperature.

Tips

  • Use absolute temperature (K) in gas laws and efficiency formulas.
  • Temperature differences are the same in K and °C.
  • Heat = mass × specific heat × temperature change when no phase change occurs.
  • Phase changes need latent heat at a constant temperature.

Common mistakes to avoid

  • Using °C in pV = nRT.
  • Forgetting latent heat during melting or boiling.
  • Confusing heat capacity (J/K) with specific heat (J/(kg·K)).

Inputs explained

Field What to enter
Gas Choose one: Air, Nitrogen N₂, Oxygen O₂, Hydrogen H₂ …
Molar mass M (g/mol) A number
Pressure p Units: kPa, Pa, bar, atm, psi, MPa
Temperature T Units: K, °C, °F

What each result means

  • Specific gas constant = 8.314462618÷([Molar mass]÷1000)
  • Density ρ = [Pressure p]×[Molar mass]÷1000÷(8.314462618×[Temperature T])

Example values

How the main result changes when Molar mass M changes and everything else stays at the example values above:

Molar mass M (g/mol) Density ρ (kg/m³)
14.48 1.225
21.72 1.225
28.97 1.225
36.21 1.225
43.45 1.225
57.93 1.225

Formula

ρ = p·M / (R·T) = p / (R_s·T)

Worked example

Inputs — Gas: Air; Pressure p: 101.325 kPa; Temperature T: 288.15 K.
Results — Molar mass = 28.965 g/mol; Specific gas constant = 287.05205 J/(kg·K); Density ρ = 1.225 kg/m³.

Key terms

Specific gas constant
R divided by molar mass.

Frequently asked questions

What is the density of air at sea level?

About 1.225 kg/m³ at 15 °C.

Why is helium so light?

Its molar mass is only 4 g/mol.

Is the ideal gas model accurate?

Within about 1% near atmospheric conditions.

How does pressure affect density?

Density is proportional to absolute pressure.

What formula does the Ideal Gas Density Calculator use?

ρ = p·M / (R·T) = p / (R_s·T).

Sources

  1. NIST – Fundamental physical constants
  2. OpenStax – University Physics Volume 2
  3. HyperPhysics (Georgia State University)

Cite this calculator

Speedy Calculator. (2026). Ideal Gas Density Calculator. Speedy Calculator. https://speedycalculator.com/calculators/physics/ideal-gas-density/