Ideal Gas Law
Ideal Gas Law Calculator

🎈 Ideal Gas Law

Field: Chemistry

Written and maintained by the PhDino author · Last reviewed 21 September 2026 · Checked against 3 independent reference calculations · how PhDino checks its numbers

The relationship between a gas's pressure, volume, amount, and temperature.

The ideal gas law combines several simpler gas relationships (Boyle's, Charles's, and Avogadro's) into one equation that describes an idealized gas well enough for most everyday conditions. It treats gas particles as taking up negligible volume themselves and having no attractive forces between them — an approximation that holds up well at ordinary temperatures and pressures, and breaks down as a gas gets very cold or very compressed.

Because the equation links four quantities, knowing any three lets you solve directly for the fourth — which is the most common way it actually gets used: given how much gas you have and the conditions it's under, what pressure (or volume, or temperature) results.

Key formula

PV = nRT
R = 0.08206 L·atm/(mol·K)

Variables

P
pressure
V
volume
n
amount of gas, in moles
T
absolute temperature, in kelvin
R
the ideal gas constant, whose numeric value depends on which units P and V are measured in

Notes & limitations

  • Temperature must be in kelvin, not Celsius or Fahrenheit — the equation is a proportional relationship that only holds relative to absolute zero, so a Celsius value plugged in directly gives a meaningless result.
  • Real gases deviate from this law most noticeably at high pressure (where the gas particles' own volume stops being negligible) and low temperature (where intermolecular attraction stops being negligible) — the van der Waals equation is one common correction for those conditions, not covered here.

Further reading

PhDino earns a commission on qualifying purchases made through this link, at no extra cost to you.

Chemistry: A Very Short Introduction by Peter Atkins — A concise overview of reactions, equilibria, and gases from a leading chemistry author. (Bookshop.org UK, UK delivery only)

→ The full PhDino bookshelf on Bookshop.org (UK delivery only)

Educational tool — not a substitute for a licensed engineer or the official code text.