U
UseCalcForge Free Online Calculators
Science & Engineering

Ideal Gas Law Calculator.

Solve PV = nRT for pressure, volume, moles or temperature in common units.

Reviewed by the UseCalcForge editorial desk | Last updated
Solve for

Runs entirely in your browser. The values you enter never leave your device — there is no request to our server and nothing is stored. How we handle data

The equation

PV = nRT
P = nRT / V  ·  V = nRT / P  ·  n = PV / RT  ·  T = PV / nR
R = 8.314 J/(mol·K) = 0.08206 L·atm/(mol·K)

The calculator converts every input to SI units (pascals, cubic metres, kelvin), solves with the exact SI gas constant, and converts the answer back to the unit you selected. 1 atm = 101,325 Pa, 1 bar = 100,000 Pa, 1 mmHg = 133.322 Pa.

Worked examples

Molar volume. One mole at 0 °C (273.15 K) and 1 atm: V = 1 × 8.314 × 273.15 ÷ 101,325 = 0.02241 m³ = 22.41 L.

Pressure in a container. 2 mol of gas in a 10 L container at 25 °C (298.15 K): P = 2 × 8.314 × 298.15 ÷ 0.010 = 495,800 Pa = 4.89 atm.

When real gases differ

  • High pressure. Molecules take up a real share of the volume, and the ideal law underestimates the volume needed.
  • Low temperature. Near condensation, attractions between molecules pull the pressure below the ideal value. Steam, ammonia and carbon dioxide close to their boiling points deviate the most.
  • Everyday conditions. For air, nitrogen, oxygen, helium and similar gases near room temperature and atmospheric pressure, the ideal law is accurate to well under 1%.
Knowledge Base

Using the Ideal Gas Law Methodology.

The ideal gas law ties together the four things you can measure about a gas: its pressure, the volume it fills, how much of it there is and how hot it is. It combines Boyle's, Charles's and Avogadro's laws into one equation, and it is accurate enough for most chemistry homework, lab work and engineering estimates at ordinary conditions.

The Calculation Branch

PV = nRT

Industrial Standards.

Choose the quantity to solve for and enter the other three in any of the listed units. The calculator converts pressure to pascals, volume to cubic metres and temperature to kelvin, rearranges PV = nRT for the unknown using R = 8.314462618 J/(mol·K), and converts the result back to the unit selected for that quantity.

In-Depth Analysis & Reference Data

Units are the usual source of mistakes. The value of R depends on the units: 8.314 with pascals and cubic metres, 0.08206 with atmospheres and litres, 62.36 with mmHg and litres. Mixing kPa with the 0.08206 value is the classic error. Converting everything to SI first, as the calculator does, avoids it.

Finding moles from mass. If you know the mass of gas rather than the number of moles, divide the mass by the molar mass: 8.0 g of oxygen gas (O2, 32.00 g/mol) is 0.25 mol. You can also run it the other way to find the molar mass of an unknown gas from a measured mass, pressure, volume and temperature.

Frequently asked questions.

What is STP?

Standard temperature and pressure. IUPAC defines it as 0 °C and 1 bar, where one mole fills 22.71 L. Many textbooks still use 0 °C and 1 atm, giving 22.41 L. Check which your course uses.

Does the kind of gas matter?

Not for the ideal law. A mole of helium and a mole of carbon dioxide fill the same volume at the same temperature and pressure. The kind of gas only matters for its mass and for how far it departs from ideal behaviour.

Estimates for planning. Always confirm against an authoritative source.