Ideal Gas Law Calculator (PV=nRT)

Using the ideal gas law PV=nRT, enter 3 of pressure, volume, amount of substance (moles), and temperature to calculate the remaining value.

What the ideal gas law (PV=nRT) is

The ideal gas law ties four state quantities of a gas — pressure (P), volume (V), amount of substance (n) and absolute temperature (T) — together in the single equation PV=nRT. It is an approximation that holds under the assumptions of an ideal gas, namely that the volume of the molecules themselves can be ignored and that no intermolecular forces act. Near ordinary temperature and pressure it reproduces the behaviour of real gases well, which is why it serves as the most fundamental relation in chemical and physical calculation.

Enter three of the four state quantities and this tool works out the remaining one automatically using the gas constant R (R = 0.082057 L·atm/(mol·K)). Temperature has to be entered as an absolute temperature in kelvin; using a Celsius figure as it stands gives the wrong answer. The whole calculation is done inside your browser and the numbers you enter are never sent to a server.

How to use the gas law calculator

  1. Choose what to calculate Under the item to calculate, pick the one of pressure, volume, amount of substance and absolute temperature that you want. The input field for that item is hidden automatically.
  2. Enter the other three values Into the three visible fields, put the known pressure (atm), volume (L), amount of substance (mol) and absolute temperature (K).
  3. Convert Celsius to kelvin if needed If all you have is a Celsius figure, add 273.15 to turn it into an absolute temperature before entering it — 25 °C becomes 298.15 K.
  4. Check the result As soon as the three values are in, the remaining one appears in the result field. Change any input and the result is recalculated at once.

Tips for getting more out of it

  • Always enter temperature as absolute temperature (Kelvin, K). Entering a Celsius value directly will produce an incorrect result.
  • The gas constant used here is R=0.082057 L·atm/(mol·K). Pressure is unified in atm and volume in L.
  • This equation is an approximation that assumes an "ideal gas." At high pressure and low temperature, real gases may deviate from this behavior.
  • Switching the "value to calculate" hides that field's input and automatically calculates it from the other three values.

When the ideal gas law is useful

Checking chemistry classwork and exams

For gas problems at senior school or first-year university level, it verifies the pressure, volume, amount of substance or temperature you worked out by hand. Line the units up as atm, L, K and mol and it compares directly.

Estimating conditions before an experiment

It serves for estimating in advance the container volume needed to produce a given amount of gas, or the upper limit of pressure inside a sealed vessel.

Groundwork for partial pressure in a gas mixture

Use it when, before handling a system of several mixed gases, you want to confirm the state quantities of a single component first. To find the partial pressure of each component, use the partial pressure tool.

Estimating gas quantity where vapour pressure matters

When dealing with a gas in equilibrium with a liquid, get a rough ideal-gas figure here first; to look closely at the effect of saturated vapour pressure such as water vapour, using it alongside the vapour pressure tool deepens the picture.

Tyre pressure and how much is left in a gas cylinder

It gives a reference for roughly estimating how tyre pressure or the pressure inside a high-pressure cylinder shifts as the air temperature changes, under constant volume and constant amount of substance.

Terms related to the ideal gas law

Ideal gas
A theoretical gas assumed to have molecules of negligible volume with no attractive or repulsive forces between them. Under that assumption PV=nRT holds exactly. Real gases depart from it further the higher the pressure and the lower the temperature.
Amount of substance (moles)
A quantity expressing the number of atoms or molecules, with the unit mol. One mole means a collection of Avogadro's number of particles, about 6.02×10²³. Dividing the mass of a gas by its molar mass gives the amount of substance.
Gas constant R
The constant of proportionality appearing in PV=nRT, whose numerical value depends on the system of units. This tool uses R = 0.082057 L·atm/(mol·K), matching pressure in atm, volume in L and temperature in K. In SI units R = 8.314 J/(mol·K).
Standard conditions (STP)
The reference conditions for comparing the properties of gases; under the current IUPAC definition, 0 °C (273.15 K) and 100 kPa. Older definitions sometimes use 1 atm = 101.325 kPa. At standard conditions one mole of an ideal gas occupies about 22.4 L.
Boyle's law
The law that at constant temperature the product of a gas's pressure and volume (P×V) stays constant. Robert Boyle discovered it in 1662, and it was later combined with Charles's law and Avogadro's law to give PV=nRT.
Charles's law
The law that at constant pressure the volume of a gas divided by its absolute temperature (V/T) stays constant. Discovered by Jacques Charles, it expresses how the volume of a gas shrinks as the temperature falls.
Avogadro's law
The law that at the same temperature, pressure and volume, the number of molecules is equal regardless of the kind of gas. Through this law, the idea of finding the amount of substance from the volume of a gas was built into PV=nRT.

Frequently asked questions

The equation of state PV=nRT assumes the physical relationship that pressure and volume approach zero as temperature approaches 0 (absolute zero, where molecular motion theoretically stops). This relationship does not hold on relative temperature scales such as Celsius or Fahrenheit, so absolute temperature (K) must be used.

An ideal gas is a theoretical model that assumes molecular volume is negligible and that no intermolecular forces act. Real gases show increasingly significant effects from intermolecular forces and molecular volume at high pressure and low temperature, causing larger deviations from the ideal gas equation.

The value of the gas constant R depends on the unit system used. This tool unifies pressure in atm, volume in L, and temperature in K, so it uses R=0.082057 L·atm/(mol·K) corresponding to these units. When calculating in SI units (Pa·m³), R=8.314 J/(mol·K) is used instead.

The amount of substance represents the number of atoms or molecules, measured in mol. One mole refers to a collection of particles equal to Avogadro's number (about 6.02×10²³). If you know a gas's mass and its molar mass (molecular weight), you can find the number of moles by dividing mass by molar mass.
Tool-kun

Side Note — How the gas laws were unified

The ideal gas equation of state PV=nRT actually combines several laws that were discovered separately between the 17th and 19th centuries into a single equation. Boyle's law (P×V constant at constant temperature), Charles's law (V/T constant at constant pressure), and Avogadro's law (equal volumes of gas at the same temperature and pressure contain the same number of molecules, regardless of the type of gas) were each independently discovered empirical rules that were unified into one equation by the mid-19th century.

This unification is credited to the French engineer Émile Clapeyron. In 1834, he combined Boyle's law and Charles's law to publish an equation of the form PV=RT (per mole), which was later refined by incorporating Avogadro's law into today's PV=nRT form.

The "ideal gas" assumption merely neglects the interactions between gas molecules and the size of the molecules themselves, but under conditions close to standard temperature and pressure, it reproduces the behavior of real gases surprisingly well. This combination of simplicity and practicality is why, nearly 200 years later, it remains one of the first things taught in chemistry and physics education.