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 the one figure reads in either unit. 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.
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
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
A quick check without a calculator: at 0 °C and 1 atm, an ideal gas occupies about 22.41 litres per mole, so its density is the molar mass divided by 22.41. For nitrogen at 28 g/mol that is about 1.25 g/L, which is what the tool shows for those inputs. Use the molecular mass, not the atomic one. Which gas and conditions are you working with, and would a pressure unit choice help?