molecalculator

Moles & Molar Mass

Speed Density and Pressure: Calculate Gas Density

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

Gas density 1.1450 kg/m^3
Root-mean-square molecular speed
515.24 m/s
Result, rounded to 2 decimal places
Absolute pressure
101.325 kPa
Set in the form below
Temperature
25 °C
Set in the form below
You enter
Absolute pressure (kPa), Temperature (°C), Molar mass (g/mol)
You get
Gas density (kg/m^3), Root-mean-square molecular speed (m/s)
Rounding
4 dp · 2 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.

This calculator estimates the density of an ideal gas from its pressure, temperature, and molar mass, using the speed-density relationship from the ideal gas law. Enter those three values to get density in kg/m³, plus the gas’s root-mean-square molecular speed as a useful related result.

Formula

For ideal-gas density, use ρ = PM/(RT). Here ρ is density in kg/m³, P is absolute pressure in pascals, M is molar mass in kg/mol, R is the molar gas constant, 8.31446261815324 J/(mol·K), and T is absolute temperature in kelvins. The calculator converts pressure from kPa to Pa by multiplying by 1,000, molar mass from g/mol to kg/mol by dividing by 1,000, and Celsius to kelvins by adding 273.15.

The related root-mean-square molecular speed is urms = √(3RT/M). It uses the same R, T, and M, and gives metres per second. This is a statistical speed for gas molecules, not the bulk flow speed of air through a pipe or duct.

Worked Example

Using the default values—101.325 kPa, 25 °C, and 28.014 g/mol—first convert the inputs:

  • P = 101.325 × 1,000 = 101,325 Pa
  • T = 25 + 273.15 = 298.15 K
  • M = 28.014 / 1,000 = 0.028014 kg/mol

Then calculate density:

ρ = (101,325 × 0.028014) / (8.31446261815324 × 298.15) ≈ 1.1446 kg/m³

For the molecular speed:

urms = √(3 × 8.31446261815324 × 298.15 / 0.028014) ≈ 515.1 m/s

The density result is displayed to four decimal places, and the speed to two. These are model results, not a claim that any real sample has exactly the properties of an ideal gas.

Assumptions

  • The gas follows the ideal gas law and is treated as a uniform sample in thermodynamic equilibrium.
  • Pressure is absolute pressure, not gauge pressure.
  • Temperature is converted from Celsius to kelvins; it must be above absolute zero.
  • Molar mass represents the gas mixture or pure gas being studied.

What Speed Density Means

“Speed density” can refer to more than one topic. In vehicle engine control, speed-density is a method of estimating intake-air mass from manifold pressure, intake temperature, engine speed, and information such as engine displacement and volumetric efficiency. It does not directly measure airflow with a mass-airflow sensor. The calculator here addresses the related physical relationship between gas pressure, temperature, molar mass, and density; it is not an engine-tuning calculator.

The connection comes from the ideal gas law, PV = nRT. If a gas sample has mass m and molar mass M, then n = m/M. Density is ρ = m/V. Substituting these relationships into the gas law and rearranging gives ρ = PM/(RT). At fixed temperature and composition, raising absolute pressure raises density proportionally. At fixed pressure and composition, raising temperature lowers density.

How Pressure and Temperature Affect the Result

Pressure must be absolute because the gas law measures pressure relative to a vacuum. A gauge reading is measured relative to the surrounding atmosphere, so it must be converted before use: absolute pressure equals gauge pressure plus local atmospheric pressure. For example, a gauge reading of zero at sea level is approximately 101.325 kPa absolute, not zero pressure. Do not enter a negative gauge value directly as absolute pressure.

Temperature must likewise be on an absolute scale in the equation. Celsius values are not used directly: 0 °C is 273.15 K, not zero kelvins. This matters because substituting a Celsius value would produce a physically incorrect density and could make the denominator zero or negative.

As a practical comparison, at the same temperature and pressure, a gas with a larger molar mass has greater density. A gas sample’s composition therefore matters: the molar mass for a mixture should be its composition-weighted average, not the molar mass of whichever component is most familiar.

When This Calculation Is Useful—and Its Limits

The equation is useful for introductory gas-law problems, estimating gas density under stated conditions, and checking the direction or approximate size of a pressure or temperature effect. It also makes clear why “pressure” alone is not enough to specify density: temperature and gas composition are needed too.

Real gases can depart from ideal behaviour, particularly at high pressure or near condensation. Under those conditions, a compressibility factor or a more suitable equation of state may be needed. Humidity also changes air’s average molar mass: water vapour is lighter per mole than dry air, so humid air at the same pressure and temperature is slightly less dense. This calculator does not account for humidity, non-ideal behaviour, or changing composition unless those effects are represented in the entered molar mass or a different model is used.

The root-mean-square speed is a molecular-scale statistical quantity. It should not be confused with average speed, the speed of sound, or the velocity of a flowing gas. Flow speed requires additional information, such as volumetric flow rate and cross-sectional area, or an appropriate flow model.

Common Input and Interpretation Errors

  • Using gauge pressure: convert it to absolute pressure first. A pressure of zero absolute means a vacuum and cannot describe an ordinary gas sample.
  • Mixing units: enter pressure in kPa, temperature in °C, and molar mass in g/mol as labelled. The formula performs the conversions shown above.
  • Using the wrong molar mass: check that the value matches the gas or mixture. Molecular formula and composition both affect the result.
  • Confusing density with flow: density is mass per volume; it does not reveal how quickly gas is moving through a system.
  • Overreading decimal places: the displayed rounding does not make the inputs or ideal-gas assumptions more precise.

Frequently Asked Questions

What is the speed-density formula?
For an ideal gas, density is ρ = PM/(RT), where pressure is absolute, temperature is in kelvins, and molar mass is in mass per mole. This page also calculates molecular root-mean-square speed, √(3RT/M).

Does speed density use gauge or absolute pressure?
Gas-density calculations use absolute pressure. Add local atmospheric pressure to a gauge-pressure reading before using it; gauge pressure alone is not measured from a vacuum.

Why does gas density decrease when temperature rises?
At constant absolute pressure and composition, the ideal-gas equation makes density inversely proportional to absolute temperature. Heating expands a fixed amount of gas if pressure is held constant, reducing mass per unit volume.

Is root-mean-square molecular speed the same as airflow speed?
No. Root-mean-square speed describes the random motion of individual molecules. Airflow speed is the bulk motion of the gas and requires flow or geometry information.

Can this calculator give the exact density of a real gas?
It gives an ideal-gas estimate. Real-gas effects, especially at high pressure or near condensation, can make the actual density differ; use suitable measured data or a non-ideal gas model when accuracy requires it.

Related

Formula used
in p | Absolute pressure | kPa | 101.325 | 0
in t | Temperature | °C | 25 | -273.15
in mm | Molar mass | g/mol | 28.014 | 0.001
out rho | Gas density | kg/m^3 | (p * 1000) * (mm / 1000) / (8.31446261815324 * (t + 273.15)) | 4
out u | Root-mean-square molecular speed | m/s | sqrt(3 * 8.31446261815324 * (t + 273.15) / (mm / 1000)) | 2

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 →