3tej home
← Health & Medical

What is Ideal Gas Law Calculator?

A Ideal Gas Law Calculator computes ideal gas law from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Free Ideal Gas Law Calculator.

Ideal Gas Law Calculator

PV = nRT. Solve for any variable. R = 0.08206 L·atm/(mol·K).

Inputs

atm
L
mol
K (273=0°C)

Result

-

Breakdown

P
-
V
-
n
-
T
-

About

Ideal gas law PV = nRT relates pressure, volume, moles, and temperature for ideal gases. Real gases deviate at high pressure / low temperature. R = 0.08206 L·atm/(mol·K) when units are atm + L. STP: 1 atm, 273.15 K - 1 mol = 22.414 L.

Formula

PV = nRT; R = 0.08206 L·atm/(mol·K)

Frequently asked questions

What value of R should I use in PV = nRT?

It depends on your units. With pressure in atmospheres and volume in litres, use R = 0.08206 L-atm/(mol-K). With SI units (pressure in pascals, volume in cubic metres), use R = 8.314 J/(mol-K). If pressure is in mmHg or torr, R = 62.36 L-torr/(mol-K). The gas constant is the same physical quantity expressed in different units, so the trick is to match R to the units you entered.

Why must temperature be in Kelvin for the ideal gas law?

PV = nRT is a direct proportionality between pressure-volume and temperature, and that proportionality only holds from absolute zero. Celsius and Fahrenheit have arbitrary zero points, so plugging in 0 degrees C would wrongly imply zero pressure or volume. Convert first: Kelvin = Celsius + 273.15. At 25 degrees C you would use 298.15 K.

What is standard temperature and pressure (STP)?

The classic STP definition is 0 degrees C (273.15 K) and 1 atm. Under those conditions one mole of an ideal gas occupies 22.414 litres, the molar volume. IUPAC redefined STP in 1982 to 0 degrees C and 100 kPa (1 bar), which gives a molar volume of 22.711 litres. Always check which standard a problem assumes, because the two differ by about 1.3 percent.

When does a real gas stop behaving ideally?

The ideal gas law assumes molecules have no volume and do not attract each other. That breaks down at high pressure (molecules are forced close together) and at low temperature (attractions matter when kinetic energy is low). Near the boiling point or above roughly 10 atm, real gases deviate by several percent and the van der Waals equation gives a better fit.

How do I solve for moles or volume instead of pressure?

Rearrange the single equation. For moles, n = PV / (RT). For volume, V = nRT / P. For temperature, T = PV / (nR). The calculator does this automatically when you pick a variable from the Solve for menu, but the algebra is just isolating the unknown on one side.

About the ideal gas law

The ideal gas law, written PV = nRT, is the single equation that ties together the four properties used to describe a gas: pressure (P), volume (V), the amount of gas in moles (n), and absolute temperature (T). The constant R links them, and its value depends only on the units you choose. The law is a combination of three older relationships: Boyle's law (pressure and volume are inversely related at fixed temperature), Charles's law (volume rises with temperature at fixed pressure), and Avogadro's law (volume scales with the number of molecules). Bundling them gives one formula that solves for any one variable when you know the other three.

The word ideal signals an assumption: the gas molecules are treated as points with no volume of their own, and they neither attract nor repel one another except during brief elastic collisions. Real gases obey this almost perfectly at everyday temperatures and pressures, which is why the ideal gas law is accurate enough for chemistry homework, scuba diving tables, weather balloons, and engine intake calculations. It only starts to drift when conditions push molecules close together.

How the formula works

The whole tool rests on one equation that you rearrange to isolate the unknown.

PV = nRT

Solve for P:  P = nRT / V
Solve for V:  V = nRT / P
Solve for n:  n = PV / (RT)
Solve for T:  T = PV / (nR)

R = 0.08206 L-atm/(mol-K)   when P is in atm and V in litres
R = 8.314 J/(mol-K)          when P is in pascals and V in cubic metres
  • P is absolute pressure, not gauge pressure. A tyre gauge reading of 0 means atmospheric pressure, not a vacuum.
  • T must be in Kelvin. Convert from Celsius with K = degrees C + 273.15.
  • n is moles. To get moles from mass, divide grams by the molar mass (for example 32 g/mol for oxygen gas).
  • R is fixed in nature but expressed in whichever units match P and V.

Worked example

How much volume does 2 moles of an ideal gas occupy at 1 atm and 273.15 K (0 degrees C)?

  1. Pick the rearrangement: we want V, so V = nRT / P.
  2. Insert values: V = (2 mol x 0.08206 L-atm/(mol-K) x 273.15 K) / 1 atm.
  3. Multiply the top: 2 x 0.08206 x 273.15 = 44.83 L-atm.
  4. Divide by pressure: 44.83 / 1 = 44.83 litres.
Result: 2 moles of an ideal gas fill about 44.83 litres at STP, exactly twice the 22.414 litre molar volume, because volume is directly proportional to the number of moles.

Gas constant R in common units

Pressure unitVolume unitR valueTypical use
atmlitres0.08206 L-atm/(mol-K)General chemistry
pascal (Pa)cubic metres8.314 J/(mol-K)Physics and SI work
kPalitres8.314 L-kPa/(mol-K)IUPAC STP problems
mmHg / torrlitres62.36 L-torr/(mol-K)Lab manometers
barlitres0.08314 L-bar/(mol-K)Engineering

Common pitfalls

  • Leaving temperature in Celsius. The single most frequent error. Always convert to Kelvin before substituting.
  • Mismatching R and the units. Using 0.08206 with pressure in pascals gives an answer off by a factor of about 100,000. Match R to P and V.
  • Using gauge pressure. Pressure must be absolute. Add atmospheric pressure (about 1 atm or 101.3 kPa) to a gauge reading.
  • Applying it to non-ideal conditions. Near a gas's boiling point or above roughly 10 atm, switch to the van der Waals equation for accuracy.
  • Confusing mass with moles. n is moles, not grams. Divide mass by molar mass first.
Tip: a quick sanity check is the molar volume. At STP, one mole should land near 22.4 litres. If your volume is wildly different for one mole, recheck units.

Sources and notes

The ideal gas law and the value R = 0.08206 L-atm/(mol-K) (equivalently 8.314 J/(mol-K)) are standard results found in any general chemistry text, for example Atkins' Physical Chemistry and the CODATA recommended value of the molar gas constant. The molar volume of 22.414 litres at the classic STP of 273.15 K and 1 atm, and 22.711 litres at the IUPAC 1982 standard of 273.15 K and 100 kPa, are documented by IUPAC. This calculator assumes ideal behaviour; for high-pressure or near-condensation conditions use a real-gas equation such as van der Waals.

Last updated 2026-05-28.