Molar Mass of Gas Calculator

Advanced calculator for molar mass from lab samples or measured density across varied conditions. Handle real gas behavior with optional compressibility factor Z for improved accuracy. Flexible inputs support many pressure temperature and volume units globally. Instant calculations with clean layout validation and helpful explanations included. Export tables to CSV and PDF instantly anytime.

Inputs

Use mass of the gas sample plus pressure, temperature, and volume.
dimensionless
Use 1 for ideal gas. Real gases may require Z.
Use measured density with pressure and temperature to compute molar mass.
dimensionless
Use 1 for ideal gas. Real gases may require Z.

Result

Molar Mass
g/mol
Calculated using R = 8.314462618 J·mol⁻¹·K⁻¹
Inputs (normalized)
Pressure Pa
Temperature K
Volume
Mass kg
Density kg/m³
Z
Mode:

Results Table

# Timestamp Mode M (g/mol) P (Pa) T (K) V (m³) m (kg) ρ (kg/m³) Z

Example Data

Load an example into the form to test calculations.

ExampleDetails
Air via density ρ = 1.225 kg/m³, P = 1 atm, T = 15 °C, Z = 1
N₂ via mass m = 1.15 g, V = 1 L, P = 1 atm, T = 25 °C, Z = 1

Common Gas Presets

Pick a gas and reference conditions. We'll estimate density from the ideal relation using its molar mass and fill the density method. Adjust Z if needed.

Note: Densities are computed from ρ = P M / (Z R T) at selected conditions. For higher pressures or polar gases, Z may deviate noticeably from 1.

Formula Used

Ideal gas: PV = nRT, n = m / M.

Mass method: M = m Z R T / (P V)

Density method: M = ρ Z R T / P

Where M is molar mass, m is mass, ρ density, P pressure, V volume, T temperature, Z compressibility factor, R = 8.314462618 J·mol⁻¹·K⁻¹.

Units are normalized to SI during calculation, then converted to g/mol for display.

How to Use

  1. Select a tab for your preferred method.
  2. Enter values and choose correct units for each field.
  3. Set Z if non-ideal behavior is expected. Otherwise keep 1.
  4. Use Gas Library to pick a preset quickly.
  5. Click Calculate to see the molar mass result.
  6. Use Add to Table to log the scenario.
  7. Export your table with Download CSV or create a PDF.
Tip: Celsius will be converted to Kelvin automatically.

FAQs

Use the mass method when you know sample mass, pressure, temperature, and volume. Use the density method when a reliable gas density measurement is available.

Z accounts for real gas deviations from ideal behavior. For many gases at moderate pressures and temperatures, Z is near 1. Increase accuracy by entering a known Z if available.

Pressure: Pa, kPa, bar, atm, mmHg, psi. Temperature: K or °C. Volume: m³, L, mL. Mass: kg, g, mg. Density: kg/m³ or g/L.

Differences can arise from measurement uncertainty, unit mistakes, or non-ideal behavior. Verify units, ensure accurate readings, and consider using a Z value for real gases.

The calculator reports primary results to two decimal places and keeps higher internal precision. You can copy precise values from the results table if needed.

Yes. Add scenarios to the table, then export to CSV for spreadsheets or create a PDF summary for reports.

Related Calculators

Mole Fraction CalculatorNormality Calculator

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.