PV = nRT, solved for any variable — pressure, volume, moles, or temperature of an ideal gas. Free chemistry and physics calculator.
Home » Math Calculators » Ideal Gas Law Calculator
The ideal gas law, PV = nRT, is one of the great unifying equations of science: it links the pressure, volume, temperature, and amount of a gas in a single elegant relationship. It predicts how a balloon expands when heated, how much gas a scuba tank holds, and how engines convert heat into work — all from four measurable quantities and one universal constant.
Our free Ideal Gas Law Calculator solves PV = nRT for whichever variable you don’t know. Enter pressure, volume, moles, and temperature (in kPa, liters, moles, and kelvin), pick the unknown, and get the answer with the substitution shown. It uses R = 8.314 L·kPa/(mol·K), the gas constant matched to these units.
The law is called ‘ideal’ because it assumes gas particles have no volume and never attract each other — approximations that work beautifully for most real gases at ordinary temperatures and pressures. When they break down (very high pressure, very low temperature), chemists reach for corrections like the van der Waals equation — but for homework, labs, and engineering estimates, PV = nRT remains the workhorse.
Temperature must be in kelvin: K = °C + 273.15. Pressure defaults to kPa; if your data is in atm, multiply by 101.325 first (1 atm = 101.325 kPa).
The ideal gas law states that for a fixed amount of gas, pressure times volume is proportional to absolute temperature: PV = nRT. Here P is pressure, V is volume, n is the amount in moles, T is the absolute temperature in kelvin, and R is the universal gas constant. It unites three older empirical laws — Boyle’s (P∝1/V), Charles’s (V∝T), and Avogadro’s (V∝n) — into one equation.
The constant R = 8.314 J/(mol·K) is ‘universal’ because it is the same for every gas — a deep fact reflecting that temperature measures average molecular kinetic energy regardless of the molecule. In the units this calculator uses (kPa, L, mol, K), R = 8.314 L·kPa/(mol·K), which keeps the arithmetic clean: one mole at standard temperature and pressure occupies about 22.4 L.
An ideal gas is a theoretical model: point particles with no intermolecular forces, colliding elastically. Real gases deviate — molecules do have size and do attract — but at the low pressures and moderate temperatures of everyday life, air, oxygen, nitrogen, and helium all obey PV = nRT within a percent or two. The law fails gracefully: deviations themselves are informative, revealing molecular interactions.
The equation’s power is its predictive symmetry. Heat a sealed rigid container and pressure must rise (Gay-Lussac’s law falls right out). Compress a gas and it warms — the physics behind diesel engines, which ignite fuel with compression heat alone. Every one of these is PV = nRT with different variables held constant.
P = nRT÷V • V = nRT÷P • n = PV÷RT • T = PV÷nR
P = pressure (kPa) • V = volume (L) • n = moles (mol) • R = 8.314 L·kPa/(mol·K) • T = temperature (kelvin).
Each rearrangement is one algebraic step: divide both sides by the variable you want to eliminate. The calculator performs all four automatically.
Sanity check with STP: 1 mol at 273.15 K and 101.325 kPa. V = nRT/P = 1 × 8.314 × 273.15 ÷ 101.325 ≈ 22.41 L — the famous molar volume at standard temperature and pressure.
A 50 L tank holds 2 mol of gas at 300 K. Find the pressure.
Step 1: P = nRT ÷ V = 2 × 8.314 × 300 ÷ 50.
Step 2: P = 99.77 kPa ≈ 0.985 atm.
The tank sits just below atmospheric pressure — safe, but heating it would raise P proportionally.
A 10 L vessel at 200 kPa and 298 K — how many moles does it contain?
Step 1: n = PV ÷ RT = 200 × 10 ÷ (8.314 × 298).
Step 2: n = 2000 ÷ 2477.57 ≈ 0.807 mol.
For oxygen (32 g/mol), that is about 25.8 g of gas.
0.5 mol of gas at 150 kPa occupies 8 L. What is its temperature?
Step 1: T = PV ÷ nR = 150 × 8 ÷ (0.5 × 8.314).
Step 2: T = 1200 ÷ 4.157 ≈ 288.6 K ≈ 15.5 °C — a cool room-temperature gas.
Dive tanks are filled to about 20,000 kPa, and divers must know how the gas behaves as pressure drops with ascent. PV = nRT (plus Boyle’s law for the pressure–volume part) tells a diver how tank pressure translates into breathing time at depth — misjudging it risks running out of air. Dive computers effectively solve these relationships continuously.
An airbag inflates when a chemical reaction generates moles of nitrogen in milliseconds; nRT/V predicts the resulting pressure that cushions the occupant. Tire pressure monitoring is the same law in slow motion: a tire at 220 kPa on a cold morning can exceed 250 kPa on a hot highway purely from temperature — which is why pressures are always specified ‘cold’.
The ideal gas law PV = nRT relates pressure P (kPa), volume V (L), moles n (mol), and absolute temperature T (K) via the universal gas constant R = 8.314 L·kPa/(mol·K) (8.314 J/(mol·K)). Rearranged: P = nRT/V, V = nRT/P, n = PV/RT, T = PV/nR. Assumes point particles with no intermolecular forces; accurate for most real gases at ordinary conditions. Temperature must be in kelvin.
PV = nRT: pressure times volume equals moles times the gas constant times absolute temperature. It unites Boyle’s, Charles’s, and Avogadro’s laws and predicts how gases respond to changes in pressure, volume, or temperature.
R is the universal gas constant, 8.314 J/(mol·K). In the units this calculator uses (kPa, liters, mol, kelvin), R = 8.314 L·kPa/(mol·K). It is the same for all gases because temperature measures average molecular kinetic energy.
The law relates pressure and volume to absolute temperature — the scale starting at absolute zero. Using Celsius breaks the proportionality (0 °C would falsely imply zero pressure). Convert: K = °C + 273.15.
A theoretical gas of point particles with no intermolecular attractions, colliding elastically. Real gases approximate it well at low pressure and moderate temperature; deviations grow near liquefaction or at very high pressures.
Rearrange: n = PV ÷ RT. Measure pressure, volume, and temperature (in kelvin), plug in with consistent units, and divide. Our calculator has a dedicated ‘solve for moles’ mode.
Standard temperature and pressure: 273.15 K and 101.325 kPa (1 atm). One mole of ideal gas occupies about 22.4 L at STP — a useful sanity check for any PV = nRT calculation.
At very high pressures, very low temperatures, or near phase changes, where molecular size and attractions matter. Chemists then use the van der Waals equation or compressibility factors instead.
Scuba tank capacity, tire pressure changes with temperature, airbag inflation, weather balloons, and engine cycles all rely on PV = nRT. Anytime a gas is compressed, heated, or metered, this equation is working.
Cite this page as: Ideal Gas Law Calculator — Sigma Calculator. https://sigmacalculator.net/math-calculators/ideal-gas-law-calculator/
Last updated: October 11, 2026