How this instrument works
Gas density is mass packed into a volume, and the ideal gas law hands you both pieces without a scale or a graduated cylinder. Multiply moles by molar mass to get mass, and the law already gives volume in terms of pressure, moles, and temperature; combine the two and moles cancel, leaving ρ = PM ⁄ (RT). At fixed pressure and temperature, density is directly proportional to M alone — the whole reason two gases sharing a room can behave so differently even though nothing about the room itself changed.
Anyone deciding where to mount a gas detector is really asking a molar-mass question. Propane, 44.1 g/mol, and butane, 58.1 g/mol, both come out denser than the 28.97 g/mol average of air under identical pressure and temperature, so leaked LPG sinks toward the floor of a garage, cellar, or boat bilge — the reason propane detectors sit low on a wall. Methane, 16.04 g/mol and the main component of natural gas, is lighter than air and rises instead, which is why its detectors go near the ceiling. Combustion risk and toxicity play no part in that placement decision — only this ratio.
This formula assumes molecules that neither take up space nor pull on each other, an assumption dry air, methane, and propane vapor satisfy closely at ordinary building pressures but abandon near whatever pressure or cold a gas would rather condense at. A propane cylinder is mostly liquefied propane under its own vapor pressure, and this line describes only the vapor space above that liquid, not the compressed liquid filling most of that tank. Absolute pressure and absolute temperature are both non-negotiable: a gauge reading of zero is actually one atmosphere absolute, and skipping that conversion throws the answer off by a fixed, predictable amount rather than a subtle one.
- Enter Pressure — the field defaults to kPa, with Pa and atm also on its menu; use absolute pressure, never a gauge reading.
- Enter Molar mass, g ⁄ mol straight off a periodic table, cylinder label, or safety data sheet — no conversion to kilograms needed.
- Enter Temperature, K directly in kelvin — add 273.15 to any Celsius reading first; the field has no Celsius option and rejects zero.
- Read Gas density, kg ⁄ m³ and compare it with dry air's 1.225 kg/m³ at sea level to see whether your gas would rise or sink if released.
Worked example — sea-level air, then a leak-safety comparison
Dry air's accepted molar mass, 28.97 g/mol, typed straight from a data table with no conversion, paired with 101325 Pa of pressure and 288.15 K — 15 °C, the sea-level reference every aircraft and weather chart assumes — produces Gas density, kg ⁄ m³ = (101325 × 28.97) ⁄ (8.31446261815324 × 288.15 × 1000) = 1.22521498169 kg/m³, the number the instrument displays rounded to six decimal places.
Because density is directly proportional to molar mass at fixed pressure and temperature, the same 101325 Pa and 288.15 K applied to propane's 44.1 g/mol instead of air's 28.97 scales that answer up to roughly 1.87 kg/m³ — about 1.5 times heavier than the air around it. Run methane's 16.04 g/mol through the identical pressure and temperature and density drops to roughly 0.68 kg/m³, little more than half of air.
That linearity is why safety codes place detectors differently: leaking propane pools near floor level in a basement or bilge, while a natural-gas leak, mostly methane, collects near ceilings instead. Stratification rarely stays neat once fans, drafts, or open doors let real air currents mix things up, which is why codes often mandate detection at both levels for anything containing an unpredictable blend of the two.
Questions
Why enter molar mass in g/mol instead of kg/mol?
Because that is how molar mass is normally reported — periodic tables, safety data sheets, and cylinder labels all give it in grams per mole, so this field takes that number directly. Internally the instrument divides by 1000 before combining it with pressure and temperature, so there is no decimal point to move by hand. Type 44.1 for propane or 16.04 for methane exactly as printed, not 0.0441 or 0.01604.
Why does a leaking propane cylinder pool near the floor while natural gas collects at the ceiling?
Molar mass. At the same pressure and temperature, gas density is directly proportional to M, and propane's 44.1 g/mol is about one and a half times air's 28.97 g/mol, so it sinks; methane's 16.04 g/mol is little more than half of air's, so it rises. That single ratio, computed with this formula, is the physical reasoning behind why LPG detectors mount low and natural-gas detectors mount high — not a rule of thumb, but this exact calculation.
Does the answer change if I enter gauge pressure by mistake?
Yes, and it understates density by a fixed, predictable margin. The ideal gas law runs on absolute pressure — force per unit area measured from true vacuum — so any gauge reading of 0 kPa at sea level is really about 101.325 kPa absolute. Take a propane regulator set to 30 kPa gauge: entering 30 instead of roughly 131 kPa absolute returns density more than four times too low, since the missing atmosphere is a large fraction of a low-pressure reading.
Why won't the Temperature field accept a Celsius reading?
Because the gas constant R is defined against kelvin's scale, which starts at absolute zero rather than the freezing point of water. Feeding in 15, meaning 15 °C, instead of 288.15 K would inflate the computed density by a factor of about 19, since it treats temperature as a measure of molecular energy from true zero. Add 273.15 to any Celsius reading before typing it in; from Fahrenheit, subtract 32 and multiply by five ninths first.
How trustworthy is this for a real gas cylinder, not just dry air?
Close to exact for a gas well above its boiling point and well below the pressure at which it would condense — dry air, methane, and propane vapor above its own liquid all sit within a fraction of a percent of ideal behavior at ordinary building pressures. It breaks down for the liquid itself: a propane cylinder is mostly liquefied propane under its own vapor pressure, and this formula only describes the vapor space above that liquid.
What does a Pressure entry of zero return?
Zero density, which makes physical sense: a perfect vacuum holds no molecules, regardless of molar mass or temperature, so there is nothing to weigh. The instrument accepts Pressure entries of 0 for exactly this reason, a quick sanity check confirming the formula behaves as expected before trusting it with readings that matter, such as cylinder pressures or duct measurements.