In thermodynamics and process engineering, gas behavior is defined by the relationship between pressure, volume, temperature, and moles.
To calculate any one of these values, we have created a free online Ideal Gas Law Calculator for the process engineers and students to do the calculation easily.

Ideal Gas law Calculator
Ideal Gas Law Calculator
Enter any three values (P, V, n, or T) and the calculator will solve for the missing variable using the Ideal Gas Law equation: PV = nRT
How to use this calculator?
- Enter any three values — Pressure (P), Volume (V), Moles (n), or Temperature (T).
- Select the correct units for each field.
- Click Calculate
What is the Ideal Gas Law? Formula?
The Ideal Gas Law helps relate pressure, volume, temperature, and the amount of gas using the equation PV = nRT. It is widely used in chemical engineering to estimate gas properties when deviations from ideal behavior are small.
PV = nRT
P = Pressure of the gas
V = Volume of the gas
n = Number of moles. (If you’d like to convert moles into the number of molecules or atoms, try our Avogadro’s Number Calculator)
R = Universal gas constant (8.314 J/mol·K)
T = Absolute temperature in Kelvin
Example
Suppose we have a nitrogen cylinder with a volume of 40 L. At room temperature (27°C or 300 K), the cylinder pressure gauge reads 150 bar.
Calculate the moles of nitrogen in the cylinder using the Ideal Gas Law equation
The cylinder contains approximately 240.6 mol of N₂, which equals about 6.74 kg of nitrogen gas.
Also check out our Bernoulli Equation Calculator to analyze how pressure, velocity, and height affect fluid flow in pipelines and process systems.
FAQ
1. What is the gas constant (R)?
The gas constant, R, connects energy, temperature, and the amount of gas in a system. R = 8.314 J·mol−1·K−1
2. Is the Ideal Gas Law valid for liquids or vapors near boiling point?
No. The Ideal Gas Law applies only to gases that behave ideally. Near boiling or condensation, molecular interactions are strong, and a real-gas equation or compressibility factor (Z) should be used instead.
3. When does the Ideal Gas Law give inaccurate results?
The equation PV=nRT works best at low pressure and high temperature. At high pressure or near condensation points, real-gas effects become significant, and the gas no longer follows ideal behavior.