Ideal Gas Law Calculator (PV = nRT)

Solve for pressure, volume, moles, or temperature using PV = nRT. Includes Combined Gas Law, Boyle's, Charles's, and Gay-Lussac's Law with full unit conversions.

Presets:

Solve for:

Pressure (P)

Volume (V)

Moles (n)

mol

Temperature (T)

Gas Constant R = 8.314 J/(mol·K) (all calculations use SI: Pa, m³, mol, K)

Combined Gas Law: P₁V₁/T₁ = P₂V₂/T₂ — enter any 5 of the 6 values and the calculator will solve for the missing one.

Pressure P₁

Volume V₁

Temperature T₁

Pressure P₂

Volume V₂

Temperature T₂

Select law:

P₁

V₁

T₁

P₂ (or blank)

V₂ (or blank)

T₂ (or blank)

The Ideal Gas Law Explained

The ideal gas law PV = nRT is one of the most fundamental equations in chemistry and physics. It combines three earlier empirical laws — Boyle's, Charles's, and Avogadro's — into a single equation relating the four state variables of a gas.

An "ideal" gas is a theoretical model where molecules have no volume and exert no intermolecular forces. Real gases approximate this behaviour well at low pressures and high temperatures.

P
Pressure (Pa, atm, kPa…)
V
Volume (m³, L…)
n
Amount of gas (mol)
T
Absolute temperature (K)

Choosing the Right Value of R

The gas constant R has different numerical values depending on the unit system you use. Always ensure your units are consistent. This calculator converts everything to SI internally and uses R = 8.314 J/(mol·K).

R value Units When to use
8.314 J/(mol·K) = Pa·m³/(mol·K) SI units (default)
0.08206 L·atm/(mol·K) Volume in litres, pressure in atm
8.314 L·kPa/(mol·K) ÷ 1000 Volume in m³, pressure in kPa
62.364 L·mmHg/(mol·K) Medical or atmospheric sciences

Boyle's Law, Charles's Law & Gay-Lussac's Law

Boyle's Law (1662)

P₁V₁ = P₂V₂

At constant temperature, pressure × volume = constant. Doubling pressure halves volume.

Charles's Law (1787)

V₁/T₁ = V₂/T₂

At constant pressure, volume is proportional to absolute temperature. Hot gas expands.

Gay-Lussac's Law (1808)

P₁/T₁ = P₂/T₂

At constant volume, pressure is proportional to absolute temperature. Hot gas pressurises.

The Combined Gas Law

The combined gas law merges Boyle's and Charles's laws: P₁V₁/T₁ = P₂V₂/T₂. It is useful when a fixed amount of gas (same n) moves from one state (P₁, V₁, T₁) to another (P₂, V₂, T₂). This is commonly used to describe gas syringes, balloons at different altitudes, and scuba cylinders at depth.

Example: A gas at 1 atm, 2 L, 300 K is heated to 600 K at constant pressure. What is V₂?
V₂ = V₁ × T₂ / T₁ = 2 × 600 / 300 = 4 L

Worked Examples

Example 1 — 1 mol at STP (V = ?)

Given: P = 1 atm = 101325 Pa, n = 1 mol, T = 273.15 K
V = nRT/P = 1 × 8.314 × 273.15 / 101325
V = 0.02241 m³ = 22.41 L

Example 2 — Scuba tank (n = ?)

Given: P = 200 bar = 20,000,000 Pa, V = 12 L = 0.012 m³, T = 20°C = 293.15 K
n = PV/(RT) = (20000000 × 0.012) / (8.314 × 293.15)
n ≈ 98.4 mol

Example 3 — Helium balloon (V = ?)

Given: n = 0.05 mol, T = 25°C = 298.15 K, P = 1 atm = 101325 Pa
V = nRT/P = 0.05 × 8.314 × 298.15 / 101325
V ≈ 1.223 L

Example 4 — Find moles from mass (CO₂, n = ?)

Given: mass = 44 g, molar mass of CO₂ = 44.01 g/mol
n = m / M = 44 / 44.01 ≈ 0.9998 mol
Then use PV = nRT to find P, V, or T.

When the Ideal Gas Law Breaks Down

Real gases deviate from ideal behaviour under conditions where intermolecular forces or molecular volume become significant:

⚠️

High Pressure

Molecules are forced close together; repulsive forces and finite molecular volume matter. Real volume is larger than predicted.

❄️

Low Temperature

Attractive forces pull molecules together; gas may condense to liquid. Pressure is lower than ideal predictions.

🧪

Polar Molecules

Water vapour (H₂O), ammonia (NH₃), and HCl have strong dipole–dipole interactions that cause significant deviations.

Best Approximation

Noble gases (He, Ar) and H₂, N₂, O₂ at room temperature and moderate pressures (≤ 10 atm) follow the ideal gas law well.

Frequently Asked Questions

The ideal gas law is PV = nRT, where P is pressure, V is volume, n is the number of moles of gas, R is the universal gas constant (8.314 J/mol·K), and T is absolute temperature in Kelvin. It describes the behaviour of an ideal gas under various conditions of pressure, volume, and temperature.
The ideal gas law breaks down at very high pressures (molecules are too close together and repulsive forces matter), very low temperatures (near the gas's condensation point), or for polar/heavy molecules (strong intermolecular forces). In these cases, the van der Waals equation or other real-gas models give more accurate results.
STP (Standard Temperature and Pressure) is defined by IUPAC as 0°C (273.15 K) and 100 kPa. At STP, 1 mole of ideal gas occupies 22.71 L. NTP (Normal Temperature and Pressure) is sometimes used as 20°C and 1 atm; 1 mole of ideal gas occupies 24.04 L at NTP.
The value of R depends on the units you are using. Common values: 8.314 J/(mol·K) = 8.314 Pa·m³/(mol·K); 0.082057 L·atm/(mol·K); 62.364 L·mmHg/(mol·K). This calculator automatically converts all inputs to SI units and uses R = 8.314 J/(mol·K) internally.
Add 273.15 to the Celsius temperature: K = °C + 273.15. For example, 25°C = 298.15 K, 0°C = 273.15 K, and −273.15°C = 0 K (absolute zero). The ideal gas law always requires temperature in Kelvin.
Boyle's Law states that at constant temperature, the pressure and volume of a gas are inversely proportional: P₁V₁ = P₂V₂. If you double the pressure, the volume halves. It was discovered by Robert Boyle in 1662 and is a special case of the ideal gas law when n and T are held constant.
Divide the mass in grams by the molar mass in g/mol: n = m / M. For example, 44 g of CO₂ (molar mass = 44.01 g/mol) contains 44 / 44.01 ≈ 1 mol. Use the mass mode toggle in this calculator to enter mass and molar mass directly.
At STP (0°C, 100 kPa per IUPAC 1982 definition), 1 mole of an ideal gas occupies 22.71 L. At the older STP definition (0°C, 1 atm = 101.325 kPa), the molar volume is 22.41 L. At room conditions (25°C, 1 atm), the molar volume is approximately 24.47 L.