Gas Density Calculator

Calculate gas density from pressure, temperature, and molar mass, then compare the result with room air instantly.

Dry air reference mix

g/mol

kPa absolute

°C

Density result

1.2043 kg/m³

Air at 20°C and 101.325 kPa

Uses the ideal gas law with absolute pressure and temperature converted to Kelvin.

Compared with air

1× air

Similar to air

Standard air line

Close to standard room air, so stratification is usually weak in open spaces.

Pressure-density preview

5.943 kg/m³Air at 20°C500 kPa max
Air at 0 kPa: 0 kg/m³Air at 100 kPa: 1.1886 kg/m³Air at 200 kPa: 2.3771 kg/m³Air at 300 kPa: 3.5657 kg/m³Air at 400 kPa: 4.7543 kg/m³Air at 500 kPa: 5.9428 kg/m³0250500

Current pressure: 101.325 kPa. Current density: 1.2043 kg/m³.

The red marker shows the active pressure. Density scales linearly with pressure when temperature and molar mass stay fixed.

Ideal Gas Law

The Ideal Gas Law for Density

Gas density cannot be looked up from a static table the way solid or liquid density can because it changes continuously with pressure and temperature. This calculator uses the ideal gas law rearranged for density, which gives accurate estimates for most gases under everyday conditions. If you need the broader concept first, open what is density before coming back to the gas-specific version.

Formula Derivation

The ideal gas law starts as PV = nRT, where P is absolute pressure, V is volume, n is the amount of substance in moles, R is the universal gas constant, and T is absolute temperature.

Density is mass divided by volume. Since gas mass can be written as n x M, where M is molar mass, density becomes rho = (n x M) / V. Rearranging the ideal gas law gives n / V = P / RT. Substituting that relationship into the density definition gives the working formula: rho = PM / RT.

The calculator converts pressure from kPa to Pa, molar mass from g/mol to kg/mol, and temperature from °C to Kelvin before computing. For the broader non-gas relationship, open the density formula guide.

Up Pressure

rho is proportional to P

More molecules are squeezed into the same volume, so density rises directly with pressure.

Up Temperature

rho is proportional to 1/T

As temperature rises at constant pressure, the gas expands and density falls.

Up Molar Mass

rho is proportional to M

Heavier molecules mean more mass in the same counted amount of gas, so density increases.

Unit Conversion Guide

This calculator accepts common engineering units and converts internally to SI before solving. If you work across solids, liquids, and gases, keep the density units guide close by.

QuantityUseful conversions
Pressure1 atm = 101.325 kPa, 1 bar = 100 kPa, 1 psi = 6.895 kPa
TemperatureK = °C + 273.15, and 20°C = 293.15 K
Molar massEnter g/mol; the calculator converts to kg/mol internally

Gases are especially sensitive to temperature and pressure, while liquids follow different behavior. If you are switching media, open the liquid density calculator for temperature-aware fluid estimates that are not based on gas compressibility.

Worked Examples

Example 1: Density of air at sea level

Use air with M = 28.97 g/mol, pressure 101,325 Pa, and temperature 20°C = 293.15 K. Substituting into rho = PM / RT gives rho = (101325 x 0.02897) / (8.314 x 293.15) = 1.204 kg/m3. That matches the room-air reference used across this page.

Example 2: CO₂ at room conditions

For CO2, M = 44.01 g/mol at 20°C and 101.325 kPa gives about 1.829 kg/m3. That is about 1.52 times denser than air, which is why CO2can collect near the floor in enclosed spaces.

Example 3: Helium at altitude

Helium at 50 kPa and -20°C has a density near 0.095 kg/m3. The gas is already light, and low pressure makes it lighter still. That is why weather balloons can keep climbing as ambient pressure falls.

Reference

Gas Density Reference - Common Gases at Standard Conditions

All densities below are calculated at 20°C and 101.325 kPa unless noted otherwise. Click any gas to load it into the calculator above.

Hydrogen (H2)

Extremely light and fast-dispersing

0.084 kg/m3
0.07x air up

Helium (He)

Non-flammable lifting gas

0.166 kg/m3
0.14x air up

Methane (CH4)

Main component of natural gas

0.667 kg/m3
0.55x air up

Ammonia (NH3)

Strongly smelling industrial gas

0.708 kg/m3
0.59x air up

Nitrogen (N2)

Main component of air

1.164 kg/m3
0.97x air up

Air

Dry air reference mix

1.204 kg/m3
1x air down

Oxygen (O2)

Supports combustion and breathing systems

