Ideal Gas Law Calculator
Choose the unknown — pressure, volume, amount of gas or temperature — then enter the other three in the units you have. You get the answer, the working with the exact gas constant, and the molar volume at your conditions. Temperature is converted to kelvin for you, and an impossible value is flagged rather than calculated. Free, no sign-up.
Celsius and Fahrenheit are converted to kelvin first — the law needs absolute temperature.
Results
61.2 L
Volume (V)
24.5 L/mol
Molar volume (V ÷ n)
8.314462618 J/(mol·K)
Gas constant R used
The working
PV = nRT
V = nRT ÷ P
Pressure (P): 1.00 atm = 101325 Pa
Temperature (T): 25.0 °C = 298.15 K
V = (2.5 mol × 8.314462618 J/(mol·K) × 298.15 K) ÷ 101325 Pa = 0.06116 m³
0.06116 m³ = 61.2 L
The gas constant R in other units
R = N_A × k_B is exact since the 2019 SI redefinition. Use the value whose pressure and volume units match yours.
| Unit | R |
|---|---|
| J/(mol·K) | 8.314462618 |
| L·kPa/(mol·K) | 8.314462618 |
| L·bar/(mol·K) | 0.08314462618 |
| L·atm/(mol·K) | 0.08205736608 |
| L·mmHg/(mol·K) | 62.36358934 |
| L·Torr/(mol·K) | 62.36359822 |
| cal/(mol·K) | 1.987204259 |
Molar volume of an ideal gas
IUPAC has defined STP as 273.15 K and 10⁵ Pa since 1982; before that the pressure was 1 atm. SATP is a textbook convention, not an IUPAC term.
| Condition | Temperature | Pressure | V_m (L/mol) |
|---|---|---|---|
| STP (IUPAC, since 1982) | 273.15 K | 100 kPa | 22.711 |
| STP (before 1982) | 273.15 K | 101.325 kPa | 22.414 |
| SATP (1 bar) | 298.15 K | 100 kPa | 24.790 |
| SATP (1 atm) | 298.15 K | 101.325 kPa | 24.465 |
How to Use the Ideal Gas Law Calculator
- 1. Pick the unknown. Pressure, volume, amount (moles) or temperature. The answer box becomes a unit menu, so you choose the unit the result is written in.
- 2. Enter the other three with their units. Pressure can be in Pa, kPa, bar, atm, mmHg, Torr or psi; volume from mL to m³ and gallons; amount in mmol, mol or kmol; temperature in K, °C or °F.
- 3. Or start from a reference condition. The STP and SATP buttons fill in the temperature and pressure for you, so you can ask for the volume of one mole, or of any amount, at those conditions.
- 4. Read the working. Each input is converted to SI, the equation is rearranged, and your numbers are substituted using the exact value of R, so you can match it to your own solution line by line.
The Ideal Gas Equation
Equation
PV = nRT
Pressure
P = nRT / V
Volume
V = nRT / P
Amount
n = PV / RT
Temperature
T = PV / nR
P is the pressure, V the volume, n the amount of gas in moles, T the absolute temperature in kelvin, and R the molar gas constant. The law combines Boyle's, Charles's, Gay-Lussac's and Avogadro's laws into one statement and describes a gas whose particles have negligible volume and no attractive forces. Real gases behave this way closely at low pressure and high temperature.
Which Value of R to Use
R is a single number written in different units. Since the 2019 SI redefinition it is exact, because it is the product of two exact constants, the Avogadro constant and the Boltzmann constant: R = 8.314 462 618… J/(mol·K) (NIST, CODATA). Every other form is that value divided by a unit conversion. The calculator uses the SI value and converts your inputs, so the choice of R never changes your answer — but if you work by hand, pick the R whose pressure and volume units match your data.
| Use when pressure and volume are in | R |
|---|---|
| Pa and m³ (or J) | 8.314 462 618 J/(mol·K) |
| kPa and L | 8.314 462 618 L·kPa/(mol·K) |
| bar and L | 0.083 144 626 18 L·bar/(mol·K) |
| atm and L | 0.082 057 366 08 L·atm/(mol·K) |
| Torr and L | 62.363 598 22 L·Torr/(mol·K) |
STP and SATP: Which Molar Volume?
STP has changed. Before 1982 it meant 273.15 K and 1 atm (101.325 kPa), where one mole of ideal gas occupies 22.414 L. In 1982 IUPAC changed the standard pressure to exactly 10⁵ Pa (1 bar), so at IUPAC's STP — 273.15 K and 100 kPa — the molar volume is 22.711 L/mol. Many textbooks and exam boards still print 22.4 L/mol, so use the one your course specifies.
SATP (standard ambient temperature and pressure) is a textbook convention, not an IUPAC term. It is usually 298.15 K (25 °C) with 1 bar, giving 24.790 L/mol; older books use 1 atm, giving 24.465 L/mol. The calculator shows all four values in a table so you can see which one your source assumes.
Worked Examples
Volume (the default inputs). What volume do 2.50 mol of gas occupy at 25.0 °C and 1.00 atm? Convert first: T = 25.0 + 273.15 = 298.15 K and P = 101 325 Pa. Then V = nRT ÷ P = (2.50 × 8.314 462 618 × 298.15) ÷ 101 325 = 0.06116 m³, which is 61.2 L.
Pressure. A 5.00 L flask holds 0.250 mol of gas at 300. K. P = nRT ÷ V = (0.250 × 8.314 462 618 × 300.) ÷ 0.00500 m³ = 124 717 Pa, or 125 kPa.
Moles. How many moles are in 12.0 L at 0.950 atm and 20.0 °C? With P = 96 258.75 Pa and T = 293.15 K, n = PV ÷ RT = (96 258.75 × 0.0120) ÷ (8.314 462 618 × 293.15) = 0.474 mol.
Common Mistakes
- Using Celsius in the equation. T must be absolute. 25 °C is 298.15 K; putting 25 into the equation gives an answer about twelve times too large. A temperature at or below 0 K (−273.15 °C, −459.67 °F) is impossible, and the calculator rejects it.
- Mixing R with the wrong units. 0.0821 goes with atm and litres; 8.314 goes with pascals and cubic metres. Mixing them is the commonest source of a wrong factor of 101.3 or 1000.
- Forgetting to convert grams to moles. n is moles, not grams. Divide mass by molar mass first — the Grams to Moles Converter does it — or, for a gas of known density, use the Density Calculator.
- Trusting the law at high pressure. Above about 10 atm, or near a gas's condensation point, attractions and molecular volume matter, and the calculator adds a warning. The van der Waals equation is the usual next step.
Frequently Asked Questions
- What is the ideal gas law formula?
- PV = nRT: pressure times volume equals the amount of gas in moles times the gas constant times the absolute temperature. Rearrange it for whichever quantity you need, for example V = nRT ÷ P.
- What is the value of R in the ideal gas law?
- R = 8.314 462 618 J/(mol·K), which is the same as 8.314 L·kPa/(mol·K). In other units it is 0.082 057 L·atm/(mol·K), 0.083 145 L·bar/(mol·K) and 62.364 L·Torr/(mol·K). Which one you use depends only on the units of P and V.
- Why must temperature be in kelvin?
- Gas volume and pressure are proportional to absolute temperature, which starts at zero where ideal gas motion would stop. The Celsius and Fahrenheit zeros are arbitrary, so using them gives wrong answers, and a zero or negative absolute temperature has no physical meaning.
- What is the molar volume of a gas at STP?
- At IUPAC's STP (273.15 K, 100 kPa) it is 22.711 L/mol. At the older definition (273.15 K, 101.325 kPa) it is 22.414 L/mol. Check which definition your textbook or exam uses before choosing.
- What is the difference between STP and SATP?
- STP is 0 °C (273.15 K); SATP is 25 °C (298.15 K). Both are commonly paired with 1 bar of pressure today, though older sources use 1 atm. Because the temperatures differ, a mole of gas fills 22.711 L at STP and 24.790 L at SATP.
- When does the ideal gas law fail?
- It fails at high pressure and low temperature, where gas particles are close together, attract one another and take up a noticeable fraction of the volume. Gases that form hydrogen bonds or are close to liquefying, such as water vapour and ammonia, deviate most.