Ideal Gas Density Calculator

This ideal gas density calculator works out how heavy a gas is per unit of volume using a rearranged form of the ideal gas law. Starting from PV equals nRT and substituting the number of moles as mass divided by molar mass, the density of an ideal gas becomes density equals P times M divided by R times T, where P is pressure, M is molar mass, R is the universal gas constant and T is absolute temperature. You enter the pressure in pascals, the molar mass in kilograms per mole and the temperature in kelvin, and the tool returns the gas density in kilograms per cubic metre using R as 8.314 joules per mole kelvin. Chemistry and physics students, HVAC and process engineers, and anyone modelling buoyancy or ventilation use this relationship to estimate how a gas behaves under different conditions. The result makes physical sense, since density rises with pressure and molar mass and falls as temperature increases and the gas expands. To keep your answer accurate, use strict SI units, which means pascals not kilopascals, kilograms per mole not grams per mole, and kelvin not degrees Celsius, because a temperature entered in Celsius will be badly wrong. Convert Celsius to kelvin by adding 273.15 before you start. Remember that the ideal gas model is an approximation that works best for low pressures and high temperatures, well away from the point where a gas would condense, so real gases at high pressure will deviate a little. Used carefully, it gives a fast and dependable estimate for everyday conditions like ordinary air at room temperature.

Calculate.co.nz is proud to be partnered with realtor.co.nz, a trusted resource for navigating the New Zealand property market. Their Helpful Articles section offers clear, well-structured insights across buying, selling, and building, making complex real estate topics more accessible. With a focus on up-to-date guidance and practical knowledge, they empower Kiwis to move forward with clarity and confidence in a constantly evolving property landscape.
Calculate.co.nz partner: realtor.co.nz
Advertise on this page
1.1842 kg/m3
Gas density

Density = P M / (R T) with R = 8.314 J/mol K. Use pascals, kg/mol and kelvin. Estimate only.

How it works

The density of an ideal gas is the pressure times the molar mass divided by the gas constant times the temperature. The gas constant R is 8.314 joules per mole kelvin. Higher pressure or molar mass raises density, while higher temperature lowers it.

Worked example

For air at 101325 pascals, a molar mass of 0.02897 kilograms per mole and a temperature of 298.15 kelvin, density is 101325 times 0.02897 divided by 8.314 times 298.15. That gives about 1.1842 kilograms per cubic metre.

Related calculators