molecalculator

Moles & Molar Mass

Gas Density of Air: Calculate It at Any Temperature

Calculator No. 01-2053 · Updated · Formula and assumptions shown below

Air density 1.204 kg/m³
Air density
1.204 g/L
= Air density
Air temperature
20 °C
Set in the form below
Absolute pressure
101.325 kPa
Set in the form below
You enter
Air temperature (°C), Absolute pressure (kPa), Relative humidity (%)
You get
Air density (kg/m³), Air density (g/L)
Rounding
3 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

The density of dry air at 20 °C and 101.325 kPa is about 1.204 kg/m³. This calculator estimates air density from temperature, absolute pressure, and relative humidity, returning density in kg/m³ and g/L using the ideal-gas mixture model.

Formula

For a dry-air and water-vapor mixture, density is the sum of each gas component’s mass per unit volume:

ρ = (P − pᵥ)Md/(RT) + pᵥMᵥ/(RT)

  • ρ is air density in kg/m³.
  • P is absolute total pressure in pascals (Pa); the calculator converts kPa to Pa by multiplying by 1,000.
  • pᵥ is water-vapor partial pressure in Pa.
  • Md is dry air’s molar mass, 0.02896546 kg/mol.
  • Mᵥ is water’s molar mass, 0.01801528 kg/mol.
  • R is 8.31446261815324 J/(mol·K), equivalent to Pa·m³/(mol·K).
  • T is absolute temperature in kelvins, calculated as temperature in °C + 273.15.

The calculator estimates saturation vapor pressure with the Magnus approximation: eₛ = 0.02339 × exp(17.67t/(t + 243.5)) kPa, where t is temperature in °C. It estimates actual vapor pressure as pᵥ = (relative humidity/100)eₛ. Relative humidity must be between 0 and 100%. This approximation is intended for ordinary atmospheric conditions, not extreme temperatures or specialized humidity work. The second output converts kg/m³ to g/L; those units have the same numerical value because 1 kg/m³ = 1 g/L.

Worked Example

Using the defaults—20 °C, 101.325 kPa, and 0% relative humidity—the air is treated as dry. The humidity term is zero, so the ideal-gas formula reduces to ρ = PMd/(RT).

  1. Convert temperature: T = 20 + 273.15 = 293.15 K.
  2. Convert pressure: P = 101.325 × 1,000 = 101,325 Pa.
  3. Substitute: ρ = (101,325 Pa × 0.02896546 kg/mol)/(8.31446261815324 Pa·m³/(mol·K) × 293.15 K).
  4. Calculate: ρ ≈ 1.20412 kg/m³, which rounds to the calculator’s displayed result, 1.204 kg/m³.
  5. Because 1 kg/m³ equals 1 g/L, the second output is 1.204 g/L.

Assumptions

  • Air and water vapor behave as ideal gases.
  • Dry-air molar mass is treated as a fixed average; actual air composition varies slightly.
  • Relative humidity is referenced to saturation vapor pressure estimated with the stated Magnus approximation.
  • Pressure means absolute pressure, not gauge pressure.
  • The calculation is for a gas mixture in equilibrium; it does not account for suspended droplets, dust, or other aerosols.

What Air Density Means

Density is mass divided by volume. Saying air has a density of 1.204 kg/m³ means that one cubic metre of air has a mass of about 1.204 kilograms under the stated conditions. Air is a mixture, principally nitrogen and oxygen, with smaller amounts of argon, carbon dioxide, and other gases. Its composition is fairly stable in ordinary conditions, but its density is not a single fixed value: temperature, pressure, and water vapor all matter.

The value 1.204 kg/m³ is a useful reference, not a universal constant. It applies to dry air near 20 °C at standard sea-level pressure. At 0 °C and the same pressure, dry air is denser, about 1.29 kg/m³. At higher elevation, lower atmospheric pressure generally means lower density. A weather station or engineering calculation may therefore need local pressure and temperature rather than a reference value.

How Temperature, Pressure, and Humidity Change It

At fixed pressure and composition, warming air lowers its density. The same gas occupies a larger volume at higher temperature, so each cubic metre contains less mass. Cooling air has the opposite effect. The temperature must be converted to kelvins in the gas-law equation; inserting Celsius directly would produce an incorrect result.

