About the Ideal Gas Law Calculator
The ideal gas law, PV = nRT, ties together the four quantities that describe a gas: its pressure, volume, amount in moles and temperature. Fix any three and the fourth is decided. It explains why tyres lose pressure on a cold morning, why a balloon shrinks in the freezer and how much gas a cylinder holds, and it is one of the first equations every chemistry and physics student learns.
This ideal gas law calculator solves PV = nRT for volume, pressure, moles or temperature. It accepts pressure in atm, kPa, Pa, bar, mmHg or psi, volume in litres, millilitres, cubic metres or cubic feet, and temperature in Celsius, kelvin or Fahrenheit, converting everything to SI units behind the scenes. It shows every value in common units and the molar volume.
How to Use the Ideal Gas Law Calculator
Choose what to find: volume, pressure, moles or temperature.
Enter the three known values and choose their units.
Temperatures can be in °C, K or °F; the calculator converts them to kelvin.
The Formula
P × V = n × R × T
P = pressure (Pa) V = volume (m³)
n = amount of gas (mol) T = absolute temperature (K)
R = 8.314462618 J/(mol·K)
V = nRT ÷ P P = nRT ÷ V n = PV ÷ RT T = PV ÷ nR
Useful conversions: 1 atm = 101,325 Pa = 101.325 kPa = 1.01325 bar = 760 mmHg; 1 L = 0.001 m³; T(K) = T(°C) + 273.15.
Step-by-Step Examples
Volume of 1 mol at 0 °C and 1 atm.
T = 0 + 273.15 = 273.15 K, P = 101,325 Pa
V = 1 × 8.3145 × 273.15 ÷ 101,325 = 0.022414 m³ = 22.414 L
At 25 °C the same mole occupies 24.465 L.
Moles in 10 L at 2 atm and 300 K.
P = 2 × 101,325 = 202,650 Pa, V = 0.01 m³
n = 202,650 × 0.01 ÷ (8.3145 × 300) = 0.81244 mol
Pressure of 2 mol in 10 L at 27 °C.
T = 300.15 K
P = 2 × 8.3145 × 300.15 ÷ 0.01 = 499,120 Pa = 4.9259 atm
The Gas Laws It Contains
The ideal gas law combines the older gas laws, each of which holds one or two quantities fixed:
Boyle's law P₁V₁ = P₂V₂ fixed n and T
Charles's law V₁ ÷ T₁ = V₂ ÷ T₂ fixed n and P
Gay-Lussac's law P₁ ÷ T₁ = P₂ ÷ T₂ fixed n and V
Avogadro's law V₁ ÷ n₁ = V₂ ÷ n₂ fixed P and T
Squeezing a gas into half the volume at constant temperature doubles its pressure; heating it from 300 K to 600 K at constant pressure doubles its volume.
Why Temperature Must Be in Kelvin
The gas law depends on absolute temperature, measured from absolute zero, −273.15 °C, where an ideal gas would have no thermal motion. Doubling the temperature in kelvin doubles the volume or pressure, but doubling it in Celsius does not: warming from 10 °C to 20 °C is only a 3.5 percent rise in absolute temperature, from 283.15 K to 293.15 K. Always convert to kelvin before using the equation; the calculator does this automatically.
Standard Conditions and Molar Volume
Chemists often quote gas volumes at standard conditions. At 0 °C and 1 atm, one mole of an ideal gas occupies about 22.414 L, the classic figure from textbooks. IUPAC's current standard pressure is 1 bar rather than 1 atm, which gives about 22.711 L at 0 °C. At room conditions, 25 °C and 1 atm, the molar volume is about 24.465 L. Because these figures differ, always check which standard a problem or data table uses.
When Real Gases Differ
Real gas molecules take up space and attract one another slightly. At ordinary temperatures and pressures these effects are tiny — air, nitrogen, oxygen and helium follow the ideal gas law to within a fraction of a percent. At high pressures, where molecules are packed closely, and at low temperatures near the point where the gas turns to liquid, the differences grow. The van der Waals equation adds corrections for both effects and is used in such cases.
Gas Law Problems in Practice
Many real problems involve a gas changing from one state to another. If the amount of gas stays the same, the combined gas law, P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂, gives the new pressure, volume or temperature directly. For example, a car tyre at 220 kPa absolute pressure on a 10 °C morning will reach about 237 kPa at 32 °C after a motorway drive, since the absolute temperature rises from 283.15 to 305.15 K while the volume barely changes. That is why tyre pressures should be checked when the tyres are cold. The same reasoning explains why aerosol cans carry warnings not to heat them: the pressure inside rises in proportion to absolute temperature, and a can designed for room temperature can burst if left in a hot car or near a fire.
Moles, Mass and Density of a Gas
Once you know the number of moles, multiplying by the molar mass gives the mass of the gas. One mole of air at room conditions has a mass of about 29 g and occupies about 24.5 L, giving a density of roughly 1.2 g/L. Carbon dioxide, at 44 g/mol, is about one and a half times as dense as air, which is why it can collect in low-lying spaces; helium, at 4 g/mol, is about seven times lighter than air, which is why helium balloons float. Rearranging the ideal gas law gives density directly: density = P × M ÷ (R × T).
Understanding Your Result
The headline is the value you asked for in the units you chose.
The all values line restates pressure, volume, moles and temperature in common units.
The molar volume line gives the volume per mole and the standard reference values.
When Should You Use This Calculator?
Use it for chemistry and physics homework on gases.
Use it to estimate the amount of gas in a container or cylinder.
Use it to see how pressure changes with temperature in a closed vessel.
Common Mistakes
Using Celsius in the equation. Convert to kelvin.
Mixing units with R. With R = 8.314, use pascals and cubic metres.
Using gauge pressure. Tyre and cylinder gauges read above atmospheric pressure; add about 101 kPa for absolute pressure.
Applying it near condensation. Real gases deviate at high pressure and low temperature.