The ideal-gas law is PV=nRT. Since the moles of a substance can be found by the equation n=m/M where m = mass and M = molar mass, you can substitute this in to get: PV = mRT/M So you can rearrange this equation to read: M = mRT/PV
To solve for molar mass using the ideal gas law equation, you need to rearrange the equation to solve for molar mass, which gives you m = mRT/PV. Once you have the values for pressure (P), volume (V), temperature (T), and the gas constant (R), you can plug them into the equation to find the molar mass (m).