Vapor Density Calculator

The density of a gas or vapor follows directly from the ideal gas law. Rewriting PV = nRT in terms of mass and molar mass gives density = PM / (RT): density rises with pressure and molar mass and falls with temperature. Enter the pressure in atmospheres, the molar mass in grams per mole, and the absolute temperature in kelvin, and this calculator returns the gas density in grams per liter along with the molar volume. It uses the CODATA gas constant; the relationship itself is exact for an ideal gas.

0.00
0.00

Vapor density formula

PV = nRT, with n = mass / M
density = mass / V = P * M / (R * T)
R = 0.0820573 L atm / (mol K)
molar volume = R * T / P

For carbon dioxide (M = 44.01 g/mol) at 1 atm and 273.15 K, the density is about 1.96 g/L and the molar volume is about 22.41 L/mol, matching the standard molar volume of an ideal gas.

Gas density facts

  • Density increases with pressure and molar mass, and decreases with temperature.
  • The CODATA molar gas constant is 8.314462618 J/mol/K.
  • One mole of an ideal gas occupies about 22.41 L at 273.15 K and 1 atm.
  • Convert Celsius to kelvin by adding 273.15 before entering temperature.
  • Real gases deviate from the ideal law near condensation or at high pressure.

Vapor density: frequently asked questions

How is vapor density calculated from the ideal gas law?

Starting from PV = nRT and substituting n = mass / molar mass, the density (mass over volume) becomes density = P times M divided by (R times T), where P is pressure, M is molar mass, R is the gas constant, and T is absolute temperature in kelvin.

What value of the gas constant does this use?

This calculator uses R = 0.0820573 liter-atmospheres per mole per kelvin, the value consistent with the CODATA molar gas constant of 8.314462618 joules per mole per kelvin. With pressure in atmospheres, molar mass in grams per mole, and temperature in kelvin, the density comes out in grams per liter.

What units should I enter?

Enter pressure in atmospheres, molar mass in grams per mole, and temperature in kelvin. To convert Celsius to kelvin, add 273.15. The output density is in grams per liter and the molar volume is in liters per mole.

What is vapor density relative to hydrogen or air?

Relative vapor density compares a gas density to a reference. This calculator reports absolute density in grams per liter. To compare to air, divide the molar mass by the average molar mass of air (about 28.96 g/mol); to compare to hydrogen, divide by 2.016 g/mol.

How accurate is the ideal gas assumption?

The ideal gas law is exact for an ideal gas and a close approximation for real gases at low pressure and high temperature. Near condensation or at high pressure, real gases deviate and a more detailed equation of state is needed.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.