Gas Density Calculator
Calculate the density of an ideal gas from pressure, molar mass and temperature. ρ = PM/RT.
About the Gas Density Calculator
The density of an ideal gas follows from the gas law: it is the pressure times the molar mass divided by the gas constant times the absolute temperature.
$$ \rho = \frac{P M}{R T} $$
Enter pressure (Pa), molar mass (kg/mol, air is 0.02896, note kilograms) and temperature (K). R = 8.314 J/(mol·K). Density is returned in kg/m³.
How to use this calculator
- Enter the gas pressure, using a consistent unit such as pascals.
- Enter the molar mass of the gas, usually in g/mol or kg/mol, matching the gas constant units you plan to use.
- Enter the temperature in kelvin, because the formula requires absolute temperature.
- Click calculate to get the gas density . The result uses the same unit system implied by your inputs.
The formula explained
The formula computes the density of an ideal gas from its pressure , molar mass , temperature , and the gas constant . It shows that density increases with pressure and molar mass, and decreases as temperature rises.
- \(\rho\) = gas density
- \(P\) = pressure of the gas
- \(M\) = molar mass of the gas
- \(R\) = ideal gas constant
- \(T\) = absolute temperature in kelvin
Step by step method
- Write the known values for , , and using compatible units.
- Multiply pressure by molar mass to get the numerator, .
- Multiply the gas constant by temperature to get the denominator, , then divide to find .
Worked example
Problem. Find the density of oxygen gas at a pressure of \(101325\,\text{Pa}\), molar mass \(0.032\,\text{kg/mol}\), and temperature \(300\,\text{K}\). Use \(R=8.314\,\mathrm{J/(mol}{\cdot}\mathrm{K)}\).
- Substitute into \(\rho=\frac{PM}{RT}\): \(\rho=\frac{101325\times 0.032}{8.314\times 300}\).
- Compute the numerator and denominator: \(101325\times 0.032=3242.4\), and \(8.314\times 300=2494.2\).
- Divide: \(\rho=\frac{3242.4}{2494.2}\approx 1.30\,\text{kg/m}^3\).
Answer. \(1.30\,\text{kg/m}^3\)
Tips and common mistakes
- Use temperature in kelvin, not degrees Celsius, or the result will be wrong.
- Make sure your molar mass units match your choice of \(R\). For example, if \(R=8.314\,\mathrm{J/(mol}{\cdot}\mathrm{K)}\), use molar mass in \(\text{kg/mol}\) for density in \(\text{kg/m}^3\).
Frequently asked questions
Why is molar mass in kg/mol here?+
To keep SI units consistent so density comes out in kg/m³. Air's 28.96 g/mol becomes 0.02896 kg/mol.
Does gas density change with temperature?+
Yes, density falls as temperature rises (hot air is less dense), which is why hot-air balloons float.
Must temperature be in kelvin?+
Yes, always use absolute temperature in this formula.
More Physics Tools
Explore related calculators in this category
AC to DC Converter Calculator
Convert AC voltage to DC voltage for different rectifier configurations. Free online calculator with instant, step-by-step results.
Acceleration Calculator
Calculate acceleration from velocity change and time.
Amount of Substance Calculator
Calculate number of moles from mass and molar mass.
Angular Acceleration Calculator
Calculate angular acceleration from change in angular velocity.
You Might Also Like
Popular tools from other categories
.htaccess Generator
Generate common .htaccess rules, force HTTPS, www redirect, and caching, with checkboxes.
1031 Exchange Calculator - Free Online
Free Calculate tax deferral in a 1031 exchange. Step-by-step solutions and formulas included. Fast, accurate, and free, with formula and example.
4% Rule Calculator
Find the retirement nest egg you need using the 4% safe-withdrawal rule.
70% Rule Calculator
Calculate max offer using the 70% rule for flips.
Can't Find the Right Calculator?
Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.