Start typing to discover tools…

Gas Density Calculator

Calculate the density of an ideal gas using molar mass, pressure, and temperature. Choose your preferred pressure and temperature units and get the result instantly in grams per liter.

Instant Results Multiple Units Ideal Gas Law

Calculate Gas Density

Enter molar mass, pressure, and temperature below.

Calculator Formula: This calculator uses the ideal gas relationship ρ = PM / RT, where ρ is gas density, P is pressure, M is molar mass, R is the gas constant, and T is absolute temperature.
Enter the molar mass of the gas.
Select the unit used for gas pressure.
Temperature is automatically converted to Kelvin.
Used after pressure is converted to atmospheres.
Gas Density Formula
ρ = (P × M) ÷ (R × T)
Result = grams per liter (g/L)
Gas Density
0
grams per liter (g/L)
Pressure -
Temperature -
Molar Mass -
Chemistry Guide

What Is Gas Density?

Gas density describes how much mass of a gas is present within a certain volume. It is commonly expressed in grams per liter (g/L). Unlike the density of many solids and liquids, gas density changes noticeably when temperature or pressure changes.

For an ideal gas, density can be calculated when the gas molar mass, absolute temperature, and pressure are known.

Main Equation

Gas Density Formula

The ideal gas law can be rearranged to calculate gas density directly. This is useful when the molar mass, pressure, and temperature of the gas are known.

ρ = PM ÷ RT ρ = Density   •   P = Pressure   •   M = Molar Mass   •   R = Gas Constant   •   T = Kelvin Temperature
How It Works

How to Use the Gas Density Calculator

01

Enter Molar Mass

Enter the molar mass of the gas and select either grams per mole or kilograms per mole.

02

Add Gas Conditions

Enter the gas pressure and temperature using any of the available units.

03

Calculate Density

Click calculate to convert the units and determine the gas density in g/L.

Worked Example

Gas Density Calculation Example

Consider nitrogen with a molar mass of approximately 28.0134 g/mol at 1 atm and 25°C. First convert the temperature to Kelvin: 25 + 273.15 = 298.15 K.

ρ = (1 × 28.0134) ÷ (0.082057 × 298.15) Gas Density ≈ 1.145 g/L
Formula Reference

Gas Density Formula Variables

Symbol Meaning Calculator Unit
ρ Gas Density g/L
P Absolute Pressure atm after conversion
M Molar Mass g/mol
R Ideal Gas Constant 0.082057 L·atm/(mol·K)
T Absolute Temperature Kelvin
Understanding Results

What Affects Gas Density?

Pressure

For an ideal gas at constant temperature and molar mass, increasing absolute pressure increases gas density.

Temperature

At constant pressure and molar mass, increasing absolute temperature decreases ideal-gas density.

Molar Mass

Under the same temperature and pressure, a gas with a larger molar mass has a larger ideal-gas density.

Unit Support

Supported Pressure and Temperature Units

You do not need to manually convert common pressure or temperature units. The calculator converts the selected values internally before applying the gas density equation.

Measurement Supported Units Internal Unit
Pressure atm, kPa, Pa, bar, mmHg, Torr, psi atm
Temperature °C, K, °F Kelvin
Molar Mass g/mol, kg/mol g/mol
Density Result g/L g/L
Important: This calculator uses the ideal gas model. Real gases can deviate from ideal behavior, particularly under conditions where intermolecular effects become important.
Frequently Asked Questions

Gas Density Calculator FAQs

What is the formula for gas density?
For an ideal gas, density can be calculated using ρ = PM/RT, where P is absolute pressure, M is molar mass, R is the gas constant, and T is absolute temperature.
What unit is used for gas density?
Gas density is commonly expressed in grams per liter (g/L). This calculator provides its main result in g/L.
Does gas density increase with pressure?
In the ideal-gas model, density increases with absolute pressure when temperature and molar mass remain constant.
Does gas density decrease with temperature?
Yes. For an ideal gas at constant pressure and molar mass, increasing absolute temperature decreases density.
Why must temperature be converted to Kelvin?
The ideal gas equation uses absolute temperature, so Celsius or Fahrenheit values must first be converted to Kelvin.
Can I enter pressure in kPa?
Yes. This calculator accepts kPa as well as atm, Pa, bar, mmHg, Torr, and psi and converts the pressure automatically.
Can this calculator find gas molar mass?
This calculator is designed primarily to find gas density. Molar mass can be found by rearranging the same ideal-gas density relationship when density, pressure, and temperature are known.
Is the gas density formula exact for every gas?
The equation used here is based on ideal-gas behavior. It provides a useful approximation, while real gases may deviate from the ideal model under some conditions.