If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Worked example: Using the ideal gas law to calculate number of moles

The ideal gas law relates four macroscopic properties of ideal gases (pressure, volume, number of moles, and temperature). If we know the values of three of these properties, we can use the ideal gas law to solve for the fourth. In this video, we'll use the ideal gas law to solve for the number of moles (and ultimately molecules) in a sample of gas. Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user David
    At , how come the unit millimeters can be used to measure pressure?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • scuttlebug green style avatar for user Tzviofen ✡
    Where on KA can I learn about Torr and mmHg and pressure and other units?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • starky sapling style avatar for user kaferkin
    At , Sal says that 754 mm Hg is a unit of pressure. Why? I feel like I missed a video.
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      Yeah mm Hg (millimeters of mercury) is a unit of pressure. It's also called a Torr after Italian scientist Evangelista Torricelli who invented the barometer. The definition itself it based on the mercury barometer which measures atmospheric pressure.

      The way a barometer works is if you have a thin tube closed at one end with all the air evacuated from it so that it is a vacuum inside. Placing that tube with the open air into a body liquid will result in some of the liquid flowing into the tube and reaching a certain height above the rest of the liquid's surface. Essentially what happens is that the liquid is forced into the tube by the pressure of the atmosphere pushing on the liquid's surface. The more force applied to the liquid's surface, the higher the level inside the tube rises. So what the barometer is really doing is measuring atmospheric pressure based on the height of that liquid.

      Now the type of liquid you choose also determines how high the liquid level rises to; specifically it depends on its density. The actual numerical height is determined by Jurin's law. Without getting too much into the math, the greater the density of the liquid the smaller the height of the liquid in the tube. So if you're designing a barometer the most convenient liquid would probably be water. However the density of water is so low that it would result in such a high liquid height that it would make the barometer impractical to use. Torricelli chose mercury instead because its density was much greater than that of water which required a much smaller barometer whose height would amount to less than 10 centimeters at atmospheric pressure.

      So the height of mercury, read in millimeters, in a mercury barometer tells us the amount of pressure applied by the atmosphere. But since it's just measuring pressure we can use mm of Hg as a pressure unit for other things, not just barometers. In case you're curious one of the places where it's used is to measure blood pressure. The two numbers in blood pressures are in units of mm Hg.

      Hope that helps.
      (14 votes)
  • blobby green style avatar for user alexbarnett173
    how did he get the number 6.022x10^23?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user anomaly.performance
    At Sal divided by the temperature when the formula says it should be multiplied. Was there a reason for this in the video I missed?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Hecretary Bird
      The ideal gas law says that PV = nRT. We would multiply by T if we wanted to find something like pressure of volume. However, this problem asks us to solve for the number of moles of gas, or n. To do this, you can solve for n in the equation as Sal did, and get n = PV / RT. Here, you can see that to get n, we multiply pressure and volume, and then divide by temperature and R.
      (4 votes)
  • duskpin seed style avatar for user lilymc624
    would this same process work if you had to solve for pressure or volume? with minor adjustments of course
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      Yes, if you were dealing with an ideal gas the ideal gas law would still apply which could be used to calculate (in addition to number of moles) temperature, pressure, and volume of the gas.

      Since the ideal gas law is: PV = nRT, it has four variables (P, V, n, and T), we would need to know three of the four to calculate the fourth variable. But with the appropriate given information it allows us to know any of the four variables.

      Hope that helps.
      (2 votes)
  • hopper cool style avatar for user JPOgle ✝
    In this video, Sal found the number of moles of air there were. However, air is made up of many different kinds of molecules, with different numbers and types of atoms and different masses. How does this work out?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      Sal is using the ideal gas law which assumes the gases to be ideal. An ideal gas is composed of spherical particles which have no mass or forces of attraction to each other or the walls of the container. It's not really what the real gases are since we have a mixture of molecules in air, but using an ideal gas approximation simplifies the math and produces answers with acceptable accuracy. So here we view all moles of gas, regardless of what compound they actually are, as the same.

      Hope that helps.
      (4 votes)
  • piceratops ultimate style avatar for user AAGAM JAIN
    but what is the relation between P1V1/T1 = P2V2/T2 &
    PV=nRT?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      If the number of moles of the gas stays constant then that relation holds. If PV/T = nR, where n and R are constants then, P1V1/T1 = nR and P2V2/T2 = nR. Then through the transitive property P1V1/T1 = P2V2/T2.

      Hope that helps.
      (4 votes)
  • winston baby style avatar for user Joesufph
    I was wondering how to tell the number of significant figures. Isn't the original temperature given in 2 significant figures? Do we change it to three because of the conversion?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      In general with sig figs your answer should have no more digits than the number with the smallest number of sig figs. But the particulars depend on which mathematical operation you're performing.

      If we're multiplying/dividing then we consider the digits of the entire number for sig fig purposes. If we're adding/subtracting then we only consider the digits to the right of the decimal point for sig fig purposes. Side note There's also rules for using exponents/logarithms but I won't cover them here because they're not relevant for the video's problem.

      So before Sal performed the final calculation, he converted the temperature from °C to K. This involves adding 273.15 to the temperature in °C to do so. So mathematically this would look like: 273.15 + 21 = 294.15, but for sig fig purposes we need to look at the decimal digits. The 273.15 has two decimal digits, but the 21 has zero decimal digits so the answer should have as many decimal digits as the number with the fewest decimal digits; or zero. So the answer accounting for sig figs should be just 294 K, which is now three sig figs. Now this is only an intermediate calculation so technically we shouldn't round off before the last calculation.

      When Sal performed the final calculation it was all multiplication/division. For that calculation we need to identify how many sig figs there are for all the numbers and remember that are answer should have as many as the number with the fewest sig figs. So between the numbers: 754 Torr (3 sig figs), 1.85 L (3 sig figs), 62.36 L Torr mol^-1 K^-1 (4 sig figs), and 294 K (3 sig figs); three sig figs is the smallest number of sig figs so the final answer should only have three sigs.

      Hope that helps.
      (3 votes)
  • primosaur ultimate style avatar for user Marvyn Greco
    my calculator wont do the EE thing
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      Sal is just using the apple calculator that comes with a Mac.

      Different calculators have different ways of expressing exponents. So it depends on what type of calculator you’re using. Some use the ‘EE’ symbol, the Windows one uses ‘exp’, Google uses ‘EXP’. They all also have 10^(x) and y^(x) symbols for expressing exponents.

      I mean, not being able to use your calculator because you don’t know how to use it doesn’t mean your calculator is obsolete. If you’re using a handheld calculator like a TI or a Casio, then it helps to simply looks up your model’s instruction manual and learn the commands.
      (2 votes)

