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.
Whether you are studying for a chemistry test, checking homework answers, or solving gas law problems in a lab setting, this tool gives you accurate results in seconds. 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). If you need to work with pH and hydrogen ion concentrations alongside pressure calculations, our pH Calculator can help with related chemistry problems.
- 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 — often alongside calculations involving force and kinetic energy. 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, where understanding free fall and pressure changes at depth is critical. 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. For results involving very large or very small numbers — common in gas calculations — our scientific notation calculator can help you express values clearly and accurately.