What this calculator does
Find a gas's pressure, volume, amount or temperature when you know the other three. The ideal gas law links the four things that describe a sample of gas. They are its pressure P, its volume V, the amount of gas n in moles, and its absolute temperature T (measured from absolute zero, in kelvins). The rule is PV = nRT, where R is a fixed number called the molar gas constant. Know any three and the fourth follows.
This calculator solves the law for whichever one you need. It takes pressure in pascals, kilopascals, atmospheres, bars, psi, mmHg and more. Volume can be in liters, milliliters, cubic meters or cubic feet. Temperature can be in Celsius, Fahrenheit or kelvins. Every value is first converted to standard scientific (SI) units, and each conversion is shown in the working.
Where it's used
Why this math matters outside the classroom:
- Molar volume. Chemistry students find that 1 mol of gas at 273.15 K and 1 atm fills about 22.4 L.
- Cold tires. Drivers notice tire pressure readings drop on cold mornings because pressure falls with temperature in a fixed volume.
- Scuba tanks. Dive shops estimate how many moles of air a 12 L tank holds when it is filled to 200 bar at room temperature.
- Airbags. Airbag designers work out how much gas a chemical reaction must release to fill a bag of known volume.
Grade level and standards: Grades 10–11; Common Core State Standards for Mathematics HSA.CED.A.4. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Choose which one to solve for: pressure, volume, amount of gas or temperature.
- Enter the three known values and choose their units. Pressure must be absolute, not gauge (see the note below).
- Choose the unit for the answer. The result is also listed in other units, along with the molar volume (the space one mole takes up).
What the inputs mean
- Absolute pressure (P)
- Gauges usually read pressure above the surrounding air. The gas law needs absolute pressure. So add atmospheric pressure (about 101.3 kPa or 14.7 psi at sea level) to a gauge reading.
- Amount of gas (n)
- One mole is 6.02214076 × 10²³ particles. To get moles from a mass, divide the mass in grams by the gas's molar mass (grams per mole). For example, 32 g of oxygen (O₂) ÷ 32.00 g/mol ≈ 1 mol.
- Temperature (T)
- The law only works with absolute temperature. Celsius and Fahrenheit readings are converted to kelvins. Anything at or below absolute zero (−273.15 °C, −459.67 °F) is rejected.
Formula and method
P × V = n × R × T P = nRT ÷ V V = nRT ÷ P n = PV ÷ (RT) T = PV ÷ (nR) R = 8.314462618 J/(mol·K) T(K) = T(°C) + 273.15
P is pressure, V is volume, n is the amount of gas in moles, and T is the temperature in kelvins (K). R is the gas constant, 8.314462618 joules per mole per kelvin.
With P in pascals, V in cubic meters and T in kelvins, the product PV is an energy in joules. R converts between that energy and the amount of gas and its temperature. R is the Avogadro constant times the Boltzmann constant. Both have had exact values in the SI since 2019.
Temperature has to be absolute because the law is a proportion. Doubling the kelvin temperature at a fixed volume doubles the pressure. But doubling a Celsius reading, say from 10 °C to 20 °C, raises the absolute temperature by only about 3.5%.
Worked example
What volume does 1 mol of an ideal gas occupy at 0 °C and 1 atm?
- Convert pressure: 1 atm × 101,325 = 101,325 Pa.
- Convert temperature: 0 °C + 273.15 = 273.15 K.
- V = nRT ÷ P = 1 × 8.314462618 × 273.15 ÷ 101,325 = 0.0224139695 m³.
- Convert to liters: 0.0224139695 ÷ 0.001 = 22.414 L.
Result: One mole of ideal gas fills 22.414 L at 0 °C and 1 atm. That's the familiar standard molar volume.
Understanding the result
The molar volume (volume per mole) depends only on pressure and temperature, not on which gas it is. At 0 °C and 1 atm it's about 22.41 L/mol. At 25 °C and 1 atm it's about 24.47 L/mol.
Real gases follow the law closely at low pressure and at temperatures well above their boiling points. Air, nitrogen, oxygen, helium and hydrogen in everyday conditions typically differ from it by well under 1%.
Assumptions and limitations
- The gas is ideal: its molecules take up almost no space and don't attract or push away each other.
- Pressure is absolute, and the temperature is the same all through the gas.
- The amount of gas is fixed, with no leaks or chemical reactions.
- At high pressures, or close to turning into a liquid, real gases differ noticeably. Then an equation of state such as van der Waals is more accurate.
- Water vapor, refrigerants and other gases that turn to liquid easily can stray from ideal behavior at room conditions.
- Gauge pressure entered by mistake will give results that are badly wrong.
Frequently asked questions
Why can't I use Celsius directly in PV = nRT?
Because the law is proportional to temperature measured from absolute zero. Zero degrees Celsius isn't zero heat energy. So a Celsius value would give nonsense, such as zero pressure at the freezing point of water. The calculator converts to kelvins for you.
Which value of R should I use?
In SI units R = 8.314462618 J/(mol·K). Other values such as 0.082057 L·atm/(mol·K) are the same constant in different units. This calculator converts every input to SI first, so you never have to pick a matching R.
What is standard temperature and pressure?
Definitions vary. Older texts use 0 °C and 1 atm (molar volume 22.414 L/mol). IUPAC, the international chemistry body, now uses 0 °C and 100 kPa (22.711 L/mol). Enter whichever pair your course or industry uses.
How do I find the mass of the gas?
Solve for the amount n in moles, then multiply by the molar mass. For example, 0.5 mol of carbon dioxide (44.01 g/mol) has a mass of about 22.0 g.
How this calculator is checked
Method: Ideal gas equation PV = nRT; R = N_A·k = 8.314462618 J/(mol·K) (exact constants of the 2019 SI); K = °C + 273.15. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Ideal Gas Law Calculator on your own website or blog for free. Paste this code where you want it to appear: