Thermodynamics & Heat Transfer

Ideal Gas Law Calculator

Solve for pressure, volume, amount of substance or temperature using the ideal gas law.

Formula P = n R T / VReviewed Sep 8, 2026

The ideal gas law relates the pressure, volume, amount of substance and absolute temperature of an ideal gas: PV = nRT. Enter any three of the four values to solve for the fourth. Temperature is always used as absolute temperature (kelvin) internally - enter it in Celsius or Fahrenheit and this calculator converts it automatically.

Calculation Bench
Solve for
01

V · Volume occupied by the gas.

02

n · Amount of substance.

03

T · Absolute temperature of the gas.

Converted to absolute temperature (Kelvin) for calculation.

Solution

Enter the required values to calculate pressure.

P = n R T / V

Formula Sheet

P=nRTVP = \dfrac{nRT}{V}
V=nRTPV = \dfrac{nRT}{P}
n=PVRTn = \dfrac{PV}{RT}
T=PVnRT = \dfrac{PV}{nR}
  • PPressure
  • VVolume
  • nAmount
  • TTemperature
  • RGas Constant

Variables & Units

SymbolVariableDescriptionCommon Units
PPressureAbsolute pressure of the gas.atm, kPa, bar, psi
VVolumeVolume occupied by the gas.L, m³, ft³
nAmountAmount of substance.mol, kmol
TTemperatureAbsolute temperature of the gas.K, °C, °F
RGas ConstantUniversal gas constant, a fixed value of 8.314 J/(mol·K) - not user-editable.

How to Use This Calculator

  • 01Choose which quantity to solve for - Pressure, Volume, Amount, or Temperature - using the solve-for selector.
  • 02Enter the other three known values, selecting the correct unit for each.
  • 03Select Calculate to see the result. Temperature entered in Celsius or Fahrenheit is converted to Kelvin automatically before the calculation runs.
  • 04Use the gas-constant reference table below if you need R expressed in a different unit system than the SI value used internally. Use absolute pressure, not gauge pressure, when entering P.

How the Formula Works

The ideal gas law, PV = nRT, relates a gas's pressure, volume, amount of substance, and absolute temperature through a single proportionality constant, R. Because all four quantities are linked by one equation, fixing any three determines the fourth - increasing temperature at constant volume raises pressure, while increasing volume at constant temperature lowers pressure, matching the everyday behavior of a gas in a sealed container.

Temperature must be absolute (kelvin) for the law to hold, since Celsius and Fahrenheit have arbitrary zero points that don't correspond to zero thermal energy - using them directly would give an incorrect result. This calculator performs that conversion automatically, so any of the three common temperature scales can be entered directly.

Worked Example 01

Standard molar volume at STP

Known

  • Amount (n): 1 mol
  • Temperature (T): 0 °C
  • Pressure (P): 1 atm

Formula

V = n R T / P

Substitution

V = (1 × 8.314 × 273.15) / 101,325

Result

V ≈ 22.41 L

One mole of an ideal gas at 0°C and 1 atm (standard temperature and pressure) occupies about 22.41 liters - the textbook standard molar volume.

Worked Example 02

Solving for pressure

Known

  • Amount (n): 2 mol
  • Temperature (T): 300 K (26.85 °C)
  • Volume (V): 50 L

Formula

P = n R T / V

Substitution

P = (2 × 8.314 × 300) / 0.05

Result

P ≈ 99,768 Pa (≈ 0.985 atm)

Two moles of an ideal gas at 300 K (about 27°C), confined to a 50 L volume, exert roughly 99.8 kPa of pressure - just under standard atmospheric pressure.

Applications

  • 01Estimating gas volume, pressure or temperature for process design
  • 02Checking gas cylinder or storage tank conditions
  • 03Classroom and laboratory verification of PV = nRT
  • 04Converting between pressure, volume, moles, and temperature before using more detailed thermodynamic models

The Gas Constant R in Common Unit Forms

Unit SystemValue of RWhen you see it
SI - J/(mol·K)8.314Engineering and physics calculations in base SI units.
L·atm/(mol·K)0.08206Chemistry problems using liters and atmospheres.
cal/(mol·K)1.987Older thermodynamics and physical chemistry references.

Assumptions

  • 01The gas behaves ideally - negligible intermolecular forces and negligible molecular volume.
  • 02The system is closed and at thermal equilibrium.
  • 03Temperature is always converted to and calculated using absolute temperature (kelvin).

Where This Model Stops

  • 01Real gases deviate from ideal behavior at high pressure or low temperature - use a real-gas equation of state (e.g. van der Waals) when accuracy near these conditions matters.
  • 02Not valid near a phase change (condensation, liquefaction).
  • 03Does not account for gas mixtures, compressibility factor Z, humidity corrections, or pressure-drop effects.

References

  1. [1]

    Ideal gas law

    Standard thermodynamics and physical chemistry fundamentals

    PV = nRT, with R as the universal gas constant, 8.314 J/(mol·K).

Frequently Asked Questions

Why does this calculator convert Celsius or Fahrenheit to Kelvin?

The ideal gas law requires absolute temperature. Celsius and Fahrenheit have arbitrary zero points that don't correspond to zero thermal energy, so using them directly in PV = nRT would give an incorrect result. Kelvin's zero point is absolute zero.

What is the gas constant R?

R is the universal gas constant, 8.314 J/(mol·K). It's a fixed physical constant, not something you enter - it's already built into the calculation.

Does this work for any gas?

It's a good approximation for most gases under normal conditions. It becomes less accurate for real gases at high pressure, low temperature, or near a phase change, where intermolecular forces and molecular volume can no longer be ignored.

Should pressure be gauge pressure or absolute pressure?

Use absolute pressure. If your measurement is gauge pressure, add local atmospheric pressure before entering it. The ideal gas law relates the gas state to absolute pressure, volume, amount, and absolute temperature.