← Chemical & Process Engineering Studio
PV = nRT · R = 8.314 J/(mol·K)

Ideal Gas Law Calculator

Solve the ideal gas law PV = nRT for any one of pressure, volume, moles, or temperature using consistent SI units. The calculator also returns the gas density from its molar mass and the molar volume, so you can size vessels, vents, and gas streams in one step.

Inputs
mol
K
g/mol
Pressure P
1.01e+5 Pa
from PV = nRT with R = 8.314 J/(mol·K)
Gas Density ρ
1.293 kg/m³
ρ = P·M / (R·T)
Molar Volume Vₘ
0.0224 m³/mol
Vₘ = V / n

About the Ideal Gas Law Calculator

The ideal gas law, PV = nRT, is the single most-used equation of state in chemistry and process engineering. It ties together the pressure, volume, amount, and temperature of a gas through one constant, R. This calculator rearranges the law to solve for whichever variable you leave unknown, and it adds the two quantities engineers reach for most — the gas density and the molar volume.

The equation PV = nRT

P is the absolute pressure (Pa), V the volume (m³), n the amount of substance (mol), T the absolute temperature (K), and R the universal gas constant. Rearranging gives each variable directly: P = nRT/V, V = nRT/P, n = PV/(RT), and T = PV/(nR). The only discipline required is unit consistency — pressures must be absolute, temperatures must be in kelvin, and every quantity must belong to the same unit system. This tool works entirely in SI so the result is unambiguous.

The gas constant R and its many units

In SI, R = 8.314 J/(mol·K) = 8.314 Pa·m³/(mol·K). The same physical constant appears in other unit sets: 0.08206 L·atm/(mol·K), 8.314 L·kPa/(mol·K), and 62.36 L·mmHg/(mol·K). Choosing the wrong numerical value of R for your units is the most common ideal-gas mistake. Because this calculator fixes P in Pa, V in m³, n in mol, and T in K, it always uses 8.314 and never mixes systems.

Standard conditions (STP and NTP)

Tabulated gas volumes depend on the reference state. IUPAC STP is 0 °C (273.15 K) and 100 kPa, giving a molar volume of 22.71 L/mol; the older STP of 0 °C and 1 atm (101.325 kPa) gives 22.41 L/mol. NTP is often 20 or 25 °C and 1 atm. Always state the reference before quoting a standard volumetric flow (Nm³/h or SCFM), because the conversion to actual conditions runs straight through PV = nRT.

Density, molar volume, and real-gas behavior

Density follows from the molar mass M: ρ = P·M/(R·T), and molar volume is simply Vₘ = V/n = RT/P. Real gases deviate from ideal behavior near their critical point and at high pressure, where intermolecular forces and finite molecular volume matter. The deviation is captured by the compressibility factor Z in PV = ZnRT; Z = 1 for an ideal gas, drops below 1 under moderate compression, and can exceed 1 at very high pressure. For Z far from 1, switch to a real-gas equation of state such as van der Waals, Redlich-Kwong, or Peng-Robinson.

Frequently asked questions

Which units does this calculator expect?

Strictly SI: pressure in pascals (absolute, not gauge), volume in cubic metres, amount in moles, and temperature in kelvin. With those units the gas constant is exactly 8.314 J/(mol·K). Convert gauge pressure to absolute by adding atmospheric pressure, and convert °C to K by adding 273.15 before entering values.

Why must temperature be in kelvin?

PV = nRT is built on absolute temperature, which starts at absolute zero. Using °C or °F would make the ratio T₂/T₁ meaningless and can even give negative temperatures, breaking the physics. Always convert to kelvin (K = °C + 273.15) before applying any gas law.

What is the difference between STP and NTP?

STP (standard temperature and pressure) is a defined reference — most commonly 0 °C with either 100 kPa (IUPAC, Vₘ = 22.71 L/mol) or 1 atm (older, Vₘ = 22.41 L/mol). NTP (normal temperature and pressure) typically uses 20 or 25 °C at 1 atm. They matter because "standard" volumetric flows are reported at one of these references and must be corrected to actual operating conditions.

When does the ideal gas law fail?

It loses accuracy at high pressure and at temperatures near or below the gas's critical point, where molecules are close enough that attractive forces and their finite size become significant. As a rule of thumb, ideal behavior is good at low pressure and high temperature (well above critical). When the compressibility factor Z departs noticeably from 1, use a real-gas equation of state.

How do I get gas density from the ideal gas law?

Combine n = mass/M with PV = nRT to get ρ = mass/V = P·M/(R·T), where M is the molar mass. Heavier gases and higher pressures raise density, while higher temperatures lower it. This calculator computes ρ automatically once you enter the molar mass (default 28.97 g/mol for air).

Related tools & guides

Antoine Vapor Pressure CalculatorMass Balance CalculatorReaction Conversion & Reactor SizingProcess Unit ConverterDistillation & Separation ProcessesFluid Mechanics for Chemical EngineersChemical Exam Prep