Chemistry calculators

Ideal Gas Law Calculator

Updated Sep 1, 2026 By Jehan Wadia
Rate Formulas
V = nRT / P
R = 8.31446261815324 J·mol⁻¹·K⁻¹ (m³·Pa·K⁻¹·mol⁻¹)

Result

V = 22.4140 L

Volume of gas at the specified conditions

Solution Steps
Quick Reference: Standard Conditions
Condition Temperature Pressure Molar Volume
STP (IUPAC) 273.15 K (0 °C) 1 bar (100 kPa) 22.711 L/mol
STP (old/common) 273.15 K (0 °C) 1 atm (101.325 kPa) 22.414 L/mol
NTP 293.15 K (20 °C) 1 atm 24.040 L/mol
Room Conditions 298.15 K (25 °C) 1 atm 24.465 L/mol

Introduction

The Ideal Gas Law is one of the most important equations in chemistry. Written as PV = nRT, it connects four properties of a gas: pressure (P), volume (V), temperature (T), and the amount of gas in moles (n). The letter R stands for the universal gas constant. If you know any three of these values, you can solve for the fourth.

This Ideal Gas Law Calculator makes that process quick and simple. Choose which variable you want to solve for (pressure, volume, temperature, or amount), then enter the three known values. The calculator handles unit conversions automatically, so you can work in atmospheres, liters, Kelvin, Celsius, and many other units without doing the math by hand. It also shows step-by-step solutions so you can follow along and learn how each answer is found.

This tool gives you accurate results for chemistry test prep, homework checks, and gas law problems in a lab setting. It works for any ideal gas calculation at standard or non-standard conditions.

How to Use Our Ideal Gas Law Calculator

Enter any three of the four variables from the ideal gas law equation (PV = nRT), and this calculator will solve for the missing one. It also shows step-by-step work so you can follow the math.

Solve For: Pick which variable you want to find. You can choose Pressure (P), Volume (V), Temperature (T), or Amount of substance (n). The calculator will gray out that field and solve for it using the other three values you provide.

Pressure (P): Enter the gas pressure if it is not the variable being solved. Use the dropdown menu to pick your unit, such as atm, Pa, kPa, bar, mmHg, torr, or psi.

Volume (V): Enter the volume of the gas if it is not the variable being solved. Choose your preferred unit from options like liters (L), milliliters (mL), cubic meters (m³), cubic centimeters (cm³), or gallons.

Temperature (T): Enter the temperature of the gas if it is not the variable being solved. You can input the value in Kelvin (K), Celsius (°C), Fahrenheit (°F), or Rankine (°R). The temperature must be above absolute zero.

Amount of Substance (n): Enter the number of moles of gas if it is not the variable being solved. You can choose between moles (mol) and millimoles (mmol).

Calculate: Click the "Calculate" button or press Enter to get your result. The answer appears in the Result card, and a full breakdown of the solution steps is shown below it, including unit conversions and substitution into the formula.

Reset: Click the "Reset" button to clear all fields and return the calculator to its default settings, which solve for Volume at standard temperature and pressure (1 atm, 273.15 K, 1 mol).

The Ideal Gas Law

The ideal gas law is one of the most important equations in chemistry. It describes how gases behave by connecting four key properties: pressure (P), volume (V), temperature (T), and the amount of gas in moles (n). The equation is written as PV = nRT, where R is the universal gas constant (8.314 J·mol⁻¹·K⁻¹).

This law tells us that if you know any three of the four variables, you can always solve for the missing one. For example, if you know the pressure, temperature, and number of moles of a gas, you can calculate the volume it occupies. The calculator above lets you pick which variable to solve for and handles all the math and unit conversions automatically.

What Is an "Ideal" Gas?

An ideal gas is a simplified model where we assume two things: the gas particles have no size, and they do not attract or repel each other. No real gas is truly ideal, but most common gases like oxygen, nitrogen, and helium behave very close to ideal under normal conditions (around room temperature and atmospheric pressure). The ideal gas law becomes less accurate at very high pressures or very low temperatures, where gas particles are squeezed close together and start interacting with each other.

Understanding Each Variable

  • Pressure (P): the force the gas pushes on the walls of its container. Common units include atmospheres (atm), pascals (Pa), and millimeters of mercury (mmHg).
  • Volume (V): the amount of space the gas fills. Typically measured in liters (L) or cubic meters (m³).
  • Temperature (T): how hot or cold the gas is. The ideal gas law requires temperature in Kelvin (K). You can never have a negative Kelvin value because 0 K is absolute zero, the coldest possible temperature. Temperature also plays a key role in thermal expansion, where materials change size as they heat up or cool down.
  • Amount (n): the number of moles of gas. One mole equals about 6.022 × 10²³ particles.

Standard Temperature and Pressure (STP)

Scientists often compare gases under a set of standard conditions called STP. Under the older, commonly used definition, STP means a temperature of 273.15 K (0 °C) and a pressure of 1 atm. At these conditions, one mole of an ideal gas occupies about 22.414 liters. The updated IUPAC definition uses 1 bar instead of 1 atm, giving a molar volume of 22.711 liters. Both values appear in the reference table within the calculator.

Practical Uses

The ideal gas law is used in many real-world situations. Chemists use it to predict how much gas a reaction will produce. Engineers use it to design pressurized tanks and ventilation systems. Meteorologists rely on it to understand how air pressure and temperature affect weather. Even scuba divers depend on gas law calculations to plan safe dives. Whenever you need to relate the pressure, volume, temperature, or amount of a gas, this equation is the starting point.

When verifying your results or reporting experimental findings, you may need to calculate percent error to compare your measured values with theoretical predictions from the ideal gas law.


Formulas used

Ideal Gas Law
PV = nRT
Solve for Pressure
P = \frac{nRT}{V}
Solve for Volume
V = \frac{nRT}{P}
Solve for Temperature
T = \frac{PV}{nR}
Solve for Amount
n = \frac{PV}{RT}

Frequently asked questions

What is the ideal gas law formula?

The ideal gas law formula is PV = nRT. P is pressure, V is volume, n is the number of moles, R is the gas constant (8.314 J·mol⁻¹·K⁻¹), and T is temperature in Kelvin. If you know any three of these values, you can solve for the fourth.

How do I find the volume of one mole of gas at STP?

Set the calculator to solve for Volume. Enter Pressure as 1 atm, Temperature as 273.15 K, and Amount as 1 mol. Click Calculate, and you will get about 22.414 liters, which is the molar volume at the old STP definition.

What is the difference between STP and NTP?

STP (Standard Temperature and Pressure) uses 273.15 K (0 °C) and 1 atm. NTP (Normal Temperature and Pressure) uses 293.15 K (20 °C) and 1 atm. Because NTP has a higher temperature, the molar volume is larger: about 24.04 L/mol instead of 22.41 L/mol.

How do I solve for the number of moles?

Click the "Amount (n)" button under Solve For. Then enter the pressure, volume, and temperature of the gas. Click Calculate, and the tool will find how many moles of gas are present using the formula n = PV / RT.

Why does my answer change when I switch units?

The actual quantity stays the same. Only the number changes, because different units represent the same amount differently. For example, 1 atm equals 101,325 Pa. If you solve for pressure and switch from atm to Pa, the number gets much larger, but it represents the same pressure.