Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles or temperature in any common unit, with molar volume and gas density.
The Ideal Gas Law Calculator runs entirely in your browser. Pressures, volumes and temperatures you enter never leave your device.
Open the Molarity Calculator
About Ideal Gas Law Calculator
Ideal Gas Law Calculator solves PV = nRT for whichever of the four quantities you do not know. Pick the unknown and the other three fields stay editable, each with its own unit menu — pressure in pascals, kilopascals, bar, atmospheres, mmHg or psi; volume in litres, millilitres, cubic metres, cubic centimetres or cubic feet; temperature in kelvin, Celsius or Fahrenheit. Everything is converted to SI internally before the equation is solved and converted back afterwards, because the gas constant only takes a fixed numeric value once the unit system is settled. Temperature must be absolute, so a value at or below zero kelvin is rejected with an explanation rather than returning a meaningless answer.
Features
- Solves for pressure, volume, amount or temperature
- Six pressure units, five volume units and three temperature scales
- All conversions routed through SI so the units always agree
- Molar volume reported alongside the answer
- Optional gas density from a molar mass, in grams per litre
- Rejects non-absolute temperatures with a clear explanation
- Scientific notation for very large and very small results
- Runs entirely on your device
How to use the Ideal Gas Law Calculator
- Choose which quantity you are solving for
- Fill in the other three values, picking the unit each is quoted in
- Read the answer in the unit you selected, and the SI value alongside
- Optionally add a molar mass to get the gas density
Example
Input
1 mol, 1 atm, 0 °C — solve for volume
Output
22.41 L (0.02241 m³), molar volume 22.41 L/mol
The familiar molar volume at 1 atm and 0 °C; at the modern 100 kPa standard it is 22.71 L.
Common errors & troubleshooting
- The result is absurdly large or the tool refuses to calculate. — Check the temperature unit. Entering 25 with the unit set to kelvin describes a gas near absolute zero rather than room temperature — 25 °C is 298.15 K.
- The molar volume is 22.4 L in a textbook but 22.7 here. — Both are right for their own standard. IUPAC redefined standard pressure from 1 atm to 100 kPa, which raises the molar volume at 0 °C from 22.41 to 22.71 litres.
- A field is greyed out. — That is the quantity being solved for. Switch the solve-for control if you meant to supply it and calculate something else.
- The answer does not match a real gas measurement. — The ideal gas law assumes point molecules with no attraction. Near condensation or at high pressure, real gases deviate and an equation of state such as van der Waals is needed.
Frequently asked questions
- What is the value of R in the ideal gas law?
- 8.314462618 joules per mole per kelvin in SI units, which has been exact since the 2019 redefinition. In other unit systems it takes different values — 0.08206 L·atm per mole per kelvin is the common alternative.
- Why must temperature be in kelvin for PV = nRT?
- Because the law relates pressure and volume to absolute thermal energy. Celsius has an arbitrary zero, so using it makes the ratios meaningless and can even produce negative or infinite results at ordinary temperatures.
- What is the molar volume of an ideal gas?
- 22.71 litres per mole at the current standard temperature and pressure of 0 °C and 100 kPa, or 22.41 litres per mole at the older 1 atm definition. It scales directly with temperature and inversely with pressure.
- When does the ideal gas law stop being accurate?
- When molecules are close enough to interact — at high pressure, at low temperature, and near the point where the gas condenses. Under ordinary laboratory conditions most gases follow it to within a percent or two.
- Are the values I enter sent anywhere?
- No. Every conversion and calculation happens in your browser, with nothing transmitted or stored.
Related tools
- Molarity Calculator — Solve molarity, moles or volume for a solution (M = mol/L).
- Molecular Weight Calculator — Compute the molar mass of a chemical formula like H2O or C6H12O6.
- Density Calculator — Solve density, mass or volume from the density formula ρ = m/V.
- Mass Calculator — Calculate mass from density and volume, or from force and acceleration.
- pH Calculator — Convert between pH, pOH and ion concentration, and find the pH of weak acids and buffers.
- Unit Conversion Calculator — Convert length, weight, temperature, volume, area, speed and more.
All ArrayKit tools