Ideal Gas Law Calculator

Updated July 2026

Solve the ideal gas law PV = nRT. Enter any three of pressure, volume, amount of substance and temperature — leave the one you want blank — and the tool solves for it. Mix units freely; everything runs privately in your browser.

PV = nRT. P is pressure, V is volume, n is the amount of substance in moles, T is the absolute temperature in kelvin, and R is the universal gas constant. Knowing any three quantities lets you find the fourth. This calculator uses R = 8.314462618 J/(mol·K) in SI units (Pa, m³, mol, K).

Fill in exactly three fields and leave one blank — the calculator solves for the empty one.

Temperature is converted to kelvin internally and must be above absolute zero (0 K). Pressure, volume and amount must be positive.
Result
Pressure (P)
Volume (V)
Amount (n)
Temperature (T)

How to use the ideal gas law

The ideal gas law, PV = nRT, is the equation of state for an idealized gas. It ties together four properties of a gas sample: the pressure P, the volume V, the amount of substance n (in moles), and the absolute temperature T (in kelvin). The proportionality constant R is the universal gas constant. Because the four quantities are linked by one equation, knowing any three of them lets you rearrange the formula to find the fourth.

To solve for a single quantity, rearrange the equation: P = nRT / V, V = nRT / P, n = PV / (RT), and T = PV / (nR). This calculator detects which field you leave blank and applies the matching form automatically.

Units do not have to match the SI base units. The tool converts every input to pascals, cubic metres, moles and kelvin, computes the answer with R = 8.314462618 J/(mol·K), then converts the result back into the unit you selected. Temperatures in °C or °F are converted to kelvin, and the calculator rejects any temperature at or below absolute zero (0 K) as well as negative pressures, volumes or amounts.

Worked example: for n = 1 mol at T = 273.15 K (0 °C) and P = 1 atm (101325 Pa), the volume is V = nRT / P = (1 × 8.314462618 × 273.15) / 101325 ≈ 0.02241 m³, which is about 22.4 L — the familiar molar volume of an ideal gas at STP.

Common units and SI conversions

QuantityUnitSI conversion
Pressure (P)atm1 atm = 101325 Pa
Pressure (P)bar1 bar = 100000 Pa
Pressure (P)mmHg1 mmHg = 133.322387415 Pa
Volume (V)L1 L = 0.001 m³
Volume (V)mL1 mL = 0.000001 m³
Temperature (T)°CT(K) = °C + 273.15
Temperature (T)°FT(K) = (°F − 32) × 5/9 + 273.15

Reference note: this is a neutral chemistry and physics math tool. The ideal gas law assumes point-like, non-interacting particles, so real gases deviate at high pressure and low temperature; for those conditions use a real-gas model such as the van der Waals equation. Always follow your own institution's safety and lab procedures.

Frequently asked questions

What is the ideal gas law?
The ideal gas law is the equation of state PV = nRT, linking pressure (P), volume (V), amount of substance (n) and absolute temperature (T) of an idealized gas, where R is the universal gas constant. It combines Boyle's, Charles's and Avogadro's laws, so knowing any three quantities lets you solve for the fourth.
What is R (the gas constant)?
R is the universal (molar) gas constant. In SI units it is 8.314462618 J/(mol·K), which this calculator uses after converting inputs to pascals, cubic metres, moles and kelvin. The same value can be written as 0.082057 L·atm/(mol·K) when volume is in liters and pressure in atmospheres.
What units should I use?
You can mix units freely. Pressure may be Pa, kPa, atm, bar or mmHg; volume L, mL or m³; amount mol; and temperature K, °C or °F. The tool converts everything to SI, computes with R = 8.314462618 J/(mol·K), then shows the answer in your chosen unit.
Why must temperature be in Kelvin?
PV = nRT is a proportionality with absolute temperature, so T must be measured from absolute zero on the Kelvin scale. Celsius and Fahrenheit have arbitrary, possibly negative zero points that would break the formula. This tool converts °C and °F to kelvin and rejects temperatures at or below 0 K.
What is molar volume at STP?
Molar volume is the volume of one mole of an ideal gas. At 0 °C (273.15 K) and 1 atm, one mole occupies about 22.414 L; using IUPAC STP of 0 °C and 100 kPa it is about 22.711 L. Set n = 1 with the matching P and T to reproduce either value.
When does the ideal gas law break down?
It assumes particles have no volume and no mutual forces, so real gases deviate at high pressure (particle volume matters) and at low temperature near condensation (attractions matter). For those conditions a real-gas equation such as van der Waals is more accurate.
⚡ Ideal Gas Law Calculator — by larely ↗

Related tools

Weighted Average Calculator

Calculate a weighted average from value and weight pairs.

Probability Calculator

Calculate single-event probability and combined odds for two events.

Linear Interpolation Calculator

Interpolate a value between two known points, or solve the inverse.

Wavelength Calculator

Convert between wavelength, frequency and wave speed .

Force Calculator

Solve Newton's second law F = ma for force, mass or acceleration.

Kinetic Energy Calculator

Solve KE = ½mv² for kinetic energy, mass or velocity.

Rounding Calculator

Round a number to decimals, a nearest multiple, or by mode .

Arithmetic Sequence Calculator

Find the nth term and sum of an arithmetic sequence from a1 and the common difference.

Geometric Sequence Calculator

Find the nth term, sum and infinite sum of a geometric sequence.

Pythagorean Theorem Calculator

Solve a² + b² = c² for any missing side of a right triangle, plus angles and area.

Distance Formula Calculator

Find the distance between two points, plus the midpoint and slope.

Final Grade Calculator

Find the grade you need on the final, plus weighted-grade and GPA calculators.

Browse all 251 free tools →