Home » Science » Ideal Gas Law Calculator

Ideal Gas Law Calculator

Free ideal gas law calculator. Solve PV = nRT for pressure, volume, moles, or temperature, with the gas constant, unit notes, and worked examples.

FREE CALCULATOR
min 0, max 100000
min 0, max 1000000
min 0, max 100000
min 0, max 6000
🧮

Your results will appear here.
Enter your values and press Calculate.

How it works

The ideal gas law PV = nRT links the four state variables of a gas: pressure times volume equals moles times the gas constant times absolute temperature. Pick which variable to solve for and the calculator applies the matching rearrangement: P = nRT / V, V = nRT / P, n = PV / RT, or T = PV / nR, using R = 0.082057 L.atm/(mol.K) with pressure in atmospheres, volume in liters, and temperature in kelvin. The result set always shows the full state (P, V, n, T) plus the molar volume V/n, which is about 22.4 L/mol at standard conditions. Results are for study and planning; at very high pressures or very low temperatures real gases deviate from this ideal model.

P = nRT / V, V = nRT / P, n = PV / RT, T = PV / nR with R = 0.082057 L.atm/(mol.K) and T(K) = T(C) + 273.15

The ideal gas law formula, explained

PV = nRT packs four ideas into one equation. P is the pressure the gas exerts on its container walls, V is the volume it occupies, n is the amount of gas in moles, T is the absolute temperature in kelvin, and R is the universal gas constant that makes the units work out.

The law is really four rearrangements of the same relationship. Solve for pressure with P = nRT / V, for volume with V = nRT / P, for moles with n = PV / RT, or for temperature with T = PV / nR. Every version says the same thing: raise the temperature or the amount of gas and either the pressure or the volume must rise to keep the equation balanced.

How to use this ideal gas law calculator

Choose the variable you want to solve for: pressure, volume, moles, or temperature. Enter the other three values: pressure in atmospheres (atm), volume in liters (L), moles in mol, and temperature in kelvin (K). The value in the solved field is ignored and recomputed.

The results show the full gas state (all four of P, V, n, T) so you can see the complete picture, plus the molar volume V/n, which doubles as a sanity check: at standard temperature and pressure it should come out near 22.4 L/mol.

R values and units: getting the units right

The gas constant R is not one number: it is the same physics wearing different unit costumes. With pressure in atm and volume in liters, use R = 0.082057 L.atm/(mol.K). In SI units (pascals and cubic meters), R = 8.314 J/(mol.K). For pressure in torr (mmHg), R = 62.364 L.Torr/(mol.K). Pick the R that matches your units, and the answer stays correct.

For quick reference, the gas constant R value table for the three common unit sets is: 0.082057 L.atm/(mol.K) for atm and liters, 8.314 J/(mol.K) for pascals and cubic meters, and 62.364 L.Torr/(mol.K) for torr.

Key conversions: 1 atm = 101,325 Pa = 760 mmHg = 14.696 psi; 1 m3 = 1,000 L; 1 mL = 0.001 L; and K = C + 273.15. Mismatched units are the single most common error in gas law problems, so converting first is always worth the 30 seconds.

STP and molar volume: the 22.4 liter benchmark

Molar volume is the space one mole of an ideal gas occupies at given conditions. At the classic standard temperature and pressure (0 C, 1 atm), it is 22.414 L/mol, which is why the statement 'one mole occupies 22.4 liters at STP' is so famous.

Note the fine print: under the current IUPAC definition (0 C, 1 bar) it is 22.71 L/mol, and at room temperature (25 C, 1 atm) it is about 24.47 L/mol. Many UK exams use 24.0 dm3/mol at room temperature and pressure. After any calculation, compare your molar volume against the right benchmark for your conditions: if it is wildly off, a unit slipped somewhere.

When the ideal gas law breaks down

The ideal gas law assumes gas particles are point masses with no size and no attractions between them. That is a fine approximation for everyday conditions, but it fails at very high pressures, where the particles' own volume becomes significant, and at very low temperatures, where attractions take over and the gas nears liquefaction.

In those regimes the van der Waals equation corrects the model: (P + a/Vm2)(Vm - b) = RT, where a accounts for intermolecular forces and b accounts for molecular volume. Noble gases like helium and neon behave most ideally because their intermolecular forces are tiny; gases like ammonia and carbon dioxide deviate the most.

Boyle's law and Charles' law: the pieces inside PV = nRT

The ideal gas law is a combination of older, simpler gas laws. Boyle's law says that at fixed temperature and fixed amount of gas, pressure and volume are inversely proportional: P1V1 = P2V2, so doubling the pressure halves the volume.

Charles' law says that at fixed pressure and fixed amount of gas, volume is directly proportional to absolute temperature: V1/T1 = V2/T2, so doubling the kelvin temperature doubles the volume. With moles fixed, the combined gas law P1V1/T1 = P2V2/T2 covers changes between two states. Practicing these building blocks makes PV = nRT feel less like a formula to memorize and more like common sense.

Worked example: pressure of 2 moles in 10 liters at 300 K

Find the pressure of 2 mol of gas at 300 K in a 10 L container. Use P = nRT / V with R = 0.082057 L.atm/(mol.K): P = 2 × 0.082057 × 300 / 10 = 49.2342 / 10 = 4.92 atm.

Sanity check via molar volume: 10 L / 2 mol = 5.0 L/mol, which is far below the 22.4 L/mol benchmark at STP, so a pressure well above 1 atm is exactly what physics predicts. To practice more problems, change one input at a time and watch how the solved variable responds: that is the fastest way to build intuition for the law.

Frequently asked questions

The equation PV = nRT, where P is pressure, V is volume, n is the amount of gas in moles, R is the universal gas constant, and T is the absolute temperature in kelvin. It describes how the four state variables of an ideal gas relate to each other.

Predicting gas behavior when any three of P, V, n, T are known: estimating cylinder contents, sizing tanks, modeling pneumatic systems, and countless chemistry and physics problems. It is the standard first model before real-gas corrections.

R is the universal gas constant. Its value depends on the units: 0.082057 L.atm/(mol.K) with atm and liters, 8.314 J/(mol.K) with pascals and cubic meters, or 62.364 L.Torr/(mol.K) with torr. Match R to your units.

With R = 0.082057, pressure must be in atm, volume in liters, and temperature in kelvin. With R = 8.314, pressure must be in pascals, volume in cubic meters, and temperature in kelvin. Remember 1 atm = 101,325 Pa and 1 m3 = 1,000 L.

The gas law is proportional to absolute temperature, and Celsius has an arbitrary zero. Using Celsius gives wrong or even negative results; at 0 C the right side would be zero. Convert with K = C + 273.15 before calculating.

It is a good approximation for most gases at everyday temperatures and moderate pressures. Real gases deviate at high pressures and low temperatures, where the van der Waals equation gives better results.

At very high pressures, where molecular volume matters, and at very low temperatures, where intermolecular attractions dominate and liquefaction approaches. In those regimes the measured pressure or volume differs from the ideal prediction.

22.414 L at 0 C and 1 atm (classic STP), 22.71 L under the IUPAC definition (0 C, 1 bar), and about 24.47 L at 25 C and 1 atm. UK exams often use 24.0 dm3/mol at room temperature and pressure.

For a fixed amount of gas at constant temperature, pressure and volume are inversely proportional: P1V1 = P2V2. Double the pressure and the volume halves.

For a fixed amount of gas at constant pressure, volume is directly proportional to absolute temperature: V1/T1 = V2/T2, with temperature in kelvin. Double the kelvin temperature and the volume doubles.

The volume occupied by one mole of an ideal gas at specified conditions: V/n. It is 22.414 L/mol at 0 C and 1 atm, and it is a quick sanity check for any gas law answer.

A correction to the ideal gas law for real gases: (P + a/Vm2)(Vm - b) = RT. The constant a corrects for intermolecular attractions and b corrects for the finite volume of molecules.

Rearrange to n = PV / RT. For example, 22.4 L of gas at 1 atm and 273.15 K gives n = 1 × 22.4 / (0.082057 × 273.15) = 0.9994 mol, essentially one mole.

This calculator uses R = 0.082057, so enter pressure in atm. To use pascals or mmHg, convert first: divide Pa by 101,325 or mmHg by 760 to get atm.

Related calculators