**How do you calculate the molar mass of a gas if you know mass, pressure, volume and temperature of the gas?**

If we know mass, pressure, volume, and temperature of a gas, we can calculate its molar mass by using the ideal gas equation. Recall that the ideal gas equation is given as: PV = nRT. We can rearrange this equation in terms of moles (n) and then solve for its value. Once we get the value for moles, we can then divide the mass of gas by moles to get the molar mass.

Here is how to do it:

Let’s now apply equation (3) and (4) to solve the following problem:

*Mary filled her 5.90 L metal cylinder with 1066 g of gas to a pressure of 2025 psi and at a temperature of 25 °C. calculate the molar mass of this gas and use the value of the molar mass to identify the gas. Use the following additional information to help you calculate the correct answer: 1 atm = 14.7 psi and R = 0.08206 L. atm/(mol.K).*

**Strategy**

- To calculate the molar mass of the gas, we must first calculate the moles of the gas. To do this, we must use equation (3); n = PV/RT
- After getting our moles, we will then substitute this value and mass in equation (4) to solve for molar mass
- Units must be consistent. From the units in the universal gas constant, you can see that volume is in liters, pressure in atm, and temperature in Kelvin. This means we must convert the units of pressure from psi to atm. And the units of temperature from degree Celsius to Kelvin.
- To convert from degree Celsius to Kelvin, we simply add 273 to our temperature in Celsius. That is, 273 + 25 °C = 298 K.
- To convert 2025 psi to atm, we simply multipy 2050 psi by the conversion factor, 1 atm/14.7 psi. That is:

**Solution **

From the value of the molar mass, you can tell that this gas is oxygen, with the chemical formula O_{2}.

### How did we know that?

We knew that because from the periodic table the molar mass of one oxygen atom is about 16.00 g/mol. And since oxygen molecule consist of two atoms of oxygen bonded together, then it follows that to get the molar mass of this molecule, we must multiply 16.00 g/mol by 2. And if we do, we will get: 32.00 g/mol. This value is almost the same as what we got.

### What are some things to keep in mind when solving gas law problems?

Here are some tips to keep in mind when using the ideal equation to solve gas problems:

- Ensure that the units attached to the variables are consistent with the units in the universal gas constant. For example, our answer in the above problem would have been wrong if we had used pressure in psi instead of in atm.
- If your universal gas constant has the unit Kelvin(K) attached to it, convert your temperature to Kelvin
- If your universal gas constant has the unit liters attached to it, convert your volume from whatever units to liters
- If asked to calculate mass or molar mass, recall that mass and molar mass are related to moles (see the example above)

To learn how to calculate the density of gas click here

To learn how to calculate the mass of gas click here