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.
Unit Conversions for Pressure, Volume and Temperature
The calculator works in atm, L, mol and K. Convert other units first, or use a gas constant that matches your units.
| Quantity | Conversion |
|---|---|
| Pressure | 1 atm = 101,325 Pa = 101.325 kPa = 760 mmHg (Torr) = 1.01325 bar = 14.696 psi |
| Volume | 1 m³ = 1000 L |
| Volume | 1 mL = 0.001 L |
| Volume | 1 ft³ = 28.3168 L |
| Temperature (Celsius) | K = °C + 273.15 |
| Temperature (Fahrenheit) | K = (°F − 32) × 5/9 + 273.15 |
Example: 25 °C = 25 + 273.15 = 298.15 K. The same temperature in Fahrenheit is 77 °F, and (77 − 32) × 5/9 + 273.15 = 298.15 K. Always use absolute temperature (kelvin) in PV = nRT, never °C or °F.
Gas Constant Values in Different Units
The universal gas constant R has the same physical meaning in every unit system, but its numerical value depends on the units of pressure, volume and energy. The unit of R must match the pressure and volume units you use.
| Value of R | Units |
|---|---|
| 0.082057 | L·atm/(mol·K) |
| 8.314462 | J/(mol·K) (= m³·Pa/(mol·K)) |
| 8.314 | L·kPa/(mol·K) |
| 62.364 | L·Torr/(mol·K) |
| 1.987 | cal/(mol·K) |
Standard conditions
- STP (IUPAC's older definition and common textbook convention): 273.15 K and 1 atm, molar volume of an ideal gas 22.414 L/mol.
- 0 °C and 1 bar (the current IUPAC standard pressure is 1 bar): molar volume 22.711 L/mol.
Definitions of "standard conditions" differ between organizations and fields, so check which one your source uses.
Scenario Comparison: How Changing One Variable Affects the Others
All rows use 1 mol of ideal gas and R = 0.08206 L·atm/(mol·K).
| Temperature (K) | Volume (L) | Pressure (atm) | Calculation |
|---|---|---|---|
| 273.15 | 22.41 | 1.00 | \(P = \frac{1 \times 0.08206 \times 273.15}{22.41} \approx 1.00\) |
| 298.15 | 22.41 | ≈ 1.09 | \(P = \frac{1 \times 0.08206 \times 298.15}{22.41} \approx 1.09\) |
| 273.15 | 11.2 | ≈ 2.00 | \(P = \frac{1 \times 0.08206 \times 273.15}{11.2} \approx 2.00\) |
| 546.3 | ≈ 44.8 | 1.00 (given) | \(V = \frac{1 \times 0.08206 \times 546.3}{1} \approx 44.8\) |
Proportionalities at constant amount of gas (n)
- Pressure and volume are inversely proportional at constant T (Boyle's law): halving the volume doubles the pressure.
- Pressure and temperature are directly proportional at constant V (Gay-Lussac's law).
- Volume and temperature are directly proportional at constant P (Charles's law): doubling the kelvin temperature doubles the volume.
At constant T and P, volume is also directly proportional to the number of moles (Avogadro's law). Remember that these relationships hold for absolute temperature in kelvin.
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.