Ideal Gas Law Calculator

Pressure P101.32 kPa
Pressure in atmospheres0.9999 atm
How this was calculated
  1. P = nRT ÷ V = 1 × 8.314 × 273.15 ÷ 22.414 = 101.32 kPa. One mole at 273.15 K in 22.414 L lands almost exactly on one atmosphere — the classic molar-volume benchmark this formula reproduces.
  2. Using R = 8.314 kPa·L/(mol·K), the version of the gas constant whose units match kilopascals and litres.

The CalcForge ideal gas law calculator solves the equation PV = nRT for any one of its four variables — pressure, volume, amount of substance, or absolute temperature — once you supply the other three. Here R = 8.314 J/(mol·K) = 8.314 kPa·L/(mol·K), so the calculator returns pressure in kPa, volume in liters, amount in moles, and temperature in kelvin. The results match known benchmarks: 1 mol at 273.15 K and 101.325 kPa occupies 22.413 L, the molar volume at STP, and 2 mol at 300 K in 49.19 L gives 101.41 kPa, about one atmosphere. It also handles less familiar cases, such as 200 kPa × 10 L with 1 mol implying a temperature of 240.56 K (−32.59 °C).

PV = nRT is the accepted standard because it unifies Boyle's and Charles's laws — each a special case with two variables held fixed — into one relation linking pressure, volume, amount, and absolute temperature for an ideal gas. It reproduces textbook values across a wide range of conditions, which is why it remains the default starting point for gas calculations. The law degrades for real gases at high pressure or near condensation, where the van der Waals equation takes over, but for most everyday and laboratory conditions the ideal form is reliable. This page shows the formula, step-by-step workings, worked examples, and sources so you can verify every result the calculator returns.

Worked examples

Two moles, warm room

Primary result: 101.32 kPa. (Pressure P · 2 mol · 300 K · 49.19 L · 101.325 kPa)

Pressure P101.41 kPa
Pressure in atmospheres1.0008 atm

The molar volume at STP

Primary result: 22.414 L. (Volume V · 1 mol · 273.15 K · 22.414 L · 101.325 kPa)

Volume V22.413 L
Pressure × volume (nRT)2270.97

Back out the temperature

Primary result: 240.56 K. (Temperature T · 1 mol · 273.15 K · 10 L · 200 kPa)

Temperature T240.56 K
Temperature in Celsius-32.59 °C

The equation that contains the others

The three empirical gas laws you may have learned separately — Boyle's, Charles's, and Avogadro's — are not independent results. They are special cases of one expression that relates pressure, volume, amount of gas, and absolute temperature in a single statement. That statement is PV = nRT, and it is the equation an ideal gas law calculator evaluates when you supply any four of the five quantities and solve for the fifth.

Each symbol has a fixed meaning. P is pressure, V is volume, n is the amount of gas in moles, R is the ideal gas constant, and T is absolute temperature measured in kelvin. The constant R = 8.314 J/(mol·K) = 8.314 kPa·L/(mol·K) in the units used here, which is why pressure is entered in kilopascals and volume in liters. Kelvin is mandatory, not optional: entering Celsius values directly will produce results that are wrong by 273.15 and will mislead every calculation that follows.

Boyle's and Charles's laws fall out of this equation when two variables are held fixed. Keep n and T constant, and PV = nRT reduces to Boyle's observation that pressure and volume vary inversely. Keep n and P constant instead, and you get Charles's result that volume is proportional to absolute temperature. The unified form is more powerful than either special case because it lets you move between all four physical quantities at once, and it reproduces the standard reference values that chemists use to check their work. One mole at 273.15 K and 101.325 kPa occupies 22.413 L — the molar volume at STP, reproduced by the formula. A larger sample, 2 mol at 300 K in 49.19 L, gives 101.41 kPa, about one atmosphere. In the other direction, 200 kPa × 10 L with 1 mol implies a temperature of 240.56 K (−32.59 °C).

The equation is called ideal for a reason. It pictures gas particles as points that interact only through perfectly elastic collisions, with no attractive or repulsive forces between them. Real gases come close to this picture across a wide range of everyday conditions, which is why PV = nRT is the default tool for routine work. The law degrades for real gases at high pressure or near condensation, where the van der Waals equation takes over. For anything approaching a liquid state, or for pressures that compress the gas significantly, the ideal form will overpredict or underpredict the measured volume and should not be the only basis for the result.

Worked examples

The ideal gas law calculator above solves PV = nRT for any one variable when you supply the other three. To show how the equation behaves in practice, the table below presents three verified solves: one for pressure, one for volume at STP, and one for temperature. Each row reproduces a result that the formula yields exactly when R = 8.314 kPa·L/(mol·K), the convenient form of the gas constant when pressure is in kilopascals and volume is in liters.

In the first example, 2 mol of an ideal gas held at 300 K in a 49.19 L container produces a pressure of 101.41 kPa, which is about one atmosphere. The second example confirms the textbook molar volume at STP: 1 mol at 273.15 K and 101.325 kPa occupies 22.413 L, a value the formula reproduces without adjustment. The third example flips the unknown to temperature. When 1 mol of gas sits under 200 kPa in a 10 L volume, the equation implies a temperature of 240.56 K, equivalent to −32.59 °C. These three cases cover the most common solves users perform: pressure, volume, and temperature.

It is worth noting where these results come from conceptually. Boyle's and Charles's laws are special cases of PV = nRT in which two variables are held fixed, so the ideal gas law simply unifies them into one expression. The law degrades for real gases at high pressure or near condensation, where the van der Waals equation takes over. For the conditions in the table, however, the ideal gas assumption holds well, and the numbers above match the formula exactly.

Unknown solvedGiven valuesResultNotes
Pressure (P)n = 2 mol, V = 49.19 L, T = 300 K101.41 kPaAbout one atmosphere
Volume at STP (V)n = 1 mol, T = 273.15 K, P = 101.325 kPa22.413 LMolar volume at STP, reproduced by the formula
Temperature (T)n = 1 mol, P = 200 kPa, V = 10 L240.56 K (−32.59 °C)Solved from PV = nRT
The third example reports temperature in kelvin and Celsius. To convert, subtract 273.15 from the kelvin value: 240.56 K − 273.15 = −32.59 °C.

Choosing R and keeping units honest

The ideal gas law, PV = nRT, links pressure, volume, amount, and absolute temperature for an ideal gas. The constant R is the bridge that makes the equation work, but it is not a single universal number. R dresses in different unit costumes depending on the inputs you bring to the equation. Use the wrong costume and the answer will be off by orders of magnitude, even when every other value is correct.

In the units used here, R = 8.314 J/(mol·K) = 8.314 kPa·L/(mol·K). That value pairs naturally with pressure in kilopascals and volume in liters. An ideal gas law calculator that defaults to these units will handle most textbook and lab problems cleanly. For other input styles, R has matching alternatives: 0.08206 L·atm/(mol·K) when pressure is in atmospheres and volume in liters, and 62.36 L·torr/(mol·K) when pressure is in millimeters of mercury. Each version of R is the same physical constant expressed in different unit clothing. The rule is simple: match R to the units of your pressure and volume inputs, keep temperature in kelvin, and keep amount in moles.

The verified examples confirm the pairing. Take 2 mol at 300 K in 49.19 L: using R = 8.314 kPa·L/(mol·K) gives 101.41 kPa, about one atmosphere. The classic molar volume at STP also reproduces cleanly: 1 mol at 273.15 K and 101.325 kPa occupies 22.413 L. A third case shows the same consistency in a different direction: 200 kPa multiplied by 10 L with 1 mol implies a temperature of 240.56 K, equivalent to −32.59 °C. In every case the units line up and the formula returns a physically meaningful result.

Two cautions keep the work honest. First, always convert temperature to an absolute scale before substituting. Entering Celsius directly will silently corrupt the result because the ideal gas law requires kelvin. Second, remember that PV = nRT is built on simplifying assumptions. Boyle's and Charles's laws are special cases of the same relationship with two variables held fixed. The law degrades for real gases at high pressure or near condensation, where the van der Waals equation takes over. For standard conditions and moderate pressures, though, the ideal gas law calculator with properly matched R values gives results that match measured behavior to high precision.

R is one constant in many outfits: 8.314 kPa·L/(mol·K), 0.08206 L·atm/(mol·K), or 62.36 L·torr/(mol·K). Pick the value whose units match your pressure and volume inputs, and the formula will take care of the rest.

The molar volume benchmark

The single most useful check on any ideal gas law calculator result is the molar volume at standard temperature and pressure. At 273.15 K and 101.325 kPa, one mole of an ideal gas occupies 22.413 L. That number is reproduced exactly by the formula PV = nRT, where R = 8.314 J/(mol·K) = 8.314 kPa·L/(mol·K) in the units used here. If your inputs sit at or near STP and your output strays far from 22.4 L per mole, something in the setup is wrong before you even look at the arithmetic.

The benchmark holds because PV = nRT links pressure, volume, amount, and absolute temperature in a way that stays consistent across the full range where the ideal gas approximation applies. The formula's reliability is confirmed by a second verified case: 2 mol at 300 K in 49.19 L gives 101.41 kPa, which is about one atmosphere. Both results follow the same relationship, and both anchor the law to conditions you can recognize and trust. A third case extends the check to different conditions: 200 kPa × 10 L with 1 mol implies a temperature of 240.56 K (−32.59 °C). Each scenario reduces to the same equation, just rearranged.

This consistency is also why Boyle's and Charles's laws are best understood as special cases of PV = nRT, with two variables held fixed. The molar volume benchmark is the point where all four variables align at values chemists treat as reference conditions, and it is the value every related special-case law must also reproduce under the same constraints.

The benchmark has a limit. The law degrades for real gases at high pressure or near condensation, where the van der Waals equation takes over. At STP for common gases like nitrogen, oxygen, and hydrogen, the deviation from 22.413 L per mole is small enough that the ideal gas law calculator remains the right tool. Closer to condensation or under several atmospheres of pressure, the same inputs will start to drift, and the benchmark stops being a dependable sanity check.

Use 22.4 L per mole at STP as your sanity check. If your result is far off that mark at or near 273.15 K and 101.325 kPa, recheck your inputs before trusting the output.

Where ideal stops

An ideal gas law calculator treats every gas particle as a tiny, perfectly elastic point that never exerts attractive or repulsive forces on its neighbors. That assumption simplifies the math behind PV = nRT, and it works well across a remarkably broad range of everyday conditions. The verified examples hold up cleanly: 1 mol at 273.15 K and 101.325 kPa occupies 22.413 L, the familiar molar volume at STP, and 2 mol at 300 K in 49.19 L gives 101.41 kPa, about one atmosphere. As long as the gas stays well above its condensation point and far from extreme compression, the formula reproduces reality with impressive fidelity.

The model begins to degrade for real gases at high pressure or near condensation. Push molecules close enough together and their finite volume becomes a noticeable fraction of the container. Drop the temperature low enough and intermolecular attractions, weak at ordinary conditions, start pulling particles toward one another. Polar gases are especially vulnerable because their uneven charge distribution creates stronger dipole-dipole forces that the ideal framework simply ignores. Under those conditions the calculated pressure, volume, or temperature drifts from the measured value, and the gap widens as conditions get harsher.

The van der Waals equation takes over where the ideal law falters. It introduces two correction terms: one that subtracts the effective volume the molecules themselves occupy, and one that accounts for the attractive forces between them. These additions make the equation more accurate at high pressure and low temperature, where the ideal gas law calculator would overpredict pressure for a given volume and temperature. The trade-off is added complexity, since the corrected equation requires two substance-specific constants that vary from gas to gas.

For most practical work, knowing where the boundary lies matters as much as choosing the right tool. A result like 200 kPa and 10 L with 1 mol implying 240.56 K, or −32.59 °C, remains trustworthy only if the gas in question is still behaving nearly ideally at that state. Near condensation, in dense phases, or with strongly polar molecules, switching to a real-gas model is the sounder choice.

  • High pressure: molecules occupy a meaningful share of container volume, so the ideal assumption of negligible particle volume breaks down.
  • Low temperature: particles move slowly enough for intermolecular attractions to matter, pulling measured pressure below the ideal prediction.
  • Polar gases: uneven charge distribution creates dipole interactions that the ideal law does not account for, causing larger deviations.
  • Near condensation: as a gas approaches its liquid phase, ideal behavior fails and the van der Waals equation provides a better estimate.
The ideal gas law calculator gives reliable results when pressure is moderate, temperature is well above condensation, and the gas is nonpolar. Outside that window, the van der Waals equation is the better tool.

Boyle and Charles as special cases

The full ideal gas law, PV = nRT, links four variables at once: pressure, volume, amount of gas, and absolute temperature. When you hold two of those variables fixed, the equation collapses into simpler, named relationships that were discovered centuries before the unified law. This is why an ideal gas law calculator can reproduce Boyle's and Charles's laws without any separate formulas — it simply fixes the variables that do not change and solves for the one that does.

Boyle's law applies when temperature and amount of gas are held constant. With T and n fixed, PV = nRT reduces to PV = constant, meaning pressure and volume move in opposite directions: squeeze the gas into half the space and the pressure doubles. Charles's law, by contrast, holds pressure and amount fixed, leaving V divided by T equal to a constant. Heat the gas and the volume grows in direct proportion, provided the pressure has nowhere to rise.

A concrete check shows the formula holding together across these special cases. Take 1 mol of gas at 273.15 K and 101.325 kPa: the equation gives 22.413 L, the recognized molar volume at STP. Push the pressure to 200 kPa while keeping 1 mol in 10 L and the implied temperature drops to 240.56 K, or −32.59 °C. Another verified point: 2 mol at 300 K in 49.19 L yields 101.41 kPa, about one atmosphere. In every case the constant R = 8.314 J/(mol·K), equal to 8.314 kPa·L/(mol·K) in the units used here, ties the numbers together.

These special cases hold only while the gas behaves ideally. At high pressure or near condensation, the simple inverse and direct relationships break down and the van der Waals equation takes over, accounting for the finite size of molecules and the attractive forces between them. For ordinary conditions, though, fixing two variables in PV = nRT is all the ideal gas law calculator needs to reproduce Boyle's or Charles's law from a single equation.

FAQs

How do I find pressure with the ideal gas law?

Use P = nRT ÷ V. For example, with 2 moles, R = 8.314, T = 300 K, and V = 49.19 L, you get P = 2 × 8.314 × 300 ÷ 49.19 = 101.41 kPa. Plug your known values into the same formula to solve for pressure.

What volume does one mole of gas occupy at STP?

One mole of an ideal gas occupies 22.413 L at 273.15 K and 101.325 kPa. This is the classic molar volume the formula reproduces. At standard temperature and pressure, PV = nRT yields this value for any gas treated as ideal.

Which R should I use?

Use 8.314 in SI units — equivalently 8.314 kPa·L/(mol·K) or 0.08206 L·atm/(mol·K). Pick the value whose units match your inputs. If pressure is in atmospheres, use 0.08206. If pressure is in kilopascals, use 8.314. Matching units prevents errors.

Why must temperature be in kelvin?

Temperature enters as absolute thermal energy. Celsius would give negative pressures below 0 °C, which is physically impossible. Kelvin starts at absolute zero, so it always produces positive, meaningful values. Always convert Celsius to kelvin before using the ideal gas law.

How accurate is the ideal gas law for real gases?

It works well at everyday pressures and temperatures but poorly at high pressure or near a gas's condensation point. Under normal conditions, real gases behave close to ideal. At extreme pressures or low temperatures near condensation, molecular interactions cause significant deviations from the formula's predictions.

How do Boyle's and Charles's laws relate to PV = nRT?

They are PV = nRT with n and T (Boyle) or n and P (Charles) held constant. Boyle's law fixes temperature and moles, showing pressure and volume are inversely related. Charles's law fixes pressure and moles, showing volume and temperature are directly proportional. Both are special cases of the ideal gas law.

Sources

Related calculators

Boyle's Law Calculator
P₁V₁ = P₂V₂: find the new pressure or the new volume of a gas squeezed or expanded at constant temperature.
Charles's Law Calculator
V₁/T₁ = V₂/T₂ with the Celsius-to-kelvin conversion handled for you — find a heated gas's new volume, or the temperature a target volume needs.
Density Calculator
Density, mass or volume from the other two — ρ = m/V — with the float-or-sink check against water built in.
Half-Life Calculator
Radioactive decay three ways: how much remains, how long to reach a target amount, or the half-life implied by two measurements.