What the Ideal Gas Law Calculator Does
This calculator solves the ideal gas law, \(PV = nRT\), for any one of its four variables. You tell it which quantity to find — pressure (P), volume (V), number of moles (n), or temperature (T) — then enter the other three known values. It rearranges the equation and returns the missing fourth value instantly. The tool uses consistent chemistry units throughout, so your answer is reliable as long as your inputs match the expected units.
The Inputs and Their Units
The calculator uses the gas constant \(R = 0.08206 \ \text{L}\cdot\text{atm}/(\text{mol}\cdot\text{K})\), which fixes the required units for every field:
- Calculate: choose the unknown — Pressure, Volume, Moles, or Temperature.
- Pressure (P) — in atmospheres (atm).
- Volume (V) — in litres (L).
- Number of Moles (n) — in moles (mol).
- Temperature (T) — in kelvin (K), never Celsius.
Leave the field you selected as the unknown blank (or it is ignored) and supply the other three.
The Formula and How It Rearranges
Starting from \(PV = nRT\), the calculator applies one of four rearrangements depending on what you solve for:
- Pressure: $$\text{P} = \frac{\text{n} \cdot R \cdot \text{T}}{\text{V}}$$
- Volume: $$\text{V} = \frac{\text{n} \cdot R \cdot \text{T}}{\text{P}}$$
- Moles: $$\text{n} = \frac{\text{P} \cdot \text{V}}{R \cdot \text{T}}$$
- Temperature: $$\text{T} = \frac{\text{P} \cdot \text{V}}{\text{n} \cdot R}$$
Worked Example
Suppose you have 2 mol of gas at 300 K occupying 10 L, and you want the pressure. The calculator computes:
$$P = \frac{\text{n} \times R \times \text{T}}{\text{V}} = \frac{2 \times 0.08206 \times 300}{10} = \frac{49.236}{10} = \textbf{4.92 atm}.$$If instead you knew the pressure was 4.92 atm and wanted the temperature, it would return \(T = \frac{4.92 \times 10}{2 \times 0.08206} \approx 300 \ \text{K}\), confirming the relationship is self-consistent.
Frequently Asked Questions
Why must temperature be in kelvin? The gas law is built on absolute temperature. Using Celsius would give wrong (even negative) results. Convert with \(K = {}^\circ C + 273.15\) before entering.
Can I use different pressure units like Pa or mmHg? Not directly. This version uses \(R = 0.08206 \ \text{L}\cdot\text{atm}/(\text{mol}\cdot\text{K})\), so pressure must be in atm and volume in litres. Convert your values first (\(1 \ \text{atm} = 760 \ \text{mmHg} = 101{,}325 \ \text{Pa}\)).
Is the ideal gas law always accurate? It works well for most gases at moderate temperatures and low pressures. Real gases deviate at very high pressure or very low temperature, where intermolecular forces and molecular volume matter.