Skip to content

Ideal Gas Law Calculator (PV = nRT) | STP Calculator

Solves the ideal gas law PV = nRT for pressure, volume, temperature, or moles. Enter three known values to find the fourth, with STP conditions explained.

STP Calculator

Calculate pressure, volume, temperature or moles using the Ideal Gas Law.

Standard Temperature and Pressure (STP) is defined as 0°C (273.15 K) and 1 atm.
What would you like to calculate?

P = nRT/V

P = (1 Ă— 0.08206 Ă— 273.15) Ă· 22.4

Result
1.0007atm

About the Ideal Gas Law

The ideal gas law is a fundamental equation in chemistry and physics that describes the behavior of gases under various conditions.

PV = nRT

  • P is pressure (in atmospheres, atm)
  • V is volume (in liters, L)
  • n is the number of moles of gas
  • R is the gas constant (0.08206 L·atm/(mol·K))
  • T is temperature (in Kelvin, K)
Loading calculator...
📚

Documentation

STP Calculator: Ideal Gas Law (PV = nRT)

An ideal gas law calculator finds the pressure, volume, temperature, or amount of a gas using the equation PV = nRT. A person enters any three of the four values, and the calculator solves for the one that is missing.

What is STP?

STP stands for Standard Temperature and Pressure. It is a fixed reference point used in chemistry so gas measurements from different experiments can be compared on equal terms. This calculator defines STP as 0°C (273.15 K) and 1 atmosphere (atm) of pressure.

The ideal gas law formula

The ideal gas law is:

PV = nRT

Each letter stands for one property of the gas:

  • P is pressure, in atmospheres (atm)
  • V is volume, in liters (L)
  • n is the amount of gas, in moles (mol)
  • T is temperature, in kelvin (K)
  • R is the gas constant. This calculator uses R = 0.08206 L·atm/(mol·K)

Temperature must be in kelvin for the equation to work. The calculator asks for temperature in Celsius and converts it internally by adding 273.15 (K = °C + 273.15).

How to calculate pressure, volume, temperature, or moles

The equation can be rearranged to solve for whichever value is unknown.

  • Pressure: P = nRT / V
  • Volume: V = nRT / P
  • Temperature: T = PV / (nR), then the result in kelvin is converted back to Celsius
  • Moles: n = PV / (RT)

To use the calculator, pick which value to find, then fill in the other three fields. Pressure, volume, and moles must each be greater than zero. Temperature must be above absolute zero, -273.15°C.

Example: finding pressure at STP

A gas sample has 1 mole (n = 1), a volume of 22.4 liters (V = 22.4 L), and a temperature of 0°C, which equals 273.15 K.

P = nRT / V P = (1 Ă— 0.08206 Ă— 273.15) / 22.4 P = 1.0007 atm

The result lands close to 1 atm, which is expected: one mole of an ideal gas occupies about 22.4 liters at STP.

Example: finding volume

A gas sample has 1 mole (n = 1), a pressure of 1 atm, and a temperature of 25°C, which equals 298.15 K.

V = nRT / P V = (1 Ă— 0.08206 Ă— 298.15) / 1 V = 24.4662 L

The volume is larger than at STP because the temperature is higher.

Where the formula comes from

The ideal gas law combines three older relationships. Boyle's law describes how pressure and volume change together when temperature stays fixed. Charles's law describes how volume and temperature change together when pressure stays fixed. Avogadro's law describes how volume changes with the amount of gas when pressure and temperature stay fixed. Combining the three gives PV = nRT.

When the ideal gas law is accurate

The ideal gas law treats gas particles as points that do not pull on or push away from each other. Real gases only act this way under certain conditions. The formula works best at low pressure and high temperature, away from the point where a gas would turn into a liquid. At very high pressure or very low temperature, real gas behavior drifts from the formula, so the results become less exact.

Common uses

Chemistry students use the ideal gas law to check textbook and lab problems. Lab workers use it to relate the pressure, volume, and temperature of a gas sample during an experiment. Engineers use it for rough estimates in tasks such as sizing gas storage or predicting how a gas volume changes with temperature.

Frequently asked questions

What is the gas constant R?

R is 0.08206 L·atm/(mol·K) when pressure is measured in atmospheres and volume in liters.

Does the calculator take temperature in Celsius or kelvin?

It takes Celsius. The calculator converts the value to kelvin automatically before solving the equation.

Why must temperature be above -273.15°C?

-273.15°C, or 0 K, is absolute zero, the coldest temperature that can exist. The ideal gas law is not defined below it.

What is Standard Temperature and Pressure (STP)?

STP is 0°C (273.15 K) and 1 atm. It gives scientists a shared reference point for comparing gas measurements.

How many liters does one mole of gas occupy at STP?

About 22.4 liters, based on the ideal gas law with R = 0.08206 L·atm/(mol·K).

Can pressure, volume, or moles be zero or negative?

No. A gas sample cannot have zero or negative pressure, volume, or amount, so the calculator requires each of these three fields to be greater than zero.