Ideal Gas Law Calculator — Solve PV = nRT
Solve PV = nRT for pressure, volume, moles, or temperature. Auto-converts °C/°F to Kelvin and matches R to atm, kPa, or mmHg.
Solve for
Pressure unit
Temperature unit
= 273.15 K internally (PV = nRT always uses Kelvin)
Using R = 0.08206 L·atm/(mol·K), matched to your chosen pressure unit.
PV = nRT. Temperature is always converted to Kelvin internally before the calculation runs, no matter which unit you type it in — this avoids the most common student error with this formula (using Celsius or Fahrenheit directly). Assumes ideal gas behavior; real gases deviate at very high pressure or very low temperature.
Reference Values
Last verified:| Category | Range | What It Means | Status |
|---|---|---|---|
| Ideal gas law ★ | PV = nRT | Pressure × Volume = moles × gas constant × Temperature (Kelvin). Solve for any one variable given the other three. | ★ Best |
| R — atm + liters ★ | 0.08206 L·atm/(mol·K) | Use when pressure is in atmospheres and volume is in liters. The most common R value taught in intro chemistry. | ★ Best |
| R — kPa + liters (SI) ★ | 8.314 L·kPa/(mol·K) | SI-consistent value, numerically identical to 8.314 J/(mol·K). Use when pressure is in kilopascals. | ★ Best |
| R — mmHg + liters | 62.36 L·mmHg/(mol·K) | Use when pressure is in millimeters of mercury (torr), common in older lab manuals and vacuum/manometer readings. | Good |
| Kelvin conversion ★ | K = °C + 273.15 | Temperature MUST be converted to Kelvin before use in PV = nRT. Using Celsius or Fahrenheit directly produces a wrong answer — this is the single most common student error with this formula. | ★ Best |
| Fahrenheit to Kelvin | K = (°F − 32) × 5/9 + 273.15 | Convert Fahrenheit to Celsius first, then add 273.15. | Good |
| Pressure unit conversions | 1 atm = 101.325 kPa = 760 mmHg | Standard atmosphere expressed in each supported pressure unit — used to keep the R constant matched to the chosen pressure unit. | Good |
| Standard Temperature and Pressure (STP) | 0°C (273.15 K), 1 atm | IUPAC's older STP reference condition. One mole of an ideal gas occupies 22.4 L at STP — a common check value. | Good |
Source: IUPAC gas constant definition (CODATA R = 8.31446 J/(mol·K), rounded to 8.314 for classroom use) and standard general-chemistry textbook conventions (Atkins' Physical Chemistry; NIST). Pressure conversion factors from NIST Special Publication 811.
Worked Examples
Solve for Pressure — 1 Mole at STP (atm)
- Solve for
- Pressure (P)
- n
- 1 mol
- V
- 22.4 L
- T
- 0°C (273.15 K)
- Units
- atm, L
P = nRT/V = (1 × 0.08206 × 273.15) ÷ 22.4 = 1.001 atm — confirms the textbook rule that 1 mole of an ideal gas occupies about 22.4 L at standard temperature and pressure.
Solve for Volume — 2 Moles at Room Temperature (atm)
- Solve for
- Volume (V)
- n
- 2 mol
- P
- 1 atm
- T
- 25°C (298.15 K)
- Units
- atm, L
V = nRT/P = (2 × 0.08206 × 298.15) ÷ 1 = 48.93 L. Note 25°C was converted to 298.15 K before use — plugging in 25 directly would give a badly wrong volume.
Solve for Temperature — Gas Cylinder (kPa)
- Solve for
- Temperature (T)
- P
- 300 kPa
- V
- 8 L
- n
- 1 mol
- Units
- kPa, L
T = PV/(nR) = (300 × 8) ÷ (1 × 8.314) = 288.67 K. Converted back to Celsius for readability: 288.67 − 273.15 = 15.52°C.
Solve for Moles — Vacuum Manometer Reading (mmHg)
- Solve for
- Moles (n)
- P
- 760 mmHg
- V
- 5 L
- T
- 300 K (26.85°C)
- Units
- mmHg, L
n = PV/(RT) = (760 × 5) ÷ (62.36 × 300) = 3,800 ÷ 18,708 = 0.2031 mol, using the mmHg-matched R constant of 62.36 L·mmHg/(mol·K).
Why Kelvin Matters — Same Inputs, Fahrenheit Entry
- Solve for
- Pressure (P)
- n
- 0.5 mol
- V
- 12 L
- T
- 77°F (298.15 K)
- Units
- atm, L
Correct: T = 77°F → 25°C → 298.15 K, so P = (0.5 × 0.08206 × 298.15) ÷ 12 = 1.019 atm. If a student mistakenly plugs the Celsius number (25) straight into the formula as if it were Kelvin, P = (0.5 × 0.08206 × 25) ÷ 12 = 0.085 atm — off by a factor of about 12. This calculator always converts to Kelvin internally so this mistake can't happen.
How to Use This Calculator
- 1
Choose what you're solving for
Select Pressure, Volume, Moles, or Temperature — that field's input box disables since the calculator solves for it.
- 2
Set your pressure and temperature units
Pick atm, kPa, or mmHg for pressure (the calculator matches the correct R constant automatically) and °C, °F, or K for temperature.
- 3
Enter the other three values
Fill in whichever of P, V, n, and T you're not solving for. Values must be positive, and temperature must be above absolute zero.
- 4
Read the result
The answer updates instantly, shown in your chosen unit alongside a full P/V/n/T summary in the base units used for the calculation.
- 5
Check the Kelvin conversion note
Under the temperature field, the calculator shows the Kelvin-equivalent value it actually used — a quick way to confirm the conversion happened correctly.
What Each Value Means
- Pressure (P) (atm / kPa / mmHg)
- The force the gas exerts per unit area on its container walls. This calculator supports atmospheres (atm), kilopascals (kPa), and millimeters of mercury (mmHg), and automatically uses the R constant that matches your chosen unit.
- Volume (V) (liters (L))
- The space the gas occupies, always entered and returned in liters in this calculator to keep the math consistent with the standard R constant values.
- Moles (n) (mol)
- The amount of gas present, measured in moles — one mole is 6.022 × 10^23 particles (Avogadro's number).
- Temperature (T) (Kelvin (K))
- Absolute temperature measured from absolute zero. The ideal gas law only works correctly in Kelvin, so this calculator converts any °C or °F entry to Kelvin before running the calculation.
- Gas constant (R) (L·atm/(mol·K) or equivalent)
- A proportionality constant linking pressure, volume, moles, and temperature. Its numeric value changes with the pressure/volume units chosen (0.08206, 8.314, or 62.36) but represents the same underlying physical constant in every case.