Video transcript

- [Instructor] We're told an athlete takes a deep breath, inhaling 1.85 liters of air at 21 degrees Celsius and 754 millimeters of mercury. How many moles of air are in the breath? How many molecules? So pause this video, and see if you can figure this out on your own. All right, now let's work through this together. So let's think about what they are giving us and what we need to figure out. So, they are giving us a volume, right over here. They are also giving us a temperature, right over here. They're also giving us, I'm trying to use all of my colors here, they're giving us a pressure. And they want us to figure out the number of moles. I'm gonna use a green color here. So they want to know, so we often use the lowercase letter, n, to represent the number of moles. And so, do we know something that connects pressure, temperature, volume, and the number of moles? Well, you might be thinking of the Ideal Gas Law, which tells us that pressure times volume is equal to the number of moles, n, times the ideal gas constant, R, times temperature, T. And so we know everything here except for n, so we can solve for n. I know what some of you are saying, "Wait, do we know R?" Well, R is a constant. And it's going to be dependent on which units we use, and we'll figure out which version of R we use. But that's why I gave you this little table here, that you might see on a formula sheet, if you were taking something like an AP exam. So we actually do know what R is. So, we just need to solve for n. So, to solve for n, you just divide both sides by RT, and so you are going to get that n is equal to pressure times the volume over R times T, R times T. And so this is going to be equal to what? Well, our pressure is 754 millimeters of mercury. Now, over here, where they give us the ideal gas or the different versions of the ideal gas constants, you don't see any of them that deal with millimeters of mercury. But they do tell us that each millimeter of mercury is equal to a Torr. If you get very, very, very precise, they are slightly different. But for the purposes of a first-year chemistry class, you can view a millimeter of mercury as being a Torr. So, you can view the pressure here as 754 Torr. So, let me write that down. So, this is 754 Torr. And then we're going to multiply that times the volume. And here, they give the volume in liters in several of these, and we're probably going to be using this one, this version of the ideal gas constant, that has liters, Torr, moles, and Kelvin. And so let's multiply times the volume, so times 1.85 liters. And then that is going to be divided by the ideal gas constant. I'll use this version because it's using all of the units that I already have. I know what you're thinking, "Wait, the temperature's given in degrees Celsius." But it's easy to convert from degrees Celsius to Kelvin. You just have to add 273 to whatever you have in degrees Celsius to get to Kelvin, because none of these are given in degrees Celsius. And so, I will use this ideal gas constant. So this is going to be 62.36 liter Torr liter Torr, per mole Kelvin. Mole to the negative one is just one over mole, so I could write it like this. Kelvin to the negative one is just one over Kelvin. And then, I'm gonna multiply that times the temperature. So times, what is 21 degrees Celsius in terms of Kelvin? Well, I add 273 to that, so that's going to be 294 Kelvin. And we can validate that the units all work out. This liter cancels out with this liter. This Torr cancels out with that Torr. This Kelvin cancels out with this Kelvin. And so, we're going to be left with some calculation. And, it's going to be one over one over moles, or it's essentially going to simplify to just being a certain number of moles. And so, let's get our calculator out to figure out the number of moles in that breath. So n, I keep using slightly different colors, so n is going to be equal to 754 times 1.85 divided by 62.36 and then, also divided by, divided by 294, is equal to this thing. And let's see how many significant digits we have. We have three here, three here, three here, four here. So, when we're multiplying and dividing, we just want to use the fewest amount that I'm dealing with. So I wanna go to three significant figures. So 0.0, one, two, three significant figures, so 0.0761. This is going to be 0.0761. And I could say approximately 'cause I am rounding. But that's three significant figures there. So, that's the number of moles of air in the breath. Now, the next question is how many molecules is that? Well, we know that each mole has roughly 6.022 times 10 to the 23rd molecules in it, so we just have to multiply this times 6.022 times 10 to the 23rd. So, we could write it this way. We could write 0.0761 moles, I'll write mole, times 6.022 times 10 to the 23rd molecules, molecules per mole. Now these are going to cancel out, and I'm just going to be left with molecules. And I can just take the number that I had before 'cause it's nice to be able to retain precision until you have to think about your significant figures. And so, but once again, because we did this whole calculation, we're going to wanna round everything to three significant figures. So, let's just multiply this times 6.022. EE means times 10 to the, times 10 to the 23rd, is equal to that. And, if I round to three significant figures, because my whole calculation, that was my limiting significant figures, I have 4.58 times 10 to the 22nd. So, this is 4.58 times 10 to the 22nd molecules. Squeeze that in there, and we're done.