FROM MEASUREMENTS TO GRAMS PER MOLE

Gas molar mass calculator

Estimate molar mass from a gas sample’s mass, volume, absolute pressure and temperature, with every unit conversion shown.

Four measurements, one estimate

Use the mass of the gas itself and the volume it occupies at the entered pressure and temperature. No standard conditions are assumed.

Exclude the container, liquid and any material not counted in the gas pressure.

Use absolute pressure for the gas whose mass you entered, not gauge pressure.

Negative Celsius or Fahrenheit values are allowed above absolute zero.

Enter all four measurements and confirm their basis.

Find moles from measured gas conditions

The ideal-gas equation connects a gas sample's pressure, volume and temperature with its amount in moles. Once the amount is calculated, dividing the sample mass by that amount gives a molar-mass estimate. This workflow is useful when a problem supplies measurements instead of a chemical formula.

n = PV ÷ RT
M = m ÷ n = mRT ÷ PV

The app converts pressure to Pa, volume to m³ and temperature to K. It uses R = 8.31446261815324 J/(mol·K), the SI product of the exact Avogadro and Boltzmann constants. Because Pa·m³ is a joule, the first result is in mol. Keeping sample mass in g then gives M in g/mol.

A worked sample, without guessing its identity

A gas-only mass of 1.25 g occupies 1 L at 100 kPa absolute and 26.85 °C. The temperature is 300 K and the volume is 0.001 m³. The amount is 100,000 × 0.001 ÷ (R × 300), about 0.0400908 mol. Dividing 1.25 g by that amount gives 31.1792 g/mol.

The measured density is 1.25 g/L. The molar volume at these particular conditions is 24.9434 L/mol. Neither result establishes the gas's chemical identity. A gas mixture can also have an average molar mass; several compositions can share that average.

Match the pressure to the mass

What the ideal-gas assumption leaves out

This estimate uses PV = nRT with no real-gas correction. Intermolecular forces, finite molecular size and condensation can make real samples depart from that model. No universal pressure cutoff guarantees accuracy for every substance. Use a suitable real-gas model or measured property data when the approximation is not justified.

Volume and temperature must refer to the same measured state as pressure. Do not substitute a standard-volume report while keeping operating pressure and temperature. The tool rejects zero mass, pressure or volume and temperatures at or below absolute zero; it cannot detect a plausible-looking but mismatched measurement.

Use the result in a mass-to-moles calculation

If this estimate is suitable for your sample, the grams to moles calculator accepts a custom molar mass. When composition is known instead, the mole fraction calculator finds mixture composition from component masses and formulas. Displayed values use six significant figures, copied values eight; measurement uncertainty is not calculated.

Browse chemistry calculators →

Sources and corrections

OpenStax: ideal-gas law and temperature; OpenStax: gas density, molar mass and partial pressure; NIST CODATA constants. Reviewed September 20, 2026. Calculations stay in your browser and entries are not saved. Send corrections to contact@gramstomoles.org.