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.
Common units and SI conversions
| Quantity | Unit | SI conversion |
|---|---|---|
| Pressure (P) | atm | 1 atm = 101325 Pa |
| Pressure (P) | bar | 1 bar = 100000 Pa |
| Pressure (P) | mmHg | 1 mmHg = 133.322387415 Pa |
| Volume (V) | L | 1 L = 0.001 m³ |
| Volume (V) | mL | 1 mL = 0.000001 m³ |
| Temperature (T) | °C | T(K) = °C + 273.15 |
| Temperature (T) | °F | T(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.