Convert a gas volume to mass by multiplying its volume by its density, provided the density is known for the same gas at the same temperature and pressure. This calculator uses the ideal gas law instead: enter gas volume, molar mass, temperature, and pressure to calculate the gas mass in grams, along with the amount in moles.
Formula
The ideal gas law is PV = nRT. First calculate the amount of gas, then multiply by its molar mass:
- n = PV / (RT), where n is amount in moles, P is absolute pressure in kilopascals, V is volume in litres, R is the gas constant, and T is absolute temperature in kelvins.
- m = nM = PVM / (RT), where m is mass in grams and M is molar mass in grams per mole.
Here the pressure input is in kPa and volume is in L, so use R = 8.31446261815324 kPa·L/(mol·K). This is the same numerical value as the SI gas constant in J/(mol·K), because 1 kPa·L equals 1 J. Pressure must be absolute, not gauge pressure. Temperature must be in kelvins; convert Celsius using K = °C + 273.15. If you start with millilitres, convert to litres by dividing by 1000.
Worked Example
For the defaults, take a 1 L sample of nitrogen gas with molar mass 28.014 g/mol at 298.15 K and 101.325 kPa. The calculator uses the ideal gas law:
n = (101.325 kPa × 1 L) / (8.31446261815324 kPa·L/(mol·K) × 298.15 K) ≈ 0.040874 mol
Then calculate mass:
m = 0.040874 mol × 28.014 g/mol ≈ 1.1452 g
Equivalently, substituting directly gives m = (101.325 × 1 × 28.014) / (8.31446261815324 × 298.15) ≈ 1.1452 g. Rounded to the calculator’s four decimal places, the result is 1.1452 g. The amount is 0.0409 mol.
Assumptions
- The gas behaves ideally, which is a useful approximation at moderate pressures and temperatures well away from condensation.
- The input volume is the gas volume at the stated temperature and absolute pressure.
- The sample is a single gas with the entered molar mass. For a mixture, use its mixture-average molar mass.
- Temperature is in kelvins and pressure is absolute.
Why Temperature and Pressure Matter
A gas does not have a fixed mass per litre under all conditions. Heating a sealed gas at fixed volume raises its pressure; allowing it to expand changes its volume. Compressing the same gas into a smaller space raises its density. That is why a volume alone cannot determine a gas mass: the gas identity, temperature, and pressure are also needed.
At a specified pressure and temperature, the ideal gas law estimates how many moles occupy a volume. Molar mass then converts moles to grams. A familiar reference point is the molar volume near room temperature and one atmosphere: an ideal gas occupies about 24.5 L per mole at 25 °C and 1 atm. This is not a universal fixed volume. At 0 °C and 1 atm, the corresponding ideal-gas volume is about 22.4 L/mol. Always use the actual conditions rather than treating either figure as applicable everywhere.
How to Use the Calculator
- Enter the gas volume in litres. Convert other volume units first; for example, 500 mL is 0.500 L.
- Enter the gas’s molar mass in g/mol. For a pure element or compound, use its formula and standard atomic weights to determine it.
- Enter the temperature in kelvins. For a Celsius reading, add 273.15; for example, 20 °C is 293.15 K.
- Enter absolute pressure in kPa. If pressure is given in atmospheres, multiply by 101.325 to convert to kPa.
- Read the first result as mass in grams. The second result is the amount in moles, which is useful for checking the calculation.
The calculator’s smallest positive input limits prevent zero or negative values, which would make the formula invalid for an ordinary gas sample. They are not suggested measurement limits: use values and precision appropriate to your actual data.
Choosing Molar Mass and Density Methods
Molar mass depends on the chemical formula. For nitrogen gas, N2, two nitrogen atoms give approximately 28.014 g/mol. For a gas mixture, such as air, use an appropriate average molar mass if the composition is known; treating a mixture as pure nitrogen or oxygen can give a misleading mass.
If a reliable density is already available for the exact gas composition and conditions, the simpler relation is m = ρV, where density ρ and volume V must use compatible units. For example, multiplying density in g/L by volume in L gives mass in grams. Density tables must state temperature and pressure: using a density measured at one condition for a volume measured at another can produce an incorrect result. The ideal-gas calculator is useful when those conditions and the molar mass are known but density is not.
Common Errors and Limits
- Using gauge pressure: Gauge pressure is relative to surrounding air. Add the local atmospheric pressure to obtain absolute pressure before using the formula. At standard atmospheric conditions, that pressure is approximately 101.325 kPa, but local conditions can differ.
- Mixing units: The calculator expects L, kPa, K, and g/mol. A value in mL, bar, °C, or kg/mol must be converted first.
- Confusing gas volume with liquid volume: A stated volume for a gas means the space it occupies at stated conditions, not the volume of liquid from which it might have come.
- Assuming ideal behavior always holds: At high pressure or near a gas’s condensation point, real-gas interactions can make the ideal-gas estimate inaccurate. A real-gas equation or measured density may be needed.
Results should not be reported with more meaningful precision than the measurements allow. The displayed decimals are calculation formatting, not a claim that the inputs are exact.
Frequently Asked Questions
Can I convert gas volume to mass without temperature and pressure?
No, not from volume alone. You also need the gas identity and either its density at the relevant conditions or enough information to use the gas law, including temperature and absolute pressure.
How many grams are in one litre of gas?
There is no single value. It depends on the gas’s molar mass, temperature, and pressure. Enter those values in the calculator to estimate the mass for one litre.
Should I enter gauge pressure or absolute pressure?
Enter absolute pressure. Gauge pressure excludes atmospheric pressure, so convert it by adding the surrounding atmospheric pressure in matching units.
How do I convert Celsius to kelvins?
Add 273.15. For example, 25 °C equals 298.15 K. The gas-law formula requires kelvins, not Celsius.
Does this work for a gas mixture?
Yes, as an ideal-gas estimate if you enter the mixture’s average molar mass and the mixture’s temperature, pressure, and volume. The accuracy depends on having a suitable composition and average molar mass.
For laboratory calculations, follow your lab method, the safety data sheet (SDS), and your supervisor.
Related
Formula used
in v | Gas volume | L | 1 | 0.000000001 in mm | Molar mass | g/mol | 28.014 | 0.000000001 in t | Temperature | K | 298.15 | 0.000000001 in p | Pressure | kPa | 101.325 | 0.000000001 out m | Gas mass | g | p * v * mm / (8.31446261815324 * t) | 4 out n | Amount of gas | mol | p * v / (8.31446261815324 * t) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Liters to Cubic Meters: Conversion and Examples0.001000 m³
- Normal Cubic Meter to Liters Calculator1,000.00 L
- Qt to Liters Conversion: US and Imperial Quarts0.946353 L
- Meters to Liters Formula: Convert Length to Volume?1,000.000 L
- Meters to Litres: Why Length Alone Is Not Enough1,000.00 L
- Cubic Meters per Hour to Liters per Second0.2778 L/s