Ideal Gas Law Calculator: Mass and Density
The mass and density of air or another common gas from its absolute pressure, volume and temperature.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
For a gas at moderate pressure the ideal gas equation p V = m R T links pressure, volume, mass and temperature. Each gas has its own specific gas constant R: 287 J/kg·K for air, 296.8 for nitrogen, 259.8 for oxygen, 188.9 for carbon dioxide, 4124 for hydrogen.
Use absolute pressure (gauge plus atmospheric) and absolute temperature (degrees Celsius plus 273.15). The equation is accurate for air and most gases near atmospheric pressure, and less so at high pressure or near condensation.
Formulas used
- p V = m R T
- \rho = \frac{p}{R T}
Worked example
With the default numbers in the calculator above:
- Absolute temperature: 298 K
- Mass of gas: 1.17 kg
- Density: 2.34 kg/m³
Change the numbers in the calculator to see the full working, every step, for your own case.
Common questions
Absolute or gauge pressure?
Absolute. A gauge reads pressure above atmospheric, so add about 101.3 kPa.
When is the ideal gas law not accurate?
At high pressure, near the temperature where the gas condenses, and for steam near saturation. Use the property tables for those.
What is the density of air?
About 1.2 kg/m³ at 20 degrees Celsius and sea-level pressure.
Related calculators
Further reading: Cengel and Boles, Thermodynamics: An Engineering Approach; Moran and Shapiro, Fundamentals of Engineering Thermodynamics.
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business in Burleigh Waters on the Gold Coast. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →