Ideal Gas Law Calculator: PV = nRT
Fill in any three variables and instantly solve for the fourth. Covers Pressure, Volume, Moles, and Temperature across all major unit systems.
| R Value | Units | When to Use |
|---|---|---|
| 0.08206 | L·atm / (mol·K) | Standard chemistry - used by this calculator |
| 8.314 | J / (mol·K) | SI standard, thermodynamics, energy and entropy calculations |
| 8.314 | L·kPa / (mol·K) | Pressure given in kilopascals |
| 0.08314 | L·bar / (mol·K) | Pressure in bar (near-SI practical unit) |
| 62.36 | L·mmHg / (mol·K) | Biological and medical gas calculations |
| 1.987 | cal / (mol·K) | Older thermochemistry literature using calories |
| 8.314 | m³·Pa / (mol·K) | Full SI units (pressure in Pa, volume in m³) |
| 10.73 | psia·ft³ / (lb-mol·°R) | US customary engineering units |
All values represent the same physical constant. The numerical difference comes entirely from unit scaling - not from any real change in the underlying physics.
The Complete Guide to the Ideal Gas Law
The Ideal Gas Law - PV = nRT - is the single most useful equation in introductory chemistry and thermodynamics. It unifies four historically separate gas laws (Boyle's, Charles's, Gay-Lussac's, and Avogadro's) into one compact formula. Whether you are sizing a gas cylinder, calculating pressures in an engine cylinder, or working through a stoichiometry problem, this equation is the starting point.
How to Use This Calculator
Type values into any three of the four input fields: Pressure (P), Volume (V), Amount in Moles (n), and Temperature (T). The calculator detects exactly which three are filled and instantly computes the missing fourth variable. The solved field is highlighted with a dashed border and a "SOLVED" badge, and its input is locked so you can see it clearly.
To solve for a different variable, simply clear whichever field you want to find and the calculator re-solves for that one. You can mix unit systems freely - enter Pressure in kPa, Volume in mL, and Temperature in Celsius and the calculator handles all conversions internally before applying the formula.
The Derivation: Four Laws Become One
Before the Ideal Gas Law was unified in 1834 by Emile Clapeyron, scientists had discovered four separate relationships experimentally. Boyle's Law (1662) showed P and V inversely proportional at constant T and n. Charles's Law (1787) showed V and T directly proportional at constant P and n. Gay-Lussac's Law (1808) showed P and T directly proportional at constant V and n. Avogadro's Law (1811) showed V and n directly proportional at constant T and P. Combining these four yields PV = nRT - each individual law is just a special case where two of the four variables happen to be held constant.
Choosing the Right R Value
The gas constant R appears to have different values in different textbooks because its numerical value depends on which units you use for pressure and volume. Internally, this calculator uses R = 0.08206 L atm/(mol K) and converts all inputs to atmospheres and liters. The reference table above shows the same constant in other common unit systems so you can use the value that matches your problem's given units directly.
When Ideal Gas Assumptions Break Down
The law works best for low-density gases well above their boiling points. It becomes inaccurate above roughly 10 atm for most gases, where molecular volume can no longer be ignored, and at temperatures near a gas's condensation point, where intermolecular attractions become significant. For those conditions, the van der Waals equation adds two correction terms: (P + a/V²)(V - b) = nRT, where a accounts for intermolecular attraction and b for molecular volume. Many combustion and industrial process calculations use more advanced equations of state such as Peng-Robinson or Redlich-Kwong.
Frequently Asked Questions
An ideal gas is a theoretical model where gas molecules have no volume of their own and exert no intermolecular forces on each other. In reality, all gas molecules take up space and attract or repel neighboring molecules. Real gases deviate most noticeably at very high pressures (molecules forced close together, so their volume matters) and very low temperatures (thermal energy low enough that attractive forces become significant). Under typical lab conditions - moderate temperatures and low to moderate pressures - most common gases behave very close to ideal, making the Ideal Gas Law accurate enough for most chemistry and engineering work.
The Ideal Gas Law is a proportional relationship: at constant n and V, pressure is directly proportional to temperature. This proportionality only holds when temperature is measured on an absolute scale starting at absolute zero, which is what Kelvin provides. Zero Kelvin (0 K) is the point where a gas would theoretically have zero molecular kinetic energy and zero pressure. Celsius and Fahrenheit are offset scales - 0 degrees Celsius is not zero energy, it is just the freezing point of water. Plugging Celsius values directly into PV = nRT produces nonsensical results, including division by zero or negative pressures, which are physically impossible for a gas.
Boyle's Law states that at constant temperature and a fixed amount of gas, pressure and volume are inversely proportional: P1 times V1 = P2 times V2. This is a special case of the Ideal Gas Law with n and T held constant. In PV = nRT, if n and T are fixed, the right side (nRT) is a constant, which means P times V must always equal that constant - exactly what Boyle's Law says. The Ideal Gas Law is the master equation; Boyle's Law, Charles's Law, Gay-Lussac's Law, and Avogadro's Law are all derived from it by holding two of the four variables constant.
R is a physical constant that links the energy scale to temperature. Its true value is always the same - 8.314 J/(mol K) in SI units. The reason R appears to have different numerical values in different tables (0.08206 in L atm, 62.36 in L mmHg) is purely a unit conversion artifact. Pressure and volume can both be expressed in multiple unit systems, and R must be scaled to match whatever units you choose so that the equation stays dimensionally balanced. This calculator uses R = 0.08206 L atm/(mol K) internally and converts all inputs to atm and liters before calculating, then converts the result back to your chosen units.
If pressure is doubled while temperature and the amount of gas stay constant, the volume is cut in half. This is Boyle's Law: P and V are inversely proportional at constant T and n. From PV = nRT, if P doubles and nRT is unchanged, V must halve to keep the product P times V constant. You can verify this directly in the calculator: fill in a pressure, volume, and temperature to get n, then double the pressure entry and watch the volume drop to half its original value.