Ideal Gas Density Calculator
Find the density of a gas at given conditions.
Result
How it is calculated
The tool rearranges the ideal gas law into ρ = P × M ÷ (R × T). Pressure P is entered in atmospheres (atm), molar mass M in g/mol, and temperature in degrees Celsius, which the tool converts to kelvin with T = °C + 273.15. R is the gas constant 0.0820573 L·atm/(mol·K). With these units the density comes out in g/L, which is numerically the same as kg/m³, so both are shown. Pressure may be zero or more, molar mass must be above zero, and the temperature must stay above absolute zero (−273.15 °C), otherwise there is no result. Because the ideal gas law is assumed, the answer becomes less accurate at high pressure or near the temperature where the gas turns to liquid.
Worked example
Air at 1 atm and 20 °C, using an average molar mass of 28.96 g/mol. Temperature: T = 20 + 273.15 = 293.15 K. R × T = 0.0820573 × 293.15 ≈ 24.055. P × M = 1 × 28.96 = 28.96. Density = 28.96 ÷ 24.055 ≈ 1.2039 g/L, the same as 1.2039 kg/m³.
Common mistakes
- Entering pressure in pascals, bar or psi. The field is in atmospheres, so 101325 would give an answer around 100,000 times too large. Convert first (1 atm = 101,325 Pa, about 1.013 bar).
- Entering the temperature in kelvin. The field expects Celsius; typing 293 would add 273.15 again and give a far too low density.
- Using the molar mass in kg/mol instead of g/mol, which shifts the answer by a factor of 1000.
- Using the atomic mass for a molecular gas, such as 16 for oxygen instead of 32 g/mol for O₂, or 14 for nitrogen instead of 28.
- Applying the result to a gas at very high pressure, or to a mixture with water vapour, without checking whether the ideal-gas assumption still holds.
About this calculator
This calculator finds gas density from the ideal gas law rearranged into ρ = PM / (RT), where P is pressure, M is the gas's molar mass, R is the universal gas constant, and T is absolute temperature. It follows directly from PV = nRT combined with n = mass/M and ρ = mass/V — density rises with pressure and molar mass, and falls as temperature increases.
Chemists and chemical engineers use this to find gas density at non-standard temperature and pressure conditions rather than relying on the STP value, HVAC and combustion engineers use it to correct air density for altitude and temperature, and aviation professionals rely on the same relationship (via air's average molar mass) when density altitude affects aircraft lift and engine performance. Enter pressure, molar mass, and temperature to get density.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)