1.33 kg/m3
1.10x air down

Argon (Ar)

Inert noble gas

1.661 kg/m3
1.38x air down

Carbon dioxide (CO2)

Heavier-than-air process gas

1.83 kg/m3
1.52x air down

Propane (C3H8)

Heavier-than-air fuel gas

1.833 kg/m3
1.52x air down

Butane (C4H10)

Dense LPG component

2.416 kg/m3
2.01x air down

Complete Gas Density Table (20°C, 101.325 kPa)

GasMolar mass (g/mol)Density (kg/m3)vs AirCommon use
Hydrogen (H2)2.0160.0840.07xFuel cells, lifting gas
Helium (He)4.0030.1660.14xBalloons, MRI cooling
Methane (CH4)16.040.6670.55xNatural gas, fuel
Ammonia (NH3)17.030.7080.59xRefrigerant, fertilizer
Water vapor (H2O)18.020.7490.62xHumidity, steam
Neon (Ne)20.180.8390.70xLighting, lasers
Acetylene (C2H2)26.041.0830.90xWelding, cutting
Nitrogen (N2)28.011.1640.97xInert blanket, tires
Air28.971.2041xReference gas
Carbon monoxide (CO)28.011.1640.97xCombustion product
Oxygen (O2)321.331.10xCombustion, medical
Hydrogen sulfide (H2S)34.081.4171.18xHazardous gas detection
Argon (Ar)39.951.6611.38xWelding shielding
Carbon dioxide (CO2)44.011.831.52xFire suppression, drinks
Propane (C3H8)44.101.8331.52xLPG fuel
Butane (C4H10)58.122.4162.01xLighters, camping gas
Sulfur dioxide (SO2)64.062.6632.21xIndustrial process
Chlorine (Cl2)70.902.9472.45xWater treatment
Xenon (Xe)131.295.4584.53xLighting, anesthesia
Radon (Rn)2229.2297.66xRadioactive gas reference

Air Density at Different Conditions

Air density varies significantly with altitude, temperature, and humidity. If you only need dry-air calculations, the dedicated air density calculator gives a narrower workflow.

ConditionDensityNotes
Sea level, 0°C (STP)1.293 kg/m3Standard temperature and pressure
Sea level, 15°C (ISA)1.225 kg/m3International Standard Atmosphere
Sea level, 20°C1.204 kg/m3Common room-temperature reference
Sea level, 35°C (hot day)1.146 kg/m3Warm summer outdoor conditions
1,000 m altitude, 15°C1.112 kg/m3About 9% less dense than sea level
2,000 m altitude, 15°C1.007 kg/m3Denver-class elevation
5,500 m altitude (half atm)0.736 kg/m3Everest base camp range
10,000 m (cruising altitude)0.414 kg/m3Commercial aircraft altitude

By Type

Gas Density by Type

Density of Air

Air is the universal reference gas for density comparisons, just as water is the reference for liquids. Dry air at sea level and 15°C has a density of 1.225 kg/m3. At 20°C, which is the reference used across this page, it is about 1.204 kg/m3.

Air is not a single gas. It is a mixture of roughly 78.09% nitrogen, 20.95% oxygen, 0.93% argon, and traces of carbon dioxide and other gases. The effective molar mass of that mix is 28.97 g/mol, which is why the Air preset sits almost on top of nitrogen but still comes out slightly heavier.

Humidity reduces air density because water vapor has a lower molar mass than the dry-air average. That is why hot, humid days reduce aircraft performance and why density altitude matters in aviation and combustion systems. If you want the solid-or-liquid side of the broader density workflow, open the material density calculator.

Density of CO₂ (Carbon Dioxide)

Carbon dioxide has a molar mass of 44.01 g/mol and a room-condition density of about 1.829 kg/m3, which makes it roughly 1.52 times denser than air. That density difference is not just academic. It controls how CO2 behaves in breweries, wineries, dry-ice storage, server-room suppression systems, and enclosed industrial spaces.

Because CO2 is heavier than air, it tends to accumulate near the floor and in pits or low rooms when ventilation is poor. It is also colorless and odorless, so dangerous conditions cannot be judged by human senses alone. That is why fixed detectors and ventilation design matter so much around fermentation, beverage filling, and CO2 cylinder storage.

CO₂ concentrationTypical effect
400 ppmNormal outdoor air
1,000 ppmStuffy indoor air
10,000 ppmDrowsiness and headache
40,000 ppmLife-threatening within minutes

Density of Helium

Helium has a molar mass of only 4.003 g/mol and a density near 0.164 kg/m3 at 20°C and 1 atm. That makes it about 7.3 times less dense than air under the same conditions, which is why helium provides such effective lift.

The lift from helium is driven by the density difference between helium and the surrounding air. In simplified form, lift per cubic meter is roughly the air density minus the helium density. Around room conditions, that works out to a bit over 1 kg of theoretical lift per cubic meter before you subtract balloon material, string, and payload hardware.

Hydrogen provides slightly more lift, but helium is preferred in most civilian use because it is non-flammable. That tradeoff between lift and safety is one of the clearest real-world lessons in gas density.

Density of Natural Gas and LPG

Natural gas is mostly methane, which has a room-condition density near 0.668 kg/m3. That is about 55% of air density, so methane tends to rise and disperse upward when it leaks. This is why natural-gas detectors are often mounted high and why ceiling-level ventilation matters in gas boiler rooms.

LPG behaves very differently. Propane vapor is about 1.882 kg/m3 and butane vapor is about 2.408 kg/m3, both well above air. That means LPG leaks sink and collect in basements, trenches, drains, and bilges. For detector placement and safety zoning, that difference is far more important than the fact that both are fuel gases.

The contrast between methane and LPG is one of the best examples of why comparing a gas to air is more useful than memorizing the raw density alone.

Density of Oxygen and Nitrogen

Oxygen is slightly denser than air at about 1.331 kg/m3, while nitrogen is slightly lighter at about 1.165 kg/m3. Because both are close to air in density, they mix readily and do not stratify strongly in ordinary open conditions.

That near-match explains why the oxygen fraction of the atmosphere stays roughly consistent with altitude even though total air density drops. The composition remains similar while the overall mass per volume changes.

In industry, oxygen density matters in medical gas flow, combustion support, and fire risk assessment. Nitrogen density matters in inerting, food packaging, electronics manufacturing, and tank blanketing, where replacing oxygen without creating unexpected stratification is often the goal.

Density of Hydrogen

Hydrogen is the lightest gas, with a room-condition density of only about 0.084 kg/m3. That is about one fourteenth of air density, which is why hydrogen disperses upward so rapidly in open environments.

That same lightness creates both opportunity and engineering challenge. Hydrogen has excellent energy per unit mass, but poor energy per unit volume at low pressure. To store useful amounts, vehicles and industrial systems compress it heavily. Under ideal-gas assumptions, density rises roughly in direct proportion to pressure, so a 700 bar tank raises hydrogen density from a fraction of a kilogram per cubic meter to tens of kilograms per cubic meter.

At those pressures, real-gas behavior starts to matter, which is why hydrogen is a perfect example of where a fast ideal-gas estimate is useful early in design but not the end of the engineering process.

Use Cases

Who Uses This Calculator

Ventilation

HVAC and ventilation engineers think in mass flow, not just volumetric flow. That means air density must be known at actual installation conditions, especially when temperature or altitude changes the air mass delivered by a fan.

Example: a fan rated at 2,000 m3/h moves about 2,292 kg/h of air at sea level and 35°C if air density is 1.146 kg/m3. The same fan at high altitude with thinner air may deliver far less mass for the same volume. That is why combustion-air supply, clean-room pressurization, and kitchen exhaust systems should use actual conditions, not a fixed textbook value.

For dry-air-only workflows, the air density calculator is the fastest variant.

Lab Planning

Laboratory managers and safety officers use gas density to decide detector height, ventilation path, and whether a released gas will rise or collect near the floor. Lighter-than-air gases such as hydrogen, methane, helium, and ammonia usually need ceiling-level detection. Heavier-than-air gases such as CO2, propane, chlorine, and argon usually need floor-level detection.

Density also helps with cylinder planning. A 50 L cylinder of CO2 at 60 bar contains several kilograms of gas by mass, not just a large volume by line pressure. Ideal-gas math gives a useful first estimate, while high-pressure compressibility corrections refine the final answer for serious design work.

Engineering Intuition

Gas density explains buoyancy, stack effect, combustion air, and pipeline behavior. Hot air rises because it is less dense than cool air. Chimneys draft because hot combustion products are lighter than room air. Burners lose effective oxygen mass at altitude because thin air contains less mass in each cubic meter. Pipelines move more gas mass when pressure rises because density rises with it.

These effects feel unrelated on the surface, but the same density equation connects all of them. That is why a simple gas density tool helps engineers build intuition before they move into full CFD, compressor maps, or detailed thermodynamic models.

