ToolNestr

Ideal Gas Law Calculator

Enter any four of pressure, volume, moles, or temperature to solve for the fifth using PV = nRT. Two 3D diagrams compare gas at low and high temperature, and charts show how pressure and volume respond to changing conditions.

Reviewed by the ToolNestr Editorial Team — July 2026

Disclaimer: This tool is provided for educational purposes to support learning in chemistry. It is not a substitute for professional laboratory, safety, or dosage calculations.
Chemistry

Enter any four values to solve for the fifth.

Pressure
Volume
Moles
Temperature

Gas particles at low vs high temperature

1. Gas at low temperature

Particles move slower and stay closer together in the same container — lower pressure at the same volume.

2. Gas at high temperature

Particles move faster and collide with the container walls more forcefully — higher pressure at the same volume.

Ideal gas law graphs

Pressure vs temperature (fixed n=1 mol, V=10 L)
Volume vs pressure (fixed n=1 mol, T=298 K)

How it works

The core idea in one line: the ideal gas law unifies Boyle's, Charles's, Avogadro's, and Gay-Lussac's laws into one equation, treating a gas as though its molecules take up negligible volume and never interact — an excellent approximation for most gases at ordinary pressures and temperatures.

PV = nRT

the ideal gas law — R = 0.08206 L·atm/(mol·K)

V = nRT / P

rearranged to solve for volume

T = PV / (nR)

rearranged to solve for temperature (must be in kelvin)

PV=nRT combines four separate historical gas laws that were each discovered by holding different variables fixed: Boyle's law (PV=constant at fixed T,n), Charles's law (V∝T at fixed P,n), Gay-Lussac's law (P∝T at fixed V,n), and Avogadro's law (V∝n at fixed P,T). R, the universal gas constant, is the proportionality factor that ties all four relationships together into a single equation valid across changing conditions.

Worked example 1 — gas volume at room temperature

Given: What volume does 2.0 moles of an ideal gas occupy at 25°C and 1.5 atm?

Convert temperature: T = 25°C + 273.15 = 298.15 K
Formula: V = nRT / P
Substitute: V = (2.0 × 0.08206 × 298.15) / 1.5
Result: V ≈ 32.6 L

Converting Celsius to kelvin before substituting is essential — using 25 directly instead of 298.15 would give a badly wrong answer.

Worked example 2 — pressure inside a sealed container

Given: A rigid 10 L container holds 0.5 mol of gas at 350 K. Find the pressure.

Formula: P = nRT / V
Substitute: P = (0.5 × 0.08206 × 350) / 10
Result: P ≈ 1.436 atm

This is exactly the kind of calculation engineers use to predict pressure buildup in a sealed vessel as temperature rises.

Molar volume at different standard conditions

The volume one mole of ideal gas occupies depends on the exact pressure/temperature reference chosen — a common source of confusion between older and IUPAC-current STP definitions.

ConditionTPMolar volume
Traditional STP ★273.15 K1 atm22.414 L
IUPAC STP (post-1982)273.15 K1 bar22.711 L
Room temperature (25°C)298.15 K1 atm24.465 L

★ The traditional definition (0°C, 1 atm) is still the one most commonly used in introductory chemistry courses and this calculator's STP preset.

Where the ideal gas law actually matters

🏭 Chemical process engineering

Chemical engineers use the ideal gas law as a first approximation to design reactors, pipelines, and storage tanks, calculating gas volumes under a range of pressures and temperatures.

💨 Atmospheric science and meteorology

Understanding how pressure and temperature change with altitude — key to weather forecasting and cloud formation — relies directly on gas law relationships.

🎈 Scuba diving and pressure vessels

Divers and engineers designing pressurized tanks must account for how gas volume and pressure trade off as depth (and therefore pressure) changes, following the same PV=nRT relationship.

🧪 Stoichiometry with gaseous products

Chemistry students and researchers use the ideal gas law to convert between moles of a gaseous reactant or product and its volume under specific lab conditions.

Common misconceptions

"The ideal gas law works perfectly for any gas under any condition."

It is an approximation that breaks down at high pressure and low temperature, where intermolecular forces and the actual volume of gas molecules become significant — the van der Waals equation adds correction terms for these effects.

"You can use Celsius directly in PV=nRT."

Temperature must always be converted to kelvin first — using Celsius directly (which can be negative or zero at physically normal conditions) breaks the proportional relationship the ideal gas law depends on.

"STP always means the same fixed pressure and temperature."

STP has actually changed definition over time — older textbooks use 0°C and 1 atm (22.414 L/mol), while the modern IUPAC definition uses 0°C and 1 bar (22.711 L/mol), a small but real difference.

"Doubling pressure always doubles temperature for a fixed gas sample."

Only if volume is held constant — PV=nRT shows that pressure, volume, and temperature are all interrelated, so how one change affects another depends on which variable is actually being held fixed.

Formula sources & further reading

The formulas here are standard, traceable to:

  • OpenStax, Chemistry 2e — Chapter 9, "Gases" (free, peer-reviewed). openstax.org
  • Brown, LeMay & Bursten, Chemistry: The Central Science — Chapter 10, Gases.
  • Zumdahl & Zumdahl, Chemistry — The ideal gas law.

PV=nRT, R=0.082057 L·atm/(mol·K). Temperature must be in kelvin. Results are rounded for display.

How to use this calculator

1

Enter four values

Fill in any four of P, V, n, T, or use the STP/room-temperature preset buttons.

2

Read the fifth value

The unknown variable solves instantly using PV=nRT.

3

Check your units

Confirm temperature is in kelvin — a common source of calculation errors.

Related tools

Frequently asked questions

What is the ideal gas law?

The ideal gas law 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 in kelvin.

What value of R should I use?

R = 0.082057 L·atm/(mol·K) when using litres, atmospheres, moles, and kelvin. R = 8.3145 J/(mol·K) applies when using SI units (m³, Pa, mol, K) instead.

When does the ideal gas law break down?

At high pressures and low temperatures, real gases deviate from ideal behavior because intermolecular forces and molecular volume become significant — the van der Waals equation provides corrections for these effects.

What is STP?

STP (Standard Temperature and Pressure) is traditionally 0°C (273.15 K) and 1 atm. At STP, one mole of an ideal gas occupies 22.414 litres — a useful reference volume in stoichiometry problems.

Why must temperature be in kelvin?

The ideal gas law requires an absolute temperature scale where zero truly means zero volume/pressure for an ideal gas — kelvin satisfies this, while Celsius (which allows negative values) does not. Convert from Celsius by adding 273.15.

All tool categories

🧪 Chemistry (50 tools)
⏲️ Half-Life Calculator🔬 Molar Mass Calculator🧪 Molarity Calculator💨 Ideal Gas Law Calculator🔄 Combined Gas Law Calculator🌈 pH Calculator💧 Dilution Calculator🧴 Percent Concentration Calculator🌫️ PPM Calculator🧊 Molality Calculator⚗️ Normality Calculator🎈 Boyle's Law Calculator🔺 Charles's Law Calculator🌡️ Gay-Lussac's Law Calculator🧮 Chemical Equation Balancer⚖️ Limiting Reagent Calculator🎯 Percent Yield Calculator🔵 pOH Calculator🧫 Theoretical Yield Calculator🥼 Actual Yield Calculator🧬 Molecular Formula Calculator🔢 Mole Ratio Calculator🧿 Empirical Formula Calculator🧯 Henderson-Hasselbalch (Buffer) Calculator🫧 Neutralization Reaction Calculator💉 Titration Calculator🔁 Equilibrium Constant (Keq) Calculator⏳ Reaction Rate Calculator🌌 Avogadro's Number Calculator🧭 Reaction Quotient (Q) Calculator🌋 Enthalpy Calculator🥽 Calorimetry Calculator🎲 Entropy Calculator⚛️ Ka/Kb Equilibrium Constant Calculator🌬️ Dalton's Law (Partial Pressure) Calculator➡️ Gibbs Free Energy Calculator🔗 Bond Energy Calculator🔋 Nernst Equation Calculator🏔️ Arrhenius Equation Calculator☢️ Isotope Calculator🔘 Atom Calculator🔷 Electron Configuration Calculator🔌 Cell EMF Calculator🪫 Faraday's Law of Electrolysis Calculator♨️ Boiling Point Elevation Calculator❄️ Freezing Point Depression Calculator🔠 Interactive Periodic Table🔶 Atomic Mass Calculator⏱️ Rate Constant Calculator🫙 Vapor Pressure Calculator
🌐 Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧬 Biology (50 tools)
🏠 Construction & Home Improvement (105 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🔄 Converters (69 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)