Ideal Gas Calculator

PV = nRT: solve for pressure, volume, moles or temperature.

Quick answer

  • Formula: P × V = n × R × T, with R = 0.082057 L·atm/(mol·K)
  • Worked example — Pressure: 4.92342 atm (full example below).

Ideal Gas Calculator

Leave at 0 if this is the value you are solving for — it is ignored.
Leave at 0 if this is the value you are solving for — it is ignored.
Leave at 0 if this is the value you are solving for — it is ignored.
Kelvin only: K = °C + 273.15. Leave at 0 if this is the value you are solving for — it is ignored.
Worked example result
Pressure4.92342 atm
Volume10.00000 L
Amount of gas2.00000 mol
Temperature300.000 K

Two moles of gas in 10 L at 300 K exert a pressure of about 4.923 atm.

The ideal gas law combines Boyle's, Charles's and Avogadro's laws into one equation relating pressure, volume, amount and temperature for a gas that behaves ideally — a good model for most gases at ordinary pressures.

Choose the value to solve for and enter the other three; leave the solved value at 0, it is ignored. Units are fixed: pressure in atm, volume in litres, temperature in kelvin, with R = 0.082057 L·atm/(mol·K).

The formula

P × V = n × R × T, with R = 0.082057 L·atm/(mol·K)

Worked example

Two moles of gas in 10 L at 300 K exert a pressure of about 4.923 atm.

The example is pre-loaded in the result panel — press Calculate with your own numbers to replace it.

Frequently asked questions

Why must temperature be in kelvin?

The gas laws are proportional to absolute temperature. Using Celsius would break the proportionality (and allow nonsensical zero or negative values). Add 273.15 to convert °C to K.

When does the ideal gas law fail?

At high pressures or near a gas's boiling point, molecular size and intermolecular attractions matter and real gases deviate — corrections such as the van der Waals equation are then needed.

What is R in SI units?

R = 8.314 J/(mol·K), used when pressure is in pascals and volume in cubic metres. This calculator uses R = 0.082057 L·atm/(mol·K) to match its atm and litre inputs.

Category: Science calculators

Sources & methodology

This calculator applies the formula shown on this page exactly as written, using the standard definitions for its inputs. Results are computed from the values you enter — no data is stored — and are rounded only for display.

Content last reviewed by CalcHub Editorial.

Embed this calculator on your site

Free to use with attribution — paste the snippet below and the calculator appears on your page, with a link back to CalcHub.

<iframe src="https://calculator-site-57a.pages.dev/embed/ideal-gas-calculator" width="100%" height="640" style="border:1px solid #d9e2ea;border-radius:12px" loading="lazy" title="Ideal Gas Calculator — CalcHub"></iframe>

Open the embed version →