What formula does this gas density calculator use?

This calculator uses the ideal gas law rearranged for density: rho = PM / RT.

In that equation, rho is density in kg/m3, P is absolute pressure in Pa, M is molar mass in kg/mol, R is the universal gas constant 8.314 J/(mol K), and T is absolute temperature in Kelvin. The calculator accepts kPa, degrees C, and g/mol, then converts them to SI units internally before solving.

The formula comes directly from PV = nRT. Since density is mass divided by volume and mass can be written as n x M, substituting gives the density form without changing the underlying physics. That also makes the behavior intuitive:

  • Density is directly proportional to pressure.
  • Density is inversely proportional to absolute temperature.
  • Density is directly proportional to molar mass.

Two caution points matter. First, pressure must be absolute, not gauge pressure. Second, temperature must be Kelvin, not raw Celsius. The page handles the Celsius to Kelvin conversion automatically so you do not have to convert by hand.

Why compare a gas to air?

Air is the gas that surrounds us everywhere, so comparing any gas to air instantly answers the most practical field question: will it tend to rise or sink in an open environment?

If a gas is less dense than air, it tends to rise and disperse upward. Hydrogen, helium, methane, and ammonia behave this way, which is why detectors for those gases are often mounted high in a room. If a gas is denser than air, it tends to sink and accumulate in floor pits, basements, drains, and other low points. Carbon dioxide, propane, butane, argon, and chlorine are the classic examples.

That comparison matters in safety, ventilation, fire suppression, and gas storage. A CO2 leak in a cellar behaves very differently from a methane leak in a ceiling void, even if the concentration is similar. The same density difference controls lifting force in balloons and buoyancy-driven stack effect in buildings.

The Compared with Air card on this page turns the raw density number into that intuition instantly, which is why it is one of the most useful outputs for practical work.

What is molar mass?

Molar mass is the mass of one mole of a substance, written in grams per mole. One mole contains 6.022 x 1023 molecules, so molar mass is effectively the mass of a standard counted amount of molecules.

In the gas density equation, molar mass is the variable that distinguishes gases at the same pressure and temperature. Two gases at identical P and T will have densities proportional to their molar masses. That is why helium is extremely light, air is in the middle, and carbon dioxide, propane, and chlorine are much denser.

You can calculate molar mass by adding atomic masses:

  • H2: 2 x 1.008 = 2.016 g/mol
  • O2: 2 x 16.00 = 32.00 g/mol
  • CO2: 12.01 + 2 x 16.00 = 44.01 g/mol
  • CH4: 12.01 + 4 x 1.008 = 16.04 g/mol

For gas mixtures such as air, the value is a weighted average of the component gases. That is why the Air preset uses 28.97 g/mol rather than the molar mass of any one pure gas. If you know the gas name but not the molar mass, select it from the preset list and the calculator fills it in for you.

When is the ideal gas law less accurate?

The ideal gas law assumes molecules have no volume and no intermolecular attraction. Those assumptions are good enough for many engineering estimates, but they start to break down at high pressure, near condensation, and for strongly interacting molecules.

At high pressure, molecules are packed closely enough that their own size matters. At low temperature near the boiling point, attractive forces matter more and the gas stops behaving ideally. Polar molecules and strongly interacting gases also deviate sooner than simple non-polar gases.

In practice, the ideal model is usually fine for atmospheric ventilation, lab planning, teaching, and quick design work. It becomes less reliable above roughly 10 bar or near critical conditions. A classic example is high-pressure CO2, where ideal-gas estimates can miss density by several percent or more.

If your application lives in that regime, move from this quick calculator to a full ideal gas law discussion and then on to real-gas equations of state such as van der Waals or Peng-Robinson.

Does warmer gas become less dense?

Yes. At constant pressure, warmer gas always becomes less dense because temperature sits in the denominator of rho = PM / RT. As absolute temperature rises, density falls proportionally.

The physical picture is straightforward. Heating gives gas molecules more kinetic energy. They move faster and, under constant-pressure conditions, occupy more volume. The same mass spread through more space means lower density.

Air shows the effect clearly. Sea-level air is about 1.293 kg/m3 at 0°C, 1.204 kg/m3 at 20°C, and about 0.946 kg/m3 at 100°C. That difference drives hot-air balloons, chimney draft, stack effect in buildings, and the loss of engine performance on hot days.

The same principle matters in gas pipelines and burners. For a fixed volumetric flow rate, warmer gas delivers less mass. That is why accurate process work depends on actual temperature, not just nominal line volume.