Ideal Gas Law Density Calculator

Calculate ideal gas density with flexible units today. Adjust pressure, temperature, molar mass, and compressibility. Download results for chemistry lessons, labs, and quick reports.

Calculator

For density, the density field is ignored.
Use 1 for ideal behavior.

Formula Used

The ideal gas law is PV = nRT. Density uses n = m / M and ρ = m / V.

Density formula: ρ = PM / ZRT

Pressure formula: P = ρZRT / M

Temperature formula: T = PM / ρZR

Molar mass formula: M = ρZRT / P

Here P is absolute pressure. T is absolute temperature. M is molar mass. Z is compressibility factor. R is 8.314462618 J/(mol·K).

How to Use This Calculator

  1. Choose the value you want to solve.
  2. Enter pressure, temperature, molar mass, density, and Z.
  3. Select matching units beside each input.
  4. Leave Z as 1 for an ideal gas estimate.
  5. Press Calculate to view the result above the form.
  6. Use CSV or PDF to download the calculation record.

Example Data Table

Gas Pressure Temperature Molar Mass Z Approx Density
Dry Air 1 atm 25 °C 28.965 g/mol 1 1.184 kg/m³
Nitrogen 101.325 kPa 20 °C 28.0134 g/mol 1 1.165 kg/m³
Carbon Dioxide 1 atm 15 °C 44.01 g/mol 1 1.864 kg/m³
Helium 1 atm 25 °C 4.0026 g/mol 1 0.164 kg/m³

About the Ideal Gas Density Method

Gas density is the mass held in a known volume. The ideal gas law links pressure, volume, moles, and temperature. By replacing moles with mass divided by molar mass, the law becomes a direct density equation. This calculator uses that relationship for fast laboratory and classroom work.

Why Density Changes

Density rises when pressure rises, because gas particles are pushed closer together. Density falls when temperature rises, because a warm gas occupies more space at the same pressure. Molar mass also matters. A heavier gas gives more mass per volume than a lighter gas under matching conditions.

Advanced Controls

The calculator supports many common units. Enter pressure in atmospheres, pascals, kilopascals, bar, or psi. Enter temperature in kelvin, Celsius, Fahrenheit, or Rankine. Molar mass may be entered as grams per mole or related engineering units. You can also set compressibility factor Z. Keep Z at one for an ideal gas. Change it when a real gas correction is known.

Solving More Than Density

The tool can solve for density, pressure, temperature, or molar mass. This helps when one measurement is missing. It also reports specific volume and molar concentration. These extra values make the result easier to compare with tables, process notes, and experiment sheets.

Best Practice

Use absolute pressure, not gauge pressure. Use absolute temperature internally. The calculator converts entered temperature units to kelvin before solving. Check that molar mass matches the gas mixture. For air, a common value is about 28.965 g/mol. For nitrogen, use about 28.0134 g/mol. For carbon dioxide, use about 44.01 g/mol. Small input changes can move the answer, especially near low temperatures or high pressures.

Limits

The ideal gas model is strongest when gases are dilute and far from condensation. Very high pressure can make molecules interact more strongly. Very low temperature can do the same. In those cases, a compressibility factor improves the estimate. This page does not replace a full equation of state. It gives a transparent first calculation. Always compare critical work with trusted data, safety rules, and your instructor or engineer. Record source conditions beside every exported result too.

Reports

After calculation, use the export buttons to save results. CSV is useful for spreadsheets. PDF is useful for sharing a compact record. Both files include the selected inputs, converted values, and final answer.

FAQs

What does this calculator find?

It finds gas density from pressure, temperature, molar mass, and compressibility. It can also solve for pressure, temperature, or molar mass when density is known.

Should I use absolute pressure?

Yes. The ideal gas law uses absolute pressure. Convert gauge pressure to absolute pressure before entering it. Add local atmospheric pressure when needed.

Why does temperature convert to kelvin?

Gas law calculations require absolute temperature. Kelvin starts at absolute zero, so the equation stays physically correct during division and multiplication.

What is Z in the form?

Z is the compressibility factor. Use Z = 1 for ideal gas behavior. Use another value when real gas data gives a better correction.

Can I calculate gas mixtures?

Yes, if you enter the mixture average molar mass. For air, 28.965 g/mol is often used for dry air under common conditions.

Why is my density different from a table?

Tables may use different pressure, temperature, humidity, or real gas corrections. Match all conditions before comparing values.

What units are best for chemistry?

Atmospheres, kelvin, grams per mole, and grams per liter are common in chemistry. SI units are best for engineering reports.

Does the PDF need a library?

No. This page creates a simple PDF directly from the result text. It keeps the file compact and easy to download.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.