Ideal Gas Law Calculator
Solve PV = nRT for any variable.
Show detailsHide details
The ideal gas law ties together the pressure, volume, amount, and temperature of a gas in one equation: PV = nRT. Enter any three and this calculator solves for the fourth, handling unit conversions for you.
Loading calculator...
Ideal Gas Law — The Quick Answer
PV = nRT links pressure, volume, moles, and temperature through the gas constant R = 8.314 J/(mol·K). At standard temperature and pressure, one mole of any ideal gas occupies about 22.4 litres.
Shortcut
PV = nRT | P = nRT/V | V = nRT/P | n = PV/RT | T = PV/nR
The four quantities
| Symbol | Quantity | SI unit |
|---|---|---|
| P | Pressure | pascals (Pa) |
| V | Volume | cubic metres (m³) |
| n | Amount of substance | moles (mol) |
| T | Absolute temperature | kelvin (K) |
| R | Gas constant | 8.314 J/(mol·K) |
Temperature must always be in kelvin for the ideal gas law — this calculator converts °C and °F for you. Using Celsius directly is the single most common mistake.
How It Works
The Formula
One equation, four rearrangements
Formula
PV = nRT P = nRT / V V = nRT / P n = PV / (RT) T = PV / (nR)
Variables
Pressure and volume
Pressure in pascals and volume in cubic metres when using R = 8.314. The calculator converts atm, bar, litres, and more.
Amount of substance
The number of moles of gas. One mole is 6.022 × 10²³ particles (Avogadro's number).
Absolute temperature
Must be in kelvin: K = °C + 273.15. The law breaks down near absolute zero.
Note: The ideal gas law assumes gas particles have no volume and don't attract each other. Real gases follow it closely at everyday conditions but deviate at high pressure or low temperature, where the van der Waals equation does better.
Worked Example: Volume of One Mole at STP
Solving PV = nRT for volume
Choose what to solve for
Volume (V)
Rearrange PV = nRT
V = nRT ÷ P
Substitute SI values
1 × 8.314 × 273.15 ÷ 101,325
Compute
≈ 0.0224 m³ = 22.4 L (the molar volume at STP)
Reference Guide
| Solve for | Formula | SI unit |
|---|---|---|
| Pressure (P) | P = nRT ÷ V | pascals |
| Volume (V) | V = nRT ÷ P | cubic metres |
| Amount (n) | n = PV ÷ RT | moles |
| Temperature (T) | T = PV ÷ nR | kelvin |
Reading the Result Correctly
Kelvin, trade-offs, and the 'ideal' assumption
The law is anchored to absolute zero, so temperature has to be in kelvin (K = °C + 273.15). Using Celsius gives meaningless or even negative results — the single most common mistake. This calculator converts for you.
Best for: Getting a valid answer every time
PV = nRT means the quantities are linked: squeeze the volume and pressure rises; heat the gas and pressure or volume grows. It's why hot tyres read higher and why a sealed packet puffs up at altitude.
Best for: Predicting how a gas behaves
The law assumes gas particles have no volume and don't attract each other — accurate to a per cent or two at everyday conditions. It drifts at very high pressure or very low temperature, where the van der Waals equation does better.
Best for: Knowing when the law stops applying
What Is the Ideal Gas Law?
The ideal gas law ties together the four properties of a gas — pressure, volume, amount, and temperature — in one equation: PV = nRT, where R is the universal gas constant (8.314 J/mol·K). Knowing any three lets you find the fourth. The deeper message is that these quantities aren't independent: compress a gas and its pressure rises; heat it and it expands or its pressure climbs. Temperature must be in kelvin because the law is built around absolute zero. It's an idealisation that assumes particles have no size and don't attract each other, which holds well at ordinary conditions and drifts only at extremes. This calculator solves for any one variable and converts units for you.
Key Features
💡 Pro Tips
- →Always let the tool handle temperature in kelvin — entering Celsius directly into PV = nRT is the classic error.
- →At standard temperature and pressure (0 °C, 1 atm), one mole of any ideal gas occupies about 22.4 litres — a handy benchmark.
- →If you prefer atm and litres, the gas constant is 0.08206 L·atm/mol·K; the calculator converts so you needn't juggle versions of R.
- →Expect real gases to deviate at high pressure or near condensation, where the ideal law understates the truth.
Common Mistakes
Using Celsius instead of kelvin
The law needs absolute temperature. Celsius has an arbitrary zero, so using it gives wrong — sometimes negative — results. Always convert: K = °C + 273.15.
Mismatching units with the gas constant
R = 8.314 requires SI units (pascals, cubic metres, kelvin). Mixing in atm and litres without the matching R value breaks the calculation.
Trusting the ideal law at extremes
At very high pressure or very low temperature, real gases deviate noticeably as particle volume and attractions matter. The ideal gas law is an approximation that's excellent only in the everyday range.
Research & Citations
Sources and standards referenced for the factual claims on this page
- [1]
Clapeyron, B. P. É. (1834). Mémoire sur la puissance motrice de la chaleur (early combined gas law). Journal de l'École Polytechnique.
Early statement combining the individual gas laws.
View source - [2]
International Union of Pure and Applied Chemistry (IUPAC) / CODATA (2018). Value of the molar gas constant R = 8.314462618 J/mol·K. NIST / CODATA.
The gas constant used in this calculator.
View source
This calculator is a reference tool, not a substitute for professional advice. Verify important health, financial, legal, or safety decisions with a suitably qualified professional.
Last updated: October 7, 2026

Creators
Computer Scientist & Developer Tools Author
Reviewers
Technical Reviewer
Table of Contents
Quick Facts
Privacy Guaranteed
Your data never leaves your browser. All calculations are 100% private.
Frequently Asked Questions
What is the ideal gas law?
PV = nRT. It relates the pressure (P), volume (V), amount in moles (n), and absolute temperature (T) of a gas, with R the universal gas constant (8.314 J/(mol·K)). Knowing any three lets you find the fourth.
What value of R should I use?
This calculator uses R = 8.314 J/(mol·K), which requires SI units (pascals, cubic metres, kelvin). If you prefer atm and litres, R = 0.08206 L·atm/(mol·K) — but you don't need to worry about that here, since the tool converts units internally.
Why must temperature be in kelvin?
Because the gas law describes behaviour relative to absolute zero. Using Celsius would make the numbers meaningless (and could even go negative). Always convert: K = °C + 273.15. This calculator does it automatically.
What volume does one mole of gas occupy?
About 22.4 litres at standard temperature and pressure (0 °C and 1 atm), or 24.0 litres at 25 °C and 1 atm. You can verify this by solving for V with n = 1, T = 273.15 K, and P = 1 atm.