At fixed temperature, raising absolute pressure increases density. This is why compressed air is much denser than air at room pressure. Weather pressure is often reported in kPa or hPa, while some instruments use other units. Convert the reading to absolute kPa before entering it. Gauge pressure is measured above the surrounding atmosphere, so add local atmospheric pressure to a gauge reading to obtain absolute pressure.

Humidity has a less intuitive effect. Water molecules have a lower molar mass than the average molecules in dry air, so adding water vapor makes moist air slightly less dense than dry air at the same temperature and total pressure. Humidity is not an extra pressure to add on top of total pressure: the formula assigns part of the total pressure to water vapor and the remainder to dry air.

Using the Result and Common Mistakes

This estimate is useful for understanding buoyancy, estimating air mass in a room, and making introductory engineering or science calculations. For example, at a density near 1.2 kg/m³, 10 m³ of air has a mass near 12 kg. For precise work, use measured conditions and an appropriate moist-air or real-gas model.

  • Use absolute pressure. Entering gauge pressure alone can make the result far too low.
  • Enter temperature in °C as requested. The calculation converts it to kelvins internally.
  • Enter relative humidity as a percentage from 0 to 100, not as a fraction such as 0.50 for 50%.
  • Keep units consistent when checking the formula: pressure is converted from kPa to Pa, and temperature from °C to K.
  • Do not interpret extra decimal places as extra measurement accuracy. Uncertainty in pressure, temperature, humidity, and the approximation may be larger than the final displayed digit.

Air density also matters when comparing gases. Carbon dioxide is denser than dry air at the same temperature and pressure because its molar mass is greater. However, a gas’s density changes with conditions, so comparisons are meaningful only when temperature and pressure are specified. In the same way, warm air can be less dense than cooler air even though both are made mostly of the same gases.

Limits and When a More Detailed Model Is Needed

The ideal-gas mixture equation is accurate enough for many everyday and educational estimates near ordinary atmospheric conditions. At very high pressures, very low temperatures, or when high precision is required, gas non-ideality and changes in composition may matter. The humidity approximation is also not a universal vapor-pressure equation: its accuracy depends on temperature range and conditions. For calibration, meteorology, HVAC design, or other regulated or precision applications, use the relevant standard method and reliable measurements.

Density can also vary with altitude and location because pressure changes, and with air composition because of carbon dioxide or other constituents. The calculator uses a conventional average molar mass for dry air rather than measuring composition. It does not calculate density altitude, which is a related aviation quantity that accounts for temperature and pressure relative to a reference atmosphere.

Frequently Asked Questions

What is the density of air at room temperature?
Dry air at 20 °C and 101.325 kPa has a density of about 1.204 kg/m³, or 1.204 g/L. The exact value changes with pressure, temperature, and humidity.

Is air density the same as 1.2 kg/m³?
About 1.2 kg/m³ is a useful rounded reference for air near room temperature and sea-level pressure. It is not a fixed value for all places or weather conditions.

Does humid air weigh more than dry air?
At the same temperature and total pressure, humid air is slightly less dense, not more dense. Water vapor has a lower molar mass than the average dry-air mixture.

How do I convert air density from kg/m³ to g/L?
The numerical value stays the same: 1 kg/m³ equals 1 g/L. For example, 1.204 kg/m³ is 1.204 g/L.

Does altitude affect air density?
Yes. Atmospheric pressure generally falls with altitude, reducing air density. Temperature and weather also affect the value, so altitude alone does not determine an exact density.

Related

Formula used
in t | Air temperature | °C | 20 | -273.15
in p | Absolute pressure | kPa | 101.325 | 0.001
in rh | Relative humidity | % | 0 | 0 | 100
out rho | Air density | kg/m³ | (p * 1000 - (rh / 100) * 0.02339 * exp(17.67 * t / (t + 243.5)) * 1000) * (0.02896546 / (8.31446261815324 * (t + 273.15)) * (1 - (rh / 100) * 0.02339 * exp(17.67 * t / (t + 243.5)) / (p * 1000)) + (rh / 100) * 0.02339 * exp(17.67 * t / (t + 243.5)) / (8.31446261815324 * (t + 273.15) * 0.01801528 * p * 1000)) | 3
out gl | Air density | g/L | rho | 3

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →