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

What is the ideal gas law?

Learn how pressure, volume, temperature, and the amount of a gas are related to each other.

What is an ideal gas?

Gases are complicated. They're full of billions and billions of energetic gas molecules that can collide and possibly interact with each other. Since it's hard to exactly describe a real gas, people created the concept of an Ideal gas as an approximation that helps us model and predict the behavior of real gases. The term ideal gas refers to a hypothetical gas composed of molecules which follow a few rules:
  1. Ideal gas molecules do not attract or repel each other. The only interaction between ideal gas molecules would be an elastic collision upon impact with each other or an elastic collision with the walls of the container.
  2. Ideal gas molecules themselves take up no volume. The gas takes up volume since the molecules expand into a large region of space, but the Ideal gas molecules are approximated as point particles that have no volume in and of themselves.
If this sounds too ideal to be true, you're right. There are no gases that are exactly ideal, but there are plenty of gases that are close enough that the concept of an ideal gas is an extremely useful approximation for many situations. In fact, for temperatures near room temperature and pressures near atmospheric pressure, many of the gases we care about are very nearly ideal.
If the pressure of the gas is too large (e.g. hundreds of times larger than atmospheric pressure), or the temperature is too low (e.g. minus, 200, start text, space, C, end text) there can be significant deviations from the ideal gas law. For more on non-ideal gases read this article.

What is the molar form of the ideal gas law?

The pressure, P, volume V, and temperature T of an ideal gas are related by a simple formula called the ideal gas law. The simplicity of this relationship is a big reason why we typically treat gases as ideal, unless there is a good reason to do otherwise.
P, V, equals, n, R, T
Where P is the pressure of the gas, V is the volume taken up by the gas, T is the temperature of the gas, R is the gas constant, and n is the number of moles of the gas.
Perhaps the most confusing thing about using the ideal gas law is making sure we use the right units when plugging in numbers. If you use the gas constant R, equals, 8, point, 31, start fraction, J, divided by, K, dot, m, o, l, end fraction then you must plug in the pressure P in units of start text, p, a, s, c, a, l, s, space, end text, P, a, volume V in units of m, cubed, and temperature T in units of start text, k, e, l, v, i, n, space, end text, K.
If you use the gas constant R, equals, 0, point, 082, start fraction, L, dot, a, t, m, divided by, K, dot, m, o, l, end fraction then you must plug in the pressure P in units of start text, a, t, m, o, s, p, h, e, r, e, s, space, end text, a, t, m, volume V in units of start text, l, i, t, e, r, s, space, end text, L, and temperature T in units of start text, k, e, l, v, i, n, space, end text, K.
This information is summarized for convenience in the chart below.
Units to use for P, V, equals, n, R, T
R, equals, 8, point, 31, start fraction, J, divided by, K, dot, m, o, l, end fractionR, equals, 0, point, 082, start fraction, L, dot, a, t, m, divided by, K, dot, m, o, l, end fraction
Pressure in start text, p, a, s, c, a, l, s, space, end text, P, aPressure in start text, a, t, m, o, s, p, h, e, r, e, s, space, end text, a, t, m
Volume in m, cubedvolume in start text, l, i, t, e, r, s, space, end text, L
Temperature in start text, k, e, l, v, i, n, space, end text, KTemperature in start text, k, e, l, v, i, n, space, end text, K

What is the molecular form of the ideal gas law?

If we want to use N, start text, space, n, u, m, b, e, r, space, o, f, space, m, o, l, e, c, u, l, e, s, end text instead of n, start text, space, m, o, l, e, s, end text, we can write the ideal gas law as,
P, V, equals, N, k, start subscript, B, end subscript, T
Where P is the pressure of the gas, V is the volume taken up by the gas, T is the temperature of the gas, N is the number of molecules in the gas, and k, start subscript, B, end subscript is Boltzmann's constant,
k, start subscript, B, end subscript, equals, 1, point, 38, times, 10, start superscript, minus, 23, end superscript, start fraction, J, divided by, K, end fraction
When using this form of the ideal gas law with Boltzmann's constant, we have to plug in pressure P in units of start text, p, a, s, c, a, l, s, space, P, a, end text, volume V in start text, m, end text, cubed, and temperature T in start text, k, e, l, v, i, n, space, K, end text. This information is summarized for convenience in the chart below.
Units to use for P, V, equals, N, k, start subscript, B, end subscript, T
k, start subscript, B, end subscript, equals, 1, point, 38, times, 10, start superscript, minus, 23, end superscript, start fraction, J, divided by, K, end fraction
Pressure in start text, p, a, s, c, a, l, s, space, end text, P, a
Volume in m, cubed
Temperature in start text, k, e, l, v, i, n, space, end text, K

What is the proportional form of the ideal gas law?

There's another really useful way to write the ideal gas law. If the number of moles n (i.e. molecules N) of the gas doesn't change, then the quantity n, R and N, k, start subscript, B, end subscript are constant for a gas. This happens frequently since the gas under consideration is often in a sealed container. So, if we move the pressure, volume and temperature onto the same side of the ideal gas law we get,
n, R, equals, N, k, start subscript, B, end subscript, equals, start fraction, P, V, divided by, T, end fraction, equals, start text, space, c, o, n, s, t, a, n, t, end text
This shows that, as long as the number of moles (i.e. molecules) of a gas remains the same, the quantity start fraction, P, V, divided by, T, end fraction is constant for a gas regardless of the process through which the gas is taken. In other words, if a gas starts in state 1 (with some value of pressure P, start subscript, 1, end subscript, volume V, start subscript, 1, end subscript, and temperature T, start subscript, 1, end subscript) and is altered to a state 2 (with P, start subscript, 2, end subscript, volume V, start subscript, 2, end subscript, and temperature T, start subscript, 2, end subscript), then regardless of the details of the process we know the following relationship holds.
start fraction, P, start subscript, 1, end subscript, V, start subscript, 1, end subscript, divided by, T, start subscript, 1, end subscript, end fraction, equals, start fraction, P, start subscript, 2, end subscript, V, start subscript, 2, end subscript, divided by, T, start subscript, 2, end subscript, end fraction
This formula is particularly useful when describing an ideal gas that changes from one state to another. Since this formula does not use any gas constants, we can use whichever units we want, but we must be consistent between the two sides (e.g. if we use start text, m, end text, cubed for V, start subscript, 1, end subscript, we'll have to use start text, m, end text, cubed for V, start subscript, 2, end subscript). [Temperature, however, must be in Kelvins]

What do solved examples involving the ideal gas law look like?

Example 1: How many moles in an NBA basketball?

The air in a regulation NBA basketball has a pressure of 1, point, 54, start text, space, a, t, m, end text and the ball has a radius of 0, point, 119, start text, space, m, end text. Assume the temperature of the air inside the basketball is 25, start superscript, o, end superscript, start text, space, C, end text (i.e. near room temperature).
a. Determine the number of moles of air inside an NBA basketball.
b. Determine the number of molecules of air inside an NBA basketball.
We'll solve by using the ideal gas law. To solve for the number of moles we'll use the molar form of the ideal gas law.
P, V, equals, n, R, T, start text, left parenthesis, u, s, e, space, t, h, e, space, m, o, l, a, r, space, f, o, r, m, space, o, f, space, t, h, e, space, i, d, e, a, l, space, g, a, s, space, l, a, w, right parenthesis, end text
n, equals, start fraction, P, V, divided by, R, T, end fraction, start text, left parenthesis, s, o, l, v, e, space, f, o, r, space, t, h, e, space, n, u, m, b, e, r, space, o, f, space, m, o, l, e, s, right parenthesis, end text
n, equals, start fraction, P, V, divided by, left parenthesis, 8, point, 31, start fraction, J, divided by, K, dot, m, o, l, end fraction, right parenthesis, T, end fraction, start text, left parenthesis, d, e, c, i, d, e, space, w, h, i, c, h, space, g, a, s, space, c, o, n, s, t, a, n, t, space, w, e, space, w, a, n, t, space, t, o, space, u, s, e, right parenthesis, end text
Given this choice of gas constant, we need to make sure we use the correct units for pressure (start text, p, a, s, c, a, l, s, end text), volume (start text, m, end text, cubed), and temperature (start text, k, e, l, v, i, n, end text).
We can convert the pressure as follows,
1, point, 54, start text, space, a, t, m, end text, times, left parenthesis, start fraction, 1, point, 013, times, 10, start superscript, 5, end superscript, start text, space, P, a, end text, divided by, 1, start text, space, a, t, m, end text, end fraction, right parenthesis, equals, 156, comma, 000, start text, space, P, a, end text.
And we can use the formula for the volume of a sphere start fraction, 4, divided by, 3, end fraction, pi, r, cubed to find the volume of the gas in the basketball.
V, equals, start fraction, 4, divided by, 3, end fraction, pi, r, cubed, equals, start fraction, 4, divided by, 3, end fraction, pi, left parenthesis, 0, point, 119, start text, space, m, end text, right parenthesis, cubed, equals, 0, point, 00706, start text, space, m, end text, cubed
The temperature 25, start superscript, o, end superscript, start text, space, C, end text can be converted with,
T, start subscript, K, end subscript, equals, T, start subscript, C, end subscript, plus, 273, start text, space, K, end text. T, equals, 25, start superscript, o, end superscript, start text, space, C, end text, plus, 273, start text, space, K, end text, equals, 298, start text, space, K, end text.
Now we can plug these variables into our solved version of the molar ideal gas law to get,
n, equals, start fraction, left parenthesis, 156, comma, 000, start text, space, P, a, end text, right parenthesis, left parenthesis, 0, point, 00706, start text, space, m, end text, cubed, right parenthesis, divided by, left parenthesis, 8, point, 31, start fraction, J, divided by, K, dot, m, o, l, end fraction, right parenthesis, left parenthesis, 298, start text, space, K, end text, right parenthesis, end fraction, start text, left parenthesis, p, l, u, g, space, i, n, space, c, o, r, r, e, c, t, space, u, n, i, t, s, space, f, o, r, space, t, h, i, s, space, g, a, s, space, c, o, n, s, t, a, n, t, right parenthesis, end text
n, equals, 0, point, 445, start text, space, m, o, l, e, s, end text
Now to determine the number of air molecules N in the basketball we can convert start text, m, o, l, e, s, end text into start text, m, o, l, e, c, u, l, e, s, end text.
N, equals, 0, point, 445, start text, space, m, o, l, e, s, end text, times, left parenthesis, start fraction, 6, point, 02, times, 10, start superscript, 23, end superscript, start text, space, m, o, l, e, c, u, l, e, s, end text, divided by, 1, start text, space, m, o, l, e, end text, end fraction, right parenthesis, equals, 2, point, 68, times, 10, start superscript, 23, end superscript, start text, space, m, o, l, e, c, u, l, e, s, end text
Alternatively, we could have solved this problems by using the molecular version of the ideal gas law with Boltzmann's constant to find the number of molecules first, and then converted to find the number of moles.

Example 2: Gas takes an ice bath

A gas in a sealed rigid canister starts at room temperature T, equals, 293, start text, space, K, end text and atmospheric pressure. The canister is then placed in an ice bath and allowed to cool to a temperature of T, equals, 255, start text, space, K, end text.
Determine the pressure of the gas after reaching a temperature of 255, start text, space, K, end text, point
Since we know the temperature and pressure at one point, and are trying to relate it to the pressure at another point we'll use the proportional version of the ideal gas law. We can do this since the number of molecules in the sealed container is constant.
start fraction, P, start subscript, 1, end subscript, V, start subscript, 1, end subscript, divided by, T, start subscript, 1, end subscript, end fraction, equals, start fraction, P, start subscript, 2, end subscript, V, start subscript, 2, end subscript, divided by, T, start subscript, 2, end subscript, end fraction, start text, left parenthesis, s, t, a, r, t, space, w, i, t, h, space, t, h, e, space, p, r, o, p, o, r, t, i, o, n, a, l, space, v, e, r, s, i, o, n, space, o, f, space, t, h, e, space, i, d, e, a, l, space, g, a, s, space, l, a, w, right parenthesis, end text
start fraction, P, start subscript, 1, end subscript, V, divided by, T, start subscript, 1, end subscript, end fraction, equals, start fraction, P, start subscript, 2, end subscript, V, divided by, T, start subscript, 2, end subscript, end fraction, start text, left parenthesis, v, o, l, u, m, e, space, i, s, space, t, h, e, space, s, a, m, e, space, b, e, f, o, r, e, space, a, n, d, space, a, f, t, e, r, space, s, i, n, c, e, space, t, h, e, space, c, a, n, i, s, t, e, r, space, i, s, space, r, i, g, i, d, right parenthesis, end text
start fraction, P, start subscript, 1, end subscript, divided by, T, start subscript, 1, end subscript, end fraction, equals, start fraction, P, start subscript, 2, end subscript, divided by, T, start subscript, 2, end subscript, end fraction, start text, left parenthesis, d, i, v, i, d, e, space, b, o, t, h, space, s, i, d, e, s, space, b, y, space, end text, V, right parenthesis
P, start subscript, 2, end subscript, equals, T, start subscript, 2, end subscript, start fraction, P, start subscript, 1, end subscript, divided by, T, start subscript, 1, end subscript, end fraction, start text, left parenthesis, s, o, l, v, e, space, f, o, r, space, t, h, e, space, p, r, e, s, s, u, r, e, space, end text, P, start subscript, 2, end subscript, right parenthesis
P, start subscript, 2, end subscript, equals, left parenthesis, 255, start text, space, K, end text, right parenthesis, start fraction, 1, start text, space, a, t, m, end text, divided by, 293, start text, space, K, end text, end fraction, start text, left parenthesis, p, l, u, g, space, i, n, space, v, a, l, u, e, s, space, f, o, r, space, p, r, e, s, s, u, r, e, space, a, n, d, space, t, e, m, p, e, r, a, t, u, r, e, end text, right parenthesis
P, start subscript, 2, end subscript, equals, 0, point, 87, start text, space, a, t, m, end text, start text, left parenthesis, c, a, l, c, u, l, a, t, e, space, a, n, d, space, c, e, l, e, b, r, a, t, e, end text, right parenthesis
Notice that we plugged in the pressure in terms of start text, a, t, m, o, s, p, h, e, r, e, s, end text and ended up with our pressure in terms of start text, a, t, m, o, s, p, h, e, r, e, s, end text. If we wanted our answer in terms of start text, p, a, s, c, a, l, s, end text we could have plugged in our pressure in terms of start text, p, a, s, c, a, l, s, end text, or we can simply convert our answer to start text, p, a, s, c, a, l, s, end text as follows,
P, start subscript, 2, end subscript, equals, 0, point, 87, start text, space, a, t, m, end text, times, left parenthesis, start fraction, 1, point, 013, times, 10, start superscript, 5, end superscript, start text, space, P, a, end text, divided by, 1, start text, space, a, t, m, end text, end fraction, right parenthesis, equals, 88, comma, 200, start text, space, P, a, end text, start text, left parenthesis, c, o, n, v, e, r, t, space, f, r, o, m, space, a, t, m, o, s, p, h, e, r, e, s, space, t, o, space, p, a, s, c, a, l, s, end text, right parenthesis

Want to join the conversation?