Ideal Gas Law Calculator — PV=nRT Solver

The ideal gas law PV = nRTrelates the pressure, volume, moles, and temperature of a gas using the universal gas constant R = 0.08206 L·atm/(mol·K). Enter any three known values and this calculator instantly solves for the fourth variable — with support for both Kelvin and Celsius input.

PV = nRT

R = 0.08206 L·atm/(mol·K)

Leave one field blank to solve for it.

atm
L
mol
K

Frequently Asked Questions

What is the ideal gas law?

The ideal gas law is PV = nRT, where P is pressure (atm), V is volume (L), n is the amount of gas (moles), R is the universal gas constant (0.08206 L·atm/mol·K), and T is absolute temperature (Kelvin). It describes the state of a hypothetical ideal gas and closely approximates the behavior of real gases at low pressure and high temperature.

How do I solve for pressure using PV=nRT?

Rearrange the formula to P = nRT / V. For example, 2 moles of gas in a 10 L container at 300 K gives P = (2 × 0.08206 × 300) / 10 = 4.92 atm. In this calculator, enter the volume, moles, and temperature values and leave the pressure field blank.

How do I solve for volume using the ideal gas law?

Rearrange to V = nRT / P. For example, 1 mole at 273.15 K and 1 atm gives V = (1 × 0.08206 × 273.15) / 1 ≈ 22.4 L — the molar volume of an ideal gas at STP.

What temperature units does this calculator use?

The ideal gas law requires absolute temperature in Kelvin. This calculator accepts input in either Kelvin or Celsius — use the toggle under the temperature field. Celsius is converted to Kelvin internally using T(K) = T(°C) + 273.15.

What is the value of the gas constant R?

R = 0.08206 L·atm/(mol·K) when using liters and atmospheres — the most common choice in chemistry. In SI units, R = 8.314 J/(mol·K). Other values include 62.36 L·mmHg/(mol·K) and 1.987 cal/(mol·K). This calculator uses R = 0.08206.

What is STP and what is the molar volume at STP?

STP (Standard Temperature and Pressure) is defined as 0 °C (273.15 K) and 1 atm. At STP, 1 mole of an ideal gas occupies exactly 22.414 liters. This is called the molar volume and is a useful reference for gas calculations.

When does the ideal gas law break down?

The ideal gas law is an approximation that fails at high pressure (above ~10 atm) and low temperature (near the boiling/condensation point). Under these conditions, intermolecular forces and the finite volume of gas molecules become significant. Real gases are better described by the van der Waals equation.

How do I convert between pressure units for this calculator?

This calculator uses atmospheres (atm). To convert: 1 atm = 101,325 Pa = 101.325 kPa = 760 mmHg (torr) = 14.696 psi = 1.01325 bar. Divide your pressure by the appropriate factor to get atm before entering it.

PV = nRT Formula

The ideal gas law combines Boyle's Law, Charles's Law, and Avogadro's Law into a single equation relating the four state variables of a gas:

PV = nRT

P — Pressure

Measured in atmospheres (atm). 1 atm = 101,325 Pa = 760 mmHg.

V — Volume

Measured in liters (L). 1 L = 0.001 m³ = 1000 mL.

n — Moles

Amount of gas in moles. 1 mol = 6.022 × 10²³ molecules (Avogadro's number).

T — Temperature

Must be in Kelvin (K). T(K) = T(°C) + 273.15. Absolute zero is 0 K.

Solved for each variable:

P = nRT / V

V = nRT / P

n = PV / RT

T = PV / nR

Gas Constant R Values

The universal gas constant R has the same value regardless of the gas, but its numerical value depends on the units you choose:

ValueUnitsCommon Use
0.08206L·atm/(mol·K)Chemistry (this calculator)
8.314J/(mol·K)SI / Physics
1.987cal/(mol·K)Thermochemistry
62.36L·mmHg/(mol·K)Pressure in mmHg / torr
83.14mL·bar/(mol·K)Pressure in bar

STP and SATP Conditions

Standard conditions are reference states used to compare gas properties:

STP — Standard Temperature and Pressure (IUPAC 1982)

T = 0 °C (273.15 K), P = 1 atm. Molar volume = 22.414 L/mol.

SATP — Standard Ambient Temperature and Pressure (IUPAC 1982)

T = 25 °C (298.15 K), P = 1 bar (0.9869 atm). Molar volume ≈ 24.789 L/mol.

NTP — Normal Temperature and Pressure

T = 20 °C (293.15 K), P = 1 atm. Molar volume ≈ 24.04 L/mol. Common in HVAC and engineering.

Real vs. Ideal Gases

The ideal gas law assumes that gas molecules have no volume and exert no intermolecular forces on each other. Real gases deviate from this behavior, especially at:

  • High pressure — molecules are forced close together, so their own volume becomes significant.
  • Low temperature — intermolecular attractive forces become dominant, causing condensation.
  • Polar molecules (e.g., H₂O, NH₃) — strong dipole–dipole or hydrogen-bonding forces cause significant deviation even at moderate conditions.

For real-gas corrections, the van der Waals equation adds two correction terms:

(P + a·n²/V²)(V − nb) = nRT

where a corrects for intermolecular attractions and b corrects for molecular volume.

How to Use This Calculator

  1. Enter any 3 known values — fill in pressure, volume, moles, and/or temperature.
  2. Leave one field blank — the blank field is automatically solved.
  3. Toggle temperature units — switch between Kelvin (K) and Celsius (°C) using the buttons under the temperature field. The calculator converts to Kelvin internally.
  4. Read and copy results — the result card shows all 4 variables. Click Copy to copy all values to your clipboard.

Related Tools