DataToolsLab
Chemistry Calculators

Ideal Gas Law Calculator (PV = nRT)

Solve PV = nRT for pressure, volume, moles or temperature, with per-field units.

Loading tool…

What is Ideal Gas Law?

The ideal gas law relates the pressure, volume, amount and temperature of a gas: PV = nRT. It is a good approximation for real gases at ordinary pressures and temperatures, and the starting point for every gas calculation in a first chemistry course.

How it works

Each value is converted to the base units its gas constant uses — atmospheres, litres and kelvin — the equation is rearranged for whichever field you left blank, and the answer is converted back into the unit you chose for that field. Celsius and Fahrenheit entries are converted to kelvin before any arithmetic happens, because a careless 25 °C where kelvin was expected is the commonest mistake in this calculation.

  1. Enter what you know. Every field recalculates as you type — there is no submit button. Leave the quantity you want blank and the page solves for it.
  2. Read the answer and the working. The result appears above the fold; underneath it is the formula with your numbers substituted, so the arithmetic can be checked rather than trusted.
  3. Check the units and the size. Units are shown on every value and selectable per field, so a result in kJ, kPa or km/h is converted rather than assumed. Sanity-check the magnitude against a known landmark such as 1 g/cm³ for water.

Examples

A textbook problem with a known answer

Every tool here is checked against standard example problems — the molar mass of C6H12O6 is 180.16 g/mol, and free fall from 20 m takes about 2.02 s at g = 9.8 m/s².

A result you want to reason backwards from

Leave the quantity you already know blank instead: given the final answer, most tools recover the starting value — the mass needed for a target concentration, or the height a fall must have had.

Common mistakes

Forgetting that a formula is only as good as its subscripts

H2O and H2O2 are different compounds. The formula field shows its parse — element by element — so a mis-typed subscript is visible before it reaches the arithmetic.

Mixing units in the middle of a calculation

The most common source of a wrong answer is a value in grams next to a formula expecting kilograms, or Celsius next to a gas constant expecting kelvin. This category converts on the way in and labels what it used.

Frequently asked questions

What value of R should I use?

It depends on the units. This calculator uses 0.082057 L·atm·mol⁻¹·K⁻¹, which matches atmospheres and litres — so pressures entered in kPa, bar, psi or mmHg are converted to atmospheres first.

Does the temperature have to be in kelvin?

The equation needs absolute temperature, so yes. The calculator converts automatically: 25 °C becomes 298.15 K. Entering 25 as kelvin would give an answer about twelve times too small.

What is one mole of an ideal gas at STP?

22.4 litres at 0 °C and 1 atm. Set P = 1 atm, T = 273.15 K and n = 1 mol and the volume comes out as 22.41 L.

Online