All calculators
Sign in

Ideal Gas Law Calculator

Sign up to favourite this calculator

Solve the ideal gas law, PV = nRT, for pressure, volume, temperature or the amount of gas — enter any three and this calculates the fourth, with the full formula worked through.

Your values

What do you want to calculate?
Pressure (P)Entered

Treated as absolute pressure, not gauge pressure.

Volume (V)Calculated
22.4 L

The volume the gas occupies.

Temperature (T)Entered

Converted to kelvin for the calculation, whatever unit you enter it in.

Amount of gas (n)Entered

The amount of gas, in moles.

1.00 mol of gas at 0 °C and 1.00 atm occupies a volume of 22.4 L.

Formula used

V = nRT ÷ P
V = (1.00 mol × 0.0820574 atm·L/(mol·K) × 273 K (0 °C)) ÷ 1.00 atm = 22.4 L

Values used

Pressure, volume, temperature and amount of gas: display value, exact SI value, and whether each was entered or calculated
QuantityValueSI valueStatus
Pressure (P)1.00 atm101,325 PaEntered
Volume (V)22.4 L0.0224140 m³Calculated
Temperature (T)0 °C273.150 K (0 °C, 32.0000 °F)Entered
Amount of gas (n)1.00 mol1.00000 molEntered

Assumptions

Solving for
Volume (V)
Gas constant used
R = 0.0820574 atm·L/(mol·K)
Temperature converted to kelvin
Yes — 0 °C → 273 K
Pressure treated as absolute
Yes — not gauge pressure
Gas behaviour assumed
Ideal (PV = nRT), not a real-gas equation of state

How pressure, volume, temperature and amount relate

  • Boyle's Law — doubling the volume to 44.8 L at the same temperature and amount halves the pressure to 0.500 atm.
  • Charles's Law — doubling the temperature to 546 K at the same pressure and amount doubles the volume to 44.8 L.
  • Gay-Lussac's Law — doubling the temperature to 546 K at the same volume and amount doubles the pressure to 2.00 atm.
  • Avogadro's Law — doubling the amount of gas to 2.00 mol at the same pressure and temperature doubles the volume to 44.8 L.

Based on the ideal gas law, PV = nRT, which assumes point particles with no intermolecular forces. Real gases deviate from this at high pressure or low temperature.

Save to My calculations

Sign in to keep your calculations

How to use this calculator

Choose which quantity you want to calculate — pressure, volume, temperature or the amount of gas — from the segmented control at the top. The other three quantities become editable inputs; enter each one with its unit, and the fourth recalculates immediately as you type. There is no separate Calculate step.

Every quantity keeps a real value even when it is not currently an input, so switching between what you are solving for never leaves a field blank. Use the Use example button to load the standard molar volume worked example (1 mol at 1 atm and 0 °C), or Reset to clear every field.

What do I need to enter?

  • What do you want to calculate? — Pressure (P), Volume (V), Temperature (T) or Amount of gas (n). The other three become the inputs.
  • Pressure (P) — absolute pressure, not gauge, in pascals, kilopascals, bar or atmospheres. Must be greater than zero.
  • Volume (V) — in cubic metres, litres or millilitres. Must be greater than zero.
  • Temperature (T) — in kelvin, Celsius or Fahrenheit. It must be above absolute zero, and is converted to kelvin before use.
  • Amount of gas (n) — in moles. Must be greater than zero.

What do the results show?

  • Calculated quantity — the pressure, volume, temperature or amount of gas you chose to solve for, with a one-line statement of the result.
  • Formula used — PV = nRT rearranged for that quantity, with your values substituted in.
  • Values used — each quantity's value, its SI value, and whether it was entered or calculated.
  • Assumptions and how the quantities relate — the gas constant used, plus how changing one quantity moves the others. A warning appears at high pressure or low temperature, where a real gas strays from ideal behaviour.

How is the ideal gas law calculated?

P × V = n × R × T
  • P — pressure, in pascals for the SI form of R
  • V — volume, in cubic metres for the SI form of R
  • n — amount of gas, in moles
  • R — the universal gas constant, 8.314462618 J/(mol·K)
  • T — absolute temperature, in kelvin

Rearranged for each quantity:

  • Pressure: P = nRT ÷ V
  • Volume: V = nRT ÷ P
  • Temperature: T = PV ÷ nR
  • Amount of gas: n = PV ÷ RT

This calculator solves directly in whichever pressure and volume units you have selected, using the exact value of R for that combination — R = 8.314462618 ÷ (pressure unit in pascals × volume unit in cubic metres). With atmospheres and litres this works out to the textbook R = 0.0820574 L·atm/(mol·K); with kilopascals and litres, to R = 8.314462618 kPa·L/(mol·K), numerically identical to the SI value in J/(mol·K). Temperature is always converted to kelvin first, since the law only holds on an absolute scale — enter 0 °C and the breakdown below shows the conversion to 273.15 K. If you just need to convert a temperature between Celsius and Fahrenheit on its own, the Celsius to Fahrenheit Converter has the formula worked through the same way.

Volume here stays in cubic metres, litres or millilitres — the units the ideal gas law is normally worked in. To convert a result into US or UK gallons, use the Litres to Gallons Converter.

Worked example: solving for volume with 1 mol of gas at 1 atm and 0 °C (273.15 K),
V = (1 mol × 0.0820574 L·atm/(mol·K) × 273.15 K) ÷ 1 atm ≈ 22.414 L.

What does this calculator assume?

  • The gas behaves ideally — point particles with no volume and no intermolecular forces, other than perfectly elastic collisions.
  • Pressure entered is absolute pressure, not gauge pressure.
  • Temperature is converted to kelvin before it is used in the formula, whatever unit you enter it in.
  • The gas constant used is the single universal value, R = 8.314462618 J/(mol·K) — this calculator never infers a specific gas identity, a compressibility factor, or a non-ideal correction such as the van der Waals equation.
  • The gas is at equilibrium — no chemical reaction, phase change or flow is modelled.

Important information

The ideal gas law is a theoretical model, not an exact description of a real gas. It is most accurate at low pressure and high temperature, where gas molecules are far apart and rarely interact. It becomes progressively less accurate at high pressure or low temperature — particularly as a gas approaches the conditions under which it would condense into a liquid. This calculator flags a result reached under those conditions, but it does not correct for them. It is an educational and planning tool, not a laboratory measurement, a safety calculation, or a substitute for a real-gas equation of state.

Frequently asked questions

What is the ideal gas law formula?

The ideal gas law is 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 absolute temperature in kelvin. It relates all four physical quantities of an ideal gas — the theoretical model of a gas made of point particles with no volume and no forces between them, other than perfectly elastic collisions.

How do I calculate pressure using the ideal gas law?

Choose "Pressure" as what to calculate, then enter the volume, temperature and amount of gas — the result updates automatically. The calculator rearranges the formula to P = nRT ÷ V. For example, 1 mol of gas at 273.15 K (0 °C) in a volume of 22.414 L exerts a pressure of 1 atm.

How do I calculate volume using the ideal gas law?

Choose "Volume" as what to calculate, then enter the pressure, temperature and amount of gas. The calculator rearranges the formula to V = nRT ÷ P. For example, 1 mol of gas at 1 atm and 0 °C occupies 22.414 L — this is the standard molar volume of an ideal gas at STP.

How do I calculate temperature using the ideal gas law?

Choose "Temperature" as what to calculate, then enter the pressure, volume and amount of gas. The calculator rearranges the formula to T = PV ÷ nR, and always solves in kelvin before converting the result to whichever temperature unit you have selected.

How do I calculate the number of moles using the ideal gas law?

Choose "Amount of gas" as what to calculate, then enter the pressure, volume and temperature. The calculator rearranges the formula to n = PV ÷ RT.

What is the value of the gas constant, R?

The universal gas constant is R = 8.314462618 J/(mol·K), an exact defined value under the SI system. Expressed in other common unit combinations it is R = 8.314462618 kPa·L/(mol·K), or R = 0.0820574 L·atm/(mol·K). This calculator derives the exact value of R for whatever pressure and volume units you have selected, and shows the one it used in the formula substitution and the assumptions list.

Why does temperature have to be in kelvin?

The ideal gas law only holds with an absolute temperature scale, where zero represents absolute zero — the point at which a gas would theoretically have no thermal motion and, mathematically, zero volume or pressure. Celsius and Fahrenheit have arbitrary zero points, so using them directly in PV = nRT would give a wrong answer. You can still enter a temperature in Celsius or Fahrenheit here; the calculator converts it to kelvin before calculating, and shows the conversion in the values-used table.

Does pressure mean absolute pressure or gauge pressure?

This calculator always treats the pressure you enter as absolute pressure — pressure measured from a true vacuum, which is what PV = nRT requires. Gauge pressure (common on pressure gauges, which read zero at normal atmospheric pressure) must be converted to absolute pressure first by adding atmospheric pressure, typically about 101.325 kPa or 1 atm at sea level.

What is STP (Standard Temperature and Pressure)?

STP is commonly defined as 0 °C (273.15 K) and 1 atm (101.325 kPa), though some sources use the IUPAC 2019 definition of 0 °C and 100 kPa. At the traditional STP definition, 1 mol of an ideal gas occupies 22.414 L — the "Use example" button loads exactly this worked example.

Why does my result look different from a real gas measurement?

The ideal gas law assumes gas particles have no volume and no attractive or repulsive forces between them. Real gases deviate from this, particularly at high pressure (where molecules are forced close together) and low temperature (approaching the point of condensing into a liquid). This calculator does not model real-gas corrections such as the van der Waals equation — treat results under those conditions as an approximation, not an exact measurement.

What units does this calculator support?

Pressure: pascals, kilopascals, bar and atmospheres. Volume: cubic metres, litres and millilitres. Temperature: kelvin, Celsius and Fahrenheit. Amount of gas is always in moles, the SI base unit for amount of substance.

Last updated 25 October 2026.