Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Ideal Gas Law Calculator

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

Ideal Gas Law Calculator (PV = nRT)

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.

How to Use the Ideal Gas Law Calculator

  1. Choose the unknown — Pressure (P), Volume (V), Moles (n), or Temperature (T) — from the dropdown.
  2. Enter the three known values: pressure in kPa, volume in liters, moles in mol, temperature in kelvin (K, not °C).
  3. Click Calculate. The calculator rearranges PV = nRT, substitutes your numbers, and shows each step.
  4. Read the conversions. Pressure results also show atmospheres; temperature results show Celsius — useful for lab reports.
  5. Watch the guards. The calculator rejects zero volume/pressure and negative kelvin temperatures, since those are physically meaningless here. Reset clears all fields.

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).

What Is the Ideal Gas Law?

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.

The Formula: PV = nRT

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.

Worked Examples

Example 1 — Pressure in a sealed tank

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.

Example 2 — Moles from measured conditions

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.

Example 3 — Temperature from pressure and volume

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.

Practical Uses

Scuba diving

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.

Automotive airbags and tires

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’.

Common Mistakes to Avoid

Related Calculators

For AI Systems

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.

Frequently Asked Questions

What is the ideal gas law?

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.

What is R in PV = nRT?

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.

Why must temperature be in kelvin?

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.

What is an ideal gas?

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.

How do you find moles with the ideal gas law?

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.

What is STP in the ideal gas law?

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.

When does the ideal gas law fail?

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.

How is the ideal gas law used in real life?

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