Charles Law Calculator

Ideal Gas Law Calculator

Solve PV = nRT instantly. Enter any three of pressure, volume, moles, and temperature, and the calculator fills in the fourth.

Solved

Computed from the other three values.

Uses the universal gas constant R = 8.314 J/(mol·K).

Pressure

P = 0.9786 atm

P = nRT / V = (0.2 mol × 8.3144626 × 298.15 K) / 0.005 m³ = 99160 Pa = 0.9786 atm

What Is the Ideal Gas Law?

The ideal gas law states that the pressure, volume, amount, and temperature of an idealised gas are all tied together in one equation: PV = nRT. Here P is pressure, V is volume, n is the amount of gas in moles, T is the absolute temperature, and R is the universal gas constant. Unlike the single-relationship laws, this equation needs all four quantities present at once — which is exactly why the calculator above waits for three of them before it will solve for the last.

Definition

The ideal gas law describes a hypothetical gas made of point particles with no volume of their own and no forces between them, whose pressure, volume, amount, and temperature always satisfy PV = nRT. Most real gases at ordinary pressures and temperatures follow this closely enough to be useful.

What makes PV = nRT special is that it contains the three single-variable gas laws as special cases, depending on which two of the four quantities you decide to hold fixed. Fix pressure and the amount of gas, and volume becomes proportional to temperature — that's V ∝ T, the relationship behind the Charles' law calculator at the top of this site. Fix temperature and the amount of gas instead, and pressure becomes inversely proportional to volume, P ∝ 1/V — that's Boyle's law, the constant-temperature special case. Fix volume and the amount of gas, and pressure becomes proportional to temperature, P ∝ T — that's Gay-Lussac's law. Each of those three laws is really just PV = nRT with two of its four "slots" nailed down, leaving a simple proportional relationship between the other two.

Ideal Gas Law Formula and the Gas Constant

Rearranged for whichever value is unknown: V = nRT / P, P = nRT / V, n = PV / (RT), and T = PV / (nR). The calculator above picks the right rearrangement automatically based on which field you leave blank, and runs a consistency check instead if you fill in all four.

The gas constant R = 8.314462618 J/(mol·K) is what makes the units work out, and it only does so when pressure is in pascals, volume is in cubic metres, amount is in moles, and temperature is in kelvin. The calculator handles that conversion internally no matter which units you pick from the dropdowns — pressure in kilopascals, atmospheres, or pounds per square inch; volume in litres, millilitres, cubic metres, or cubic feet; temperature in kelvin, Celsius, or Fahrenheit — and converts the solved answer back into whichever unit you selected for that field.

This page solves a single state of one gas sample. If your problem instead compares two different states of the same fixed amount of gas — say, a tank that's heated, compressed, and moved to a new altitude all at once — the amount of gas cancels out of the equation entirely, and the combined gas law calculator is the more direct tool, since it skips moles altogether and works purely with the before-and-after ratios of pressure, volume, and temperature.

The symbols in the ideal gas law formula and their units
Symbol Meaning Unit
P Pressure kPa, atm, psi
V Volume L, mL, m³, ft³
n Amount of gas mol
T Temperature (absolute) K, °C, °F
R Universal gas constant 8.314462618 J/(mol·K)

Ideal Gas Law Examples: Step by Step

Example 1

Pressure in a Rigid Cylinder

A rigid 5 L cylinder holds n = 0.2 mol of gas at T = 298.15 K (25 °C). Find the pressure inside.

  • Apply: P = nRT / V = (0.2 × 8.314462618 × 298.15) / 0.005 = 99,160 Pa
  • Answer: P ≈ 99.16 kPa ≈ 0.9786 atm

Because the cylinder is rigid, volume can't change, so every mole of gas and every degree of temperature goes straight into raising the pressure.

Example 2

Volume of a Helium Balloon

A balloon holds n = 0.1 mol of helium at P = 1 atm and T = 293.15 K (20 °C). Find the volume it occupies.

  • Apply: V = nRT / P = (0.1 × 8.314462618 × 293.15) / 101,325 ≈ 2.406 L
  • Answer: V ≈ 2.406 L

That's a little more than two litres of gas from just a tenth of a mole — a reminder of how much space a gas occupies compared to the same mass of liquid or solid.

Ideal Gas vs Real Gas

PV = nRT assumes gas molecules are dimensionless points that never attract or repel one another, colliding only in perfectly elastic bounces. Real molecules, of course, do take up a little space and do pull on each other slightly, so real gases only follow the ideal gas law approximately. At ordinary room pressure and temperature the difference is usually too small to matter for everyday calculations.

The approximation breaks down at high pressure, where molecules are packed closely enough that their finite size and mutual attraction start to matter, and at low temperature, where molecules move slowly enough for those attractive forces to noticeably pull the gas away from ideal behaviour — sometimes all the way to condensation. In those regimes, the Van der Waals equation corrects for both effects with two extra terms, and gives a substantially more accurate pressure-volume relationship than the ideal gas law alone.

If you just need a quick sanity check on a homework problem or a rough engineering estimate, PV = nRT is almost always good enough. It's only when you're working with gases near their condensation point, or squeezed into a very small volume at high pressure, that reaching for the Van der Waals calculator instead of coming back to the Charles law calculator's ideal-gas assumptions actually changes the answer.

Frequently Asked Questions About the Ideal Gas Law

  • What is the ideal gas law?

    The ideal gas law is the equation PV = nRT, which relates the pressure, volume, amount, and temperature of a gas that behaves as an idealised collection of point particles with no intermolecular forces. It combines Boyle’s law, Charles’ law, and Gay-Lussac’s law into a single relationship.

  • What does each letter in PV = nRT stand for?

    P is pressure, V is volume, n is the amount of gas in moles, R is the universal gas constant (8.314462618 J/(mol·K)), and T is the absolute temperature in kelvin. All four of P, V, n, and T must be in consistent units before you plug them into the equation.

  • How do I solve for pressure, volume, moles, or temperature?

    Rearrange the equation for whichever variable is missing: V = nRT / P, P = nRT / V, n = PV / (RT), or T = PV / (nR). The calculator above does this automatically as soon as exactly three of the four fields are filled in.

  • Why does temperature have to be in kelvin?

    The ideal gas law only works on an absolute temperature scale, where zero really means zero molecular motion. Celsius and Fahrenheit both have negative values that would make the equation collapse or flip sign incorrectly, so the calculator always converts to kelvin internally before solving, exactly like the temperature handling on the homepage’s Charles’ law calculator.

  • What is a real-world example of the ideal gas law?

    A sealed cylinder, a scuba tank, or a balloon are all everyday examples: as long as you know three of pressure, volume, moles, and temperature, PV = nRT tells you the fourth. See the two worked examples further down this page for the full arithmetic.

  • How is the ideal gas law different from the combined gas law?

    The ideal gas law describes a single state of a gas at one moment, using the amount of gas explicitly. The combined gas law compares two different states of the same fixed amount of gas as pressure, volume, and temperature all change together, without needing to know the mole count at all.

  • When does the ideal gas law stop being accurate?

    It assumes gas molecules are point particles with no volume and no attraction to each other, which is a good approximation at ordinary pressures and temperatures but breaks down at high pressure or low temperature, where the Van der Waals equation gives a more realistic answer.

Need a different variable held constant, or a version of this equation without moles? These companion tools cover the rest of the gas law family.