Science & Engineering
Ideal Gas Law Calculator (PV = nRT)
Solve the ideal gas law for pressure, volume, moles or temperature — with unit choices for kPa, atm, bar, litres and °C, K or °F.
How to use
- 1Choose the unknown.
- 2Enter the other three values with their units.
How it's calculated
PV = nRT, with R = 8.314462618 J/(mol·K) = 0.082057 L·atm/(mol·K). Temperatures are converted to kelvin.
Frequently asked questions
What volume does one mole of gas occupy?
About 22.414 L at 0 °C and 1 atm (STP), or 24.465 L at 25 °C and 1 atm.
Why must temperature be in kelvin?
The law uses absolute temperature — 0 °C would otherwise make PV zero.
When does the ideal gas law fail?
At high pressures and low temperatures, where molecules' size and attractions matter; use the van der Waals equation then.
Why temperature must be absolute
PV = nRT only works with temperature measured from absolute zero, because the law comes from the kinetic theory of gases, where T is directly proportional to the average kinetic energy of the molecules — a quantity that can't be negative or zero in the way °C can. Plug in 0 °C directly without converting to 273.15 K and the equation would predict zero pressure or zero volume, which is why this tool silently converts every temperature unit to kelvin before solving, and converts back afterward for display.
Where the 22.4 L figure actually comes from
One mole of ideal gas at 0 °C (273.15 K) and 1 atm works out to V = nRT/P = (1)(0.082057)(273.15)/1 ≈ 22.414 L — the value this tool reproduces exactly when you solve for volume at those inputs. That figure is specific to 0 °C and 1 atm (STP); at the more commonly used 25 °C 'room temperature' reference, the same calculation gives about 24.465 L, so quoting '22.4 L per mole' without specifying the temperature is a frequent source of error in intro chemistry.
Why the law breaks down under real conditions
The ideal gas law assumes molecules have no volume of their own and no attraction to each other — a fair approximation at ordinary pressures and temperatures, but it fails as a gas is compressed or cooled toward its condensation point, where molecular volume and intermolecular forces both start to matter. The van der Waals equation corrects for this with two extra terms, but for everyday estimates — the volume of gas in a cylinder, moles of air in a tire — the ideal form here is accurate to within a few percent.
The unknown's own box hides, and zero is refused
I pick what to solve for, and that quantity's input disappears so I cannot fill the unknown and a known at the same time. Volume is the default unknown, with 1 atmosphere, 1 mole, and 0 °C, which returns about 22.414 litres. Pressure can be in atmospheres, kilopascals, bar, millimetres of mercury, or psi, and each is converted through kilopascals before the gas constant 8.314462618 is applied. Temperature accepts Celsius, kelvin, or Fahrenheit and is turned into kelvin first, then turned back if temperature was the unknown. If a zero sneaks into a denominator, pressure or volume or moles or absolute temperature, the result is not a finite number and the tool asks me to check that no value is zero where it cannot be.
Related tools
- Ohm's Law Calculator
Enter any two of voltage, current, resistance and power to calculate the other two with Ohm's law and the power formulas.
- Velocity & Acceleration Calculator (SUVAT)
Solve constant-acceleration motion problems: enter any three of initial velocity, final velocity, acceleration, time and displacement to get the other two.
- Punnett Square Calculator
Build Punnett squares for monohybrid and dihybrid crosses (Aa × Aa, AaBb × AaBb) and get genotype and phenotype ratios and probabilities.
- DNA / RNA Sequence Tools
Reverse-complement, complement, transcribe and translate DNA or RNA sequences, and get the length, GC content and base counts.
- Hemocytometer Cell Count Calculator
Calculate cell concentration and viability from hemocytometer counts: cells per mL, total cells, and the volume needed to seed a target number of cells.
- Triangle Calculator
Solve any triangle from three known values (SSS, SAS or ASA): all sides, angles, area, perimeter and heights, using the law of sines and cosines.