What the Ideal Gas Law Actually Says
Four numbers describe any sample of gas: its pressure (P), volume (V), amount in moles (n) and absolute temperature (T). The ideal gas law, PV = nRT, says these four are locked together by a single universal constant, R. Change one and at least one other must change to keep the equation balanced. Heat a sealed rigid can and the pressure climbs. Squeeze a balloon and the volume shrinks. Let gas escape a tire and the pressure falls. It is one of the most useful equations in all of science because gases are everywhere — in engines, lungs, weather systems, scuba tanks and chemical reactors.
The word "ideal" is doing real work here. The law assumes gas molecules are point particles that never attract or repel each other and take up no space themselves. No real gas behaves exactly like that, but at ordinary pressures and temperatures most gases — nitrogen, oxygen, helium, air — come within a few percent of ideal behavior. That is close enough for homework, lab work, diving calculations and engineering estimates. Where it breaks down is at very high pressure (tens of atmospheres and up) or near the temperature where the gas would liquefy; there, the van der Waals equation adds correction terms for molecular attraction and molecular volume.
Solving for Each Variable
The calculator above rearranges the equation for whichever variable you need. The four rearrangements are worth memorizing because they appear on every chemistry exam: P = nRT / V, V = nRT / P, n = PV / RT and T = PV / nR. Each one answers a practical question. Solving for P tells you the pressure inside a heated aerosol can or a scuba tank at a given temperature. Solving for V tells you how big a weather balloon will get as it rises into thin air. Solving for n tells you how many moles of gas a reaction produced, which is how chemists measure yields of gaseous products. Solving for T tells you the temperature inside an engine cylinder at peak compression.
Notice the symmetry: pressure and volume sit on one side of the proportionality, moles and temperature on the other. Doubling the moles at fixed volume and temperature doubles the pressure. Doubling the absolute temperature at fixed moles and volume also doubles the pressure. This is why tire pressure rises on a hot day and why you never throw an aerosol can in a fire — the temperature term has no mercy.
Units: Where Every Student Goes Wrong
More ideal gas law problems are lost to unit errors than to algebra. The constant R wears different numerical clothes depending on your units, and you must match them: use R = 8.314 J/(mol·K) when pressure is in pascals and volume in cubic meters; R = 0.08206 L·atm/(mol·K) when pressure is in atmospheres and volume in liters; R = 62.36 L·mmHg/(mol·K) for mmHg and liters. All three are the same physical constant — 8.314 joules per mole-kelvin — just expressed in different unit systems.
Temperature must always be in kelvin, the absolute scale. This is non-negotiable because the law involves ratios of temperature: 20°C is not "twice as hot" as 10°C in any sense the gas cares about, but 293 K versus 283 K is a clean ratio. Convert with K = °C + 273.15. For pressure, remember 1 atm = 101.325 kPa = 760 mmHg = 14.696 psi = 1.01325 bar. For volume, 1 m³ = 1000 L and 1 L = 1000 mL. The calculator handles every one of these conversions and shows its work, so you can check each step.
Worked Example: The Classic STP Problem
Let us walk through the most famous ideal gas calculation: the volume of one mole at STP (0°C, 1 atm). Convert first: T = 0 + 273.15 = 273.15 K, P = 1 atm = 101,325 Pa, n = 1 mol. Using V = nRT/P: V = (1 × 8.314 × 273.15) / 101,325 = 0.022414 m³. Multiply by 1000 to get liters: 22.414 L. This number is worth memorizing — it is the molar volume at STP and the answer to a thousand exam questions.
Now a realistic one: a 12-liter scuba tank filled to 200 bar at 20°C. How many moles of air is that? Convert: P = 200 × 100,000 = 20,000,000 Pa, V = 0.012 m³, T = 293.15 K. n = PV/RT = (20,000,000 × 0.012) / (8.314 × 293.15) = 240,000 / 2,437.4 ≈ 98.5 mol. At the surface (1 atm, ~20°C) that expands to about 2,400 liters of breathable air — which is exactly how dive computers estimate your remaining bottom time.
STP, NTP and Room Conditions
"Standard conditions" is a phrase with more than one definition, and textbooks do not always agree. The traditional chemistry STP is 0°C and 1 atm, giving 22.414 L/mol. IUPAC redefined STP in 1982 as 0°C and 100 kPa (1 bar), which gives 22.711 L/mol — a small but real difference that has tripped up careful students. NTP (normal temperature and pressure) usually means 20°C and 1 atm, giving 24.055 L/mol. Always check which convention your course uses before memorizing a molar volume. When in doubt, the calculator's STP strip shows the 1-atm convention used by most textbooks.
Real-World Applications
Beyond the classroom, the ideal gas law quietly runs modern life. Scuba divers use it (via Boyle's and Charles's laws, its special cases) to plan air consumption at depth, where every 10 meters of seawater adds another atmosphere of pressure. Tire engineers use it to set cold-inflation pressures that stay safe when tires heat up on the highway. Meteorologists use it to model how air parcels expand and cool as they rise, which is the engine of cloud formation. Chemical engineers use it to size reactors and predict yields. Even medicine uses it: anesthesiologists calculate delivered gas doses, and hyperbaric chambers are designed around it.
It also explains small everyday mysteries. A bag of chips puffs up on a mountain flight because the outside pressure dropped while the sealed inside pressure stayed put. A basketball left in a cold garage goes soft because the air inside cooled and its pressure fell. An aerosol can warns against heat because pressure climbs linearly with absolute temperature — and "linearly" becomes "explosively" faster than intuition expects.
Common Mistakes to Avoid
Run through this checklist before trusting an answer. One: temperature in kelvin — never Celsius, never Fahrenheit. Two: R matched to your pressure and volume units. Three: gauge pressure versus absolute pressure — tire gauges and tank gauges read zero at atmospheric pressure, so add 1 atm (or ~14.7 psi) before using PV = nRT. Four: consistent volume units on both sides of any ratio. Five: sanity-check the magnitude — a mole of gas at room conditions is always around 24 liters, so if your answer says 24,000 liters, a unit slipped somewhere.
The calculator guards against the worst of these: it refuses temperatures at or below absolute zero (0 K, where the equation breaks down physically), shows every conversion step, and reports the answer in multiple units so a factor-of-1000 slip is immediately visible. Use the worked steps as a template for showing your own work — teachers award partial credit for clean conversions even when the final number wobbles.
From Ideal to Real: van der Waals
When accuracy matters at high pressure, chemists upgrade to the van der Waals equation: (P + a(n/V)²)(V − nb) = nRT. The a term corrects for intermolecular attraction (which lowers the observed pressure) and the b term subtracts the volume the molecules themselves occupy. Each gas has its own a and b, tabulated in physical chemistry references. For nitrogen at 100 atm the ideal law is off by roughly 5–10%; for most student and DIY problems, that correction is smaller than your measurement error, which is why the ideal law remains the workhorse. Think of PV = nRT as the first-order truth about gases — simple, powerful, and right wherever it counts.