Science, Tech, Math › Science How to Calculate Density of a Gas Finding Density From Pressure Share Flipboard Email Print Most of the time, the Ideal Gas Law can be used to make calculations for real gases. Ben Edwards, Getty Images Science Chemistry Basics Chemical Laws Molecules Periodic Table Projects & Experiments Scientific Method Biochemistry Physical Chemistry Medical Chemistry Chemistry In Everyday Life Famous Chemists Activities for Kids Abbreviations & Acronyms Biology Physics Geology Astronomy Weather & Climate By Anne Marie Helmenstine, Ph.D. Chemistry Expert Ph.D., Biomedical Sciences, University of Tennessee at Knoxville B.A., Physics and Mathematics, Hastings College Dr. Helmenstine holds a Ph.D. in biomedical sciences and is a science writer, educator, and consultant. She has taught science courses at the high school, college, and graduate levels. our editorial process Facebook Facebook Twitter Twitter Anne Marie Helmenstine, Ph.D. Updated May 04, 2019 Density is mass per unit volume. Finding the density of a gas is the same as finding the density of a solid or liquid. You have to know the mass and the volume of the gas. The tricky part with gases is that you are often given pressures and temperatures with no mention of volume. You have to figure it out from the other information. This example problem will show how to calculate density of a gas when given the type of gas, the pressure, and the temperature. Question: What is the density of oxygen gas at 5 atm and 27 °C? First, let's write down what we know: Gas is oxygen gas or O2.Pressure is 5 atmTemperature is 27 °C Let's start with the Ideal Gas Law formula. PV = nRT whereP = pressureV = volumen = number of moles of gasR = gas constant (0.0821 L·atm/mol·K)T = absolute temperature If we solve the equation for volume, we get: V = (nRT)/P We know everything we need to find the volume now except the number of moles of gas. To find this, remember the relationship between number of moles and mass. n = m/MM wheren = number of moles of gasm = mass of gasMM = molecular mass of the gas This is helpful since we needed to find the mass and we know the molecular mass of oxygen gas. If we substitute for n in the first equation, we get: V = (mRT)/(MMP) Divide both sides by m: V/m = (RT)/(MMP) But density is m/V, so flip the equation over to get: m/V = (MMP)/(RT) = density of the gas. Now we need to insert the values we know. MM of oxygen gas or O2 is 16+16 = 32 grams/moleP = 5 atmT = 27 °C, but we need absolute temperature.TK = TC + 273T = 27 + 273 = 300 K m/V = (32 g/mol · 5 atm)/(0.0821 L·atm/mol·K · 300 K)m/V = 160/24.63 g/Lm/V = 6.5 g/L Answer: The density of the oxygen gas is 6.5 g/L.