ThisCalculator

Everyday

Pressure and Temp Equation: The Ideal Gas Law

Updated · Standard formula, shown below

Missing value 0
Pressure
101.325 kPa
You entered
Volume
22.414 L
You entered
Amount
1 mol
You entered
Temperature
273.15 K
You entered

This calculator uses the ideal gas law to find the missing value when you know three of the four key variables: pressure, temperature, volume, and amount of gas. Enter the known values (with units) and it returns the unknown one, such as pressure in pascals or temperature in kelvin. The relationship is PV = nRT, where P is pressure, V is volume, n is the number of moles, R is the gas constant, and T is temperature.

Note: The calculator block above is a placeholder; the actual interactive calculator will be embedded here. For a static example, see the worked example below.

Formula

The ideal gas law is written as:

PV = nRT

  • P = pressure of the gas (pascals, Pa, or kilopascals, kPa)
  • V = volume of the gas (cubic meters, m³, or liters, L)
  • n = amount of gas (moles, mol)
  • R = ideal gas constant (8.314 J/(mol·K) when using Pa·m³, or 0.0821 L·atm/(mol·K) when using atm and liters)
  • T = absolute temperature (kelvin, K)

To solve for any variable, rearrange algebraically. For example, P = nRT/V, T = PV/(nR), V = nRT/P, and n = PV/(RT).

Worked Example

Using the default values from the calculator: P = 101.325 kPa, V = 22.414 L, n = 1 mol, T = 273.15 K. These are the standard conditions (STP) for a gas. Let’s verify the temperature with the formula:

  1. Convert pressure to atm: 101.325 kPa ÷ 101.325 = 1 atm (exact).
  2. Use R = 0.0821 L·atm/(mol·K).
  3. Plug into T = PV/(nR) = (1 atm × 22.414 L) / (1 mol × 0.0821 L·atm/(mol·K))
  4. Calculate: 22.414 / 0.0821 = 273.0 K (rounded).

The calculator’s default temperature of 273.15 K is the standard value; the small difference is due to rounding R. This shows how the equation ties pressure, volume, amount, and temperature together.

When to Use the Ideal Gas Law

The ideal gas law is most accurate for gases at low pressure and high temperature, where molecules are far apart and interactions are negligible. It works well for many real gases like oxygen, nitrogen, and helium under normal room conditions. Use it when you need to find one property of a gas given the others, such as calculating the pressure in a scuba tank, the volume of a balloon at a certain temperature, or the number of moles in a container.

For real gases at high pressure or low temperature, the ideal gas law deviates. In those cases, use the van der Waals equation or other real gas models.

How to Read the Result

The result you get is the missing variable in the units you chose. For example, if you enter pressure in kPa, volume in liters, amount in moles, and leave temperature blank, the calculator returns temperature in kelvin. Always check that the units are consistent with the gas constant you use. A common mistake is mixing kPa with R in atm·L, which gives a wildly wrong answer.

Also remember that temperature must be in kelvin. Celsius or Fahrenheit will not work in this equation because the law is based on absolute zero. To convert, add 273.15 to Celsius to get kelvin.

Common Mistakes and Misconceptions

  • Using Celsius or Fahrenheit: Always convert to kelvin. For example, 25°C is 298.15 K.
  • Unit mismatch: If you use R = 0.0821, pressure must be in atm and volume in liters. If you use R = 8.314, pressure in Pa and volume in m³.
  • Forgetting to convert volume: 1 m³ = 1000 L. A liter is 0.001 m³.
  • Assuming the gas is ideal: At very high pressure (e.g., >10 atm) or near the boiling point, real gases deviate.
  • Not using absolute pressure: In many applications, gauge pressure is measured, but the law requires absolute pressure (gauge + atmospheric).

A common misconception is that the ideal gas law only applies to “ideal” gases and is useless for real ones. In fact, it is a good approximation for most gases under everyday conditions, and it is the starting point for more accurate models.

Limits of the Equation

The ideal gas law assumes no intermolecular forces and that molecules occupy zero volume. These assumptions break down at high pressures (molecules are forced close together) and low temperatures (attractive forces become significant). For example, at 200 atm, the ideal gas law can overestimate the volume of a gas by several percent. The van der Waals equation adds correction factors for molecular size and attraction, improving accuracy.

Also, the law works only for gases, not for liquids or solids. If you are dealing with a phase change, you need different equations.

Frequently Asked Questions

What is the pressure-temperature relationship called?

That is Gay-Lussac’s law, which states that at constant volume, pressure is directly proportional to absolute temperature (P ∝ T). It is a special case of the ideal gas law when n and V are fixed.

Why do I need to use kelvin instead of Celsius?

Because kelvin is an absolute scale starting at absolute zero, where gas pressure would theoretically be zero. Using Celsius would give negative or zero pressures at temperatures below -273.15°C, which is physically meaningless. The equations are derived using absolute temperature, so kelvin is required.

Can I use this equation for air?

Yes, air behaves nearly ideally at room temperature and atmospheric pressure. You can treat air as a mixture of gases, but the ideal gas law applies to the mixture as a whole if you use the total number of moles.

What is the value of R in different units?

R = 8.314 J/(mol·K) when pressure is in Pa and volume in m³. R = 0.0821 L·atm/(mol·K) when pressure in atm and volume in L. There are other values for different unit combinations, but these two are the most common.

How do I convert gauge pressure to absolute pressure?

Add atmospheric pressure (about 101.325 kPa or 1 atm) to the gauge reading. For example, a tire gauge reading 200 kPa means absolute pressure is 301.325 kPa.

Does the ideal gas law work for mixtures?

Yes, if you use the total number of moles of all gases. Each gas in a mixture behaves independently, and the total pressure is the sum of partial pressures (Dalton’s law).

Related

Formula used
in p | Pressure | kPa | 101.325 | 0
in v | Volume | L | 22.414 | 0
in n | Amount | mol | 1 | 0
in t | Temperature | K | 273.15 | 0
out result | Missing value | - | 0 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.