This calculator finds the amount of oxygen in moles from its mass, or estimates moles of oxygen gas from its volume, pressure, and temperature. Enter one set of measurements and it returns moles; choose the route that matches what you know. For oxygen gas, use O2, whose molar mass is 31.998 g/mol; for oxygen atoms in a compound, use the compound’s formula and stoichiometry instead.
Formula
Select one method in the calculator. For a mass measurement, use n = m / M, where n is the amount of O2 in mol, m is the oxygen gas mass in g, and M is the molar mass of O2, 2 × 15.999 = 31.998 g/mol. The atomic weight 15.999 is the IUPAC abridged standard atomic weight for oxygen.
For a gas volume, use the ideal gas law rearranged as n = PV / (RT). Here P is absolute pressure in kPa, V is volume in L, T is absolute temperature in K, and R = 8.31446261815324 J/(mol·K). Since 1 kPa·L = 1 J, these units work together directly. Convert the entered temperature from Celsius using T = t + 273.15 K. The calculator’s first result is moles, whichever method is selected; the second result shows the molar mass used for the mass method.
Worked Example
The defaults select the mass method and use 32 g of oxygen gas. The calculation is:
M(O2) = 2 × 15.999 = 31.998 g/mol
n = m / M = 32 g / 31.998 g/mol ≈ 1.0001 mol
Rounded to the calculator’s four decimal places: 1.0001 mol O2.
To check the gas-volume route, select “From gas volume” and use the default values: V = 1 L, P = 101.325 kPa, and t = 0 °C. Then T = 0 + 273.15 = 273.15 K, and n = (101.325 × 1) / (8.31446261815324 × 273.15) ≈ 0.044616 mol. Results can differ slightly from familiar textbook values if those use a rounded gas constant.
Assumptions
- The mass route assumes the sample is pure O2 and uses the standard atomic weight stated above.
- The volume route assumes ideal-gas behavior, absolute pressure, and temperature above absolute zero. Real gases may deviate, especially at high pressure or low temperature.
- Use volume and pressure values that describe the same gas sample at the stated temperature.
What You’ll Need
- For the mass route: the oxygen sample’s mass and a balance reading in grams.
- For the gas route: gas volume in liters, absolute pressure in kilopascals, and temperature in degrees Celsius.
- A calculator or this page’s calculator. If working in a laboratory, follow your lab method, the safety data sheet (SDS), and your supervisor.
Step-by-Step
- Decide what “oxygen” means in your problem. Oxygen gas is diatomic O2, so each molecule contains two oxygen atoms. An oxygen atom within a compound is not automatically a mole of O2; use the compound’s chemical formula and the reaction ratio if the question concerns oxygen in a compound or reaction.
- Choose the measurement you have. Select “From mass” if you know the mass of O2. Select “From gas volume” if you know the volume, pressure, and temperature of a gas sample. Do not enter mass and expect the gas-volume calculation to use it, or vice versa.
- For mass, enter the O2 mass in grams. Convert other mass units before entering them: 1 kg = 1000 g, and 1 mg = 0.001 g. The calculation divides mass by 31.998 g/mol. For example, a 16.0 g sample gives 16.0 / 31.998 ≈ 0.5000 mol O2.
- For gas volume, enter consistent gas conditions. Enter volume in liters, pressure in kPa absolute, and temperature in °C. Convert milliliters to liters by dividing by 1000. For example, 500 mL is 0.500 L. Convert pressure units too: 1 atm = 101.325 kPa; 1 bar = 100 kPa. If pressure is gauge pressure, add the local atmospheric pressure to obtain absolute pressure before using the formula.
- Check the temperature and pressure basis. The formula changes Celsius to kelvin by adding 273.15. Enter a realistic sample temperature and the pressure at which the volume was measured, not a pressure from a different point in a system. A temperature below −273.15 °C is physically impossible and cannot be used.
- Read the first output as moles of O2. The value is the amount of oxygen molecules in mol, not the number of molecules. To convert moles to molecules, multiply by Avogadro’s constant, 6.02214076 × 1023 molecules/mol. Keep extra digits during intermediate calculations and round the final answer to match the precision of your measurements.
- Use reaction coefficients when the question is about a chemical reaction. Convert the oxygen amount to moles first, then apply the balanced equation’s mole ratio. For instance, a coefficient of 2 for O2 means two moles of oxygen gas correspond to the stated stoichiometric amount of the other reactant or product.
Common Mistakes
- Using 16 g/mol for oxygen gas. That is approximately the molar mass of one oxygen atom. O2 contains two atoms, so its molar mass is 31.998 g/mol.
- Confusing atoms with molecules. One mole of O2 contains one mole of O2 molecules and two moles of oxygen atoms. Follow the wording and formula in the question.
- Mixing units. The mass equation expects grams. The gas equation here expects liters, kPa, and kelvin internally; entering mL, atm, or Celsius as though they were the required units gives a wrong result.
- Using gauge pressure directly. The ideal gas law needs absolute pressure. Gauge pressure reads relative to atmospheric pressure, so convert it first.
- Assuming all gas volumes are interchangeable. A volume changes with temperature and pressure. Do not compare volumes measured at different conditions without accounting for them.
- Rounding too soon. Keep the full calculated value until the final step, then round according to the measurement precision or assignment instructions.
Tips
- Write the units beside every number before substituting it. They help reveal missing conversions and cancel in the formula.
- Use the mass method when mass is measured directly; it avoids the ideal-gas approximation.
- For a gas mixture, use oxygen’s partial pressure—not total pressure—if the volume and temperature describe the mixture and the question asks for oxygen alone. Apply Dalton’s law only when the mixture information supports it.
- Check that the final answer is plausible: at about 0 °C and 101.325 kPa, one mole of ideal gas occupies about 22.4 L. Actual conditions and non-ideal behavior can change this comparison.
Troubleshooting
The output is zero or cannot be calculated: Check that the selected route is correct and that required entries are not blank or zero when a meaningful sample is expected. For gas volume, pressure and volume must be positive, and temperature must be above absolute zero.
The gas result seems much too large or small: Check whether you entered mL instead of L, atm instead of kPa, or gauge rather than absolute pressure. A factor of 1000 often points to an mL-to-L error.
The mass result is about twice or half the expected answer: Confirm whether the sample is O2 gas or oxygen atoms in a formula. The 31.998 g/mol value applies to O2; compound calculations require that compound’s molar mass and the appropriate oxygen count.
Two answers differ slightly: Check rounding, the stated atomic weights, and whether a source assumes ideal gas behavior or a different reference temperature and pressure. For precise work, use measured conditions and the method specified by the relevant lab procedure.
Frequently Asked Questions
How many moles are in 1 gram of oxygen gas?
Divide by 31.998 g/mol: 1 g / 31.998 g/mol ≈ 0.03125 mol O2.
Is oxygen’s molar mass 16 or 32 g/mol?
One oxygen atom has a standard atomic weight of 15.999. Oxygen gas is O2, so its molar mass is 31.998 g/mol.
Can I calculate moles from volume alone?
Not generally. Gas volume depends on pressure and temperature, so you also need those conditions or a clearly specified reference condition.
Does the gas-volume formula work for liquid oxygen?
No. The ideal gas law is for gases, not liquids. Do not use it for liquid oxygen; a separate mass or density-based calculation is needed.
How do I find the number of oxygen molecules?
Multiply moles of O2 by 6.02214076 × 1023 molecules/mol. This gives molecules, whereas the calculator’s main result is moles.
What if I need oxygen atoms in a compound?
Calculate moles of the compound, then multiply by the number of oxygen atoms per formula unit. Use a balanced reaction’s coefficients if the problem involves reactants or products.
Related
Formula used
sel route | Calculation method | From mass=1, From gas volume=2 in m | Oxygen mass | g | 32 | 0 in v | Oxygen gas volume | L | 1 | 0 in p | Gas pressure | kPa | 101.325 | 0 in t | Gas temperature | °C | 0 | -273.15 out n | Moles of oxygen | mol | route + (1-route) * (m / 31.998) + (route - 1) * (p * v / (8.31446261815324 * (t + 273.15))) | 4 out mm | Molar mass of O2 | g/mol | 2 * 15.999 | 3
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
- Pressure Density Temperature Equation Calculator100,961.74 Pa
- Pressure Density Depth Formula for Fluids98,066 Pa
- Pressure Density Cup: What It Measures and How It Works1.0000 g/mL
- Pressure, Density, and Temperature: How They Relate101,307 Pa
- Pressure-Based vs Density-Based Solvers in CFD
- Pressure-Based vs Density-Based Solvers in CFD