Moles to Grams and Gas Volume Calculator

Convert grams, moles, and liters at STP, IUPAC STP, SATP, or an actual temperature and pressure. Choose what to calculate; the form then asks only for the known values required. Molar mass is needed for any conversion involving mass, and can be entered or calculated from a chemical formula.

Calculate a chemistry conversion

Known values: mass and molar mass. Calculated value: moles.

Select the value supplied by your problem.
Enter a positive amount.
Enter a positive mass.
Enter a positive dry-gas volume.
Enter g/mol, or use a chemical formula below.
Examples: CO2, H2O, Ca(OH)2. This fills molar mass.

Result

Choose a calculation mode, enter the known values, and select Calculate.

Advertisement

Formula summary

Mass and amount: n = m/M and m = nM. Preset gas volume: V = nVm. Actual conditions: PV = nRT, using absolute temperature.

Guided examples

Choose an example to preload its mode and inputs, then select Calculate to see substitution, units, and rounded results.

How to convert grams to moles

Find molar mass from the formula or a reference, convert the mass to grams, then use n = m/M. For 18.015 g H₂O, n = 18.015 g ÷ 18.015 g/mol = 1.000 mol.

How to convert moles to gas volume

At a stated reference condition, multiply by its molar volume: V = nVm. At actual conditions use V = nRT/P with temperature in kelvin.

How to convert gas volume to mass

First find n = V/Vm for a preset, or n = PV/RT at actual conditions. Then calculate m = nM.

How to find molar mass

For gas mass and volume, find moles from the gas conditions, then M = m/n. A chemical formula can also be parsed by adding the atomic masses of its elements.

Frequently asked questions

Which molar volume should I use?

Use the convention stated by the problem: 22.4 is a rounded classroom value and 22.414 L/mol applies at 0 °C and 1 atm; 22.7 or 22.711 L/mol applies at 0 °C and 1 bar; 24.0 L/mol is sometimes used as a classroom room-temperature approximation; 24.465 L/mol applies at 25 °C and 1 atm; and 24.79 L/mol applies at 25 °C and 1 bar.

Does STP mean 1 atm or 1 bar?

Both conventions appear. Traditional classroom STP is 0 °C and 1 atm; IUPAC STP is 0 °C and 1 bar. Always state the convention.

How do I convert mL to L?

Divide mL by 1000. The calculator does this automatically when mL is selected.

Is molar mass required?

Only when converting to or from mass. Direct moles–gas-volume conversions do not need it.

How do I handle gas collected over water?

Subtract water-vapor pressure from total measured pressure, then enter the dry-gas pressure.

Why do real gases differ?

PV = nRT assumes an ideal gas. Molecular size and intermolecular forces cause deviations, especially at high pressure and low temperature.

How are significant figures chosen?

The calculator displays up to six significant digits so work can be checked. Round the final answer to the least precise measured input.

Methodology, accuracy, and review

Preset calculations use Vm = 22.414 L/mol at 273.15 K and 1 atm, 22.711 L/mol at 273.15 K and 1 bar, or 24.465 L/mol at 298.15 K and 1 atm. Custom calculations use PV = nRT with R = 0.082057366 L·atm·mol⁻¹·K⁻¹. Pressure is converted to atm and temperature to kelvin before calculation.

Assumptions: dry, ideal gas at equilibrium. Results show up to six significant digits; match final rounding to source data. This is unsuitable where real-gas corrections, reactions, mixtures, or water-vapor corrections are material.

Editorial responsibility: Starlight Tools Editorial Team. Reviewed and updated 12 July 2026. Method references: IUPAC definitions of STP and the ideal-gas equation. To report a correction, use the site contact route and include this page URL.

5 Fun Facts about Moles, Mass & Volume

STP isn’t universal

IUPAC’s STP (1 bar) gives 22.711 L/mol, while the classroom “1 atm” STP is 22.414 L/mol. Always match your chosen convention.

Pick your standard

Avogadro’s stack of marbles

A mole of marbles would blanket Earth in a shell kilometers thick; that’s how the mole bridges atomic counts to human-scale masses.

Scale shock

Wet gas reads light

Collecting gas over water adds water vapor; subtract its partial pressure or your calculated moles will be too high.

Dry it out

Z tweaks PV = nRT

The compressibility factor \(Z\) measures real-gas quirks—CO₂ near room temp can deviate a few percent from ideal volume.

Real gas

Gas density fingerprints MW

Mass and volume at a known \(V_m\) (e.g., SATP) let you back-calc molecular weight, a quick way to guess an unknown gas.

Gas ID

Explore more tools