Clear, accurate chemistry definitions 1,509 terms 6 topics 118-element periodic table

Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles, or temperature. Units are handled for you, and the gas constant is matched to whichever pressure unit you pick.

Enter your values to calculate.

The equation

PV = nRT

Four properties describe any sample of gas: its pressure, the volume it fills, how much of it there is in moles, and its temperature. The ideal gas law ties all four together with a single constant, R.

SymbolQuantityCommon units
PPressureatm, kPa, mmHg, bar
VVolumeliters
nAmountmoles
RGas constantdepends on the pressure unit
TTemperaturekelvin, always

Temperature must be in kelvin

This is the single most common mistake with gas problems. The equation only works on an absolute scale, where zero really means zero motion. Celsius puts zero at the freezing point of water, which is an arbitrary place to start.

K = °C + 273.15

Using Celsius directly can produce absurd answers, including negative volumes when the temperature is below freezing. The calculator converts for you, but if you work a problem by hand, convert first and check that your kelvin value is positive.

Choosing the right R

R is one physical constant, but its number changes with the units you wrap around it. Pick the version that matches your pressure unit and the units cancel cleanly.

Pressure inUse R =
atm0.082057 L·atm/(mol·K)
kPa8.3145 L·kPa/(mol·K)
mmHg or torr62.364 L·mmHg/(mol·K)
bar0.083145 L·bar/(mol·K)

You may also meet R = 8.3145 J/(mol·K), which is the same constant expressed in energy units. That version is for thermodynamics rather than for volumes in liters.

Worked example

What volume does 2.00 mol of gas occupy at 1.00 atm and 25 °C?

Step 1. Convert the temperature.
T = 25 + 273.15 = 298.15 K

Step 2. Rearrange for volume.
V = nRT ÷ P

Step 3. Substitute, using R for atm.
V = (2.00 × 0.082057 × 298.15) ÷ 1.00 = 48.9 L

Standard conditions and molar volume

"Standard temperature and pressure" has two definitions in circulation, and they give different answers. This catches people out constantly.

DefinitionConditionsMolar volume
IUPAC standard since 19820 °C and 100 kPa22.71 L/mol
Older standard, still in many textbooks0 °C and 1 atm22.41 L/mol
SATP, ambient conditions25 °C and 100 kPa24.79 L/mol

If a question mentions 22.4 L/mol it is using the older 1 atm definition. Both are correct within their own convention, so follow whichever your course uses.

The gas laws this replaces

Before PV = nRT, each relationship was studied separately. Each older law is just PV = nRT with some quantities held fixed.

LawHeld constantRelationship
Boylen, TP1V1 = P2V2
Charlesn, PV1/T1 = V2/T2
Gay-Lussacn, VP1/T1 = P2/T2
AvogadroP, TV1/n1 = V2/n2
CombinednP1V1/T1 = P2V2/T2

When real gases stop behaving

The word "ideal" is doing real work in the name. The law assumes gas particles take up no space themselves and do not attract one another. Neither is quite true.

The approximation is very good at ordinary room conditions and gets worse as you squeeze a gas into a small space or cool it toward the point where it would turn liquid. At high pressure the particles' own volume starts to matter. At low temperature the attraction between them starts to pull them together, so the real pressure comes out lower than predicted. Gases with small, weakly attracting particles like helium and hydrogen stay close to ideal over a wider range than water vapor or ammonia do.

Frequently asked questions

What is the ideal gas law?

The ideal gas law is PV = nRT. It links the pressure, volume, number of moles, and temperature of a gas through the gas constant R. Temperature must always be in kelvin.

What is the value of R?

R depends on the units you use for pressure. It is 0.082057 L atm per mol K when pressure is in atmospheres, 8.3145 when pressure is in kilopascals, and 62.364 when pressure is in millimeters of mercury.

Why does temperature have to be in kelvin?

The equation needs an absolute temperature scale, where zero means no thermal motion at all. Celsius sets zero at the freezing point of water instead, so using it gives wrong answers and can even produce negative volumes. Add 273.15 to convert.

What is the molar volume of a gas at STP?

It depends which standard you use. At the current IUPAC standard of 0 degrees Celsius and 100 kPa, one mole occupies 22.71 L. Under the older definition of 0 degrees Celsius and 1 atm, it occupies 22.41 L, which is where the familiar 22.4 figure comes from.

When does the ideal gas law stop working?

It becomes unreliable at high pressure and at low temperature. Under those conditions the volume of the particles themselves and the attractions between them stop being negligible, so real gases deviate from the prediction.

How is Boyle's law related to PV = nRT?

Boyle's law is the special case where the amount of gas and the temperature stay fixed. That makes nRT a constant, so P times V must stay constant too, which gives P1V1 = P2V2.

Related terms

Next: the stoichiometry calculator turns those moles into the mass of a product.