Ideal Gas Law Calculator

This ideal gas law calculator finds the amount of gas in moles from pressure, volume, and temperature using PV = nRT. Enter the three values and the ideal gas law calculator returns the moles, the absolute temperature, and the number of molecules. It is a quick gas law calculator for chemistry and physics problems.

kPa
L
°C

Results

Enter your values and press Calculate to see results.

The Ideal Gas Law Calculator is part of our Energy collection. Browse more energy to size, convert, and check your work alongside this tool.

What the ideal gas law calculator shows

The ideal gas law links four properties of a gas: pressure, volume, temperature, and amount. Fix three and the fourth follows. This ideal gas law calculator takes pressure, volume, and temperature and returns the amount in moles. As an ideal gas calculator it works for air, nitrogen, oxygen, and other gases at ordinary conditions.

The PV nRT calculator formula

The pv nrt calculator rearranges the ideal gas law for the amount of gas:

PV = nRT ⇒ n = PV ÷ (RT)

P is pressure in pascals, V is volume in cubic metres, T is absolute temperature in kelvin, and R is the gas constant, 8.314 J/(mol·K). The same law rearranges to P = nRT/V, V = nRT/P, and T = PV/(nR) when a different value is unknown.

Ideal gas law calculator with steps

A gas at 101.325 kPa, 22.414 L, and 0 °C. The ideal gas law calculator with steps gives:

n = (101,325 × 0.022414) ÷ (8.314 × 273.15) = 1.000 mol

This is the classic result: one mole of an ideal gas fills 22.4 litres at standard temperature and pressure.

How to use the ideal gas equation calculator

Enter the pressure in kilopascals, the volume in litres, and the temperature in degrees Celsius. The ideal gas equation calculator converts to SI units, adds 273.15 to the temperature, and solves for n. It also shows the number of molecules using Avogadro's number. Always use absolute pressure, not gauge pressure from a tyre gauge.

Reading the gas law calculator result

The moles tell you how much gas is present; multiply by the molar mass to get grams. The gas law calculator assumes ideal behaviour, which is accurate for most gases near room temperature and atmospheric pressure. At very high pressure or very low temperature, real gases deviate and a correction such as the van der Waals equation is needed.

When to use the ideal gas calculator

  • Solving chemistry homework with the ideal gas calculator
  • Finding the gas in a cylinder or tank
  • Checking lab results against PV = nRT
  • Converting between gas amount and volume

Common ideal gas law calculator mistakes

  • Using Celsius directly. Temperature must be in kelvin.
  • Using gauge pressure. Add atmospheric pressure to a gauge reading.
  • Mismatched R. Match the gas constant to your units.

Tips for accurate results

  • Write units next to every value before calculating.
  • Check results against 22.4 L per mole at STP.
  • Use real-gas corrections at high pressure.

Calculator for gas laws: Boyle, Charles, and combined

The ideal gas law contains the older gas laws. Hold n and T fixed and you get Boyle's law, PV = constant. Hold n and P fixed and you get Charles's law, V/T = constant. Hold n fixed and you get the combined gas law, P1V1/T1 = P2V2/T2. A calculator for gas laws built on PV = nRT covers all of them. Gas density follows too, since density is mass over volume, which the density calculator handles once you know the mass.

Gas equation calculator units

Most mistakes with a gas equation calculator are unit mistakes. Keep pressure in pascals, volume in cubic metres, and temperature in kelvin when using R = 8.314, or switch R to match litres and atmospheres. This tool accepts kPa, litres, and °C and converts internally.

Gas law calculator constants

QuantityValue
Gas constant R8.314 J/(mol·K)
R in L·atm0.08206 L·atm/(mol·K)
Molar volume at STP22.414 L/mol
Avogadro's number6.022 × 10²³ /mol

Ideal Gas Law Calculator FAQ

What is the ideal gas law?

PV = nRT, where P is pressure, V volume, n moles, R the gas constant, and T absolute temperature. The ideal gas law calculator solves it for n.

Why must temperature be in kelvin?

The law needs absolute temperature. Adding 273.15 to °C gives kelvin, which the calculator does automatically.

What value of R should I use?

8.314 J/(mol·K) with pascals and cubic metres, or 0.08206 L·atm/(mol·K) with litres and atmospheres.

When does the ideal gas law fail?

At very high pressures and very low temperatures, where molecules attract each other and take up real space.

Related Calculators