← Home

🔬 Ideal Gas Law Calculator

Solve the ideal gas equation PV = nRT for any unknown variable. Enter any three of pressure, volume, moles, or temperature and instantly get the fourth, with full unit conversion support.

What is this tool?

The ideal gas law is one of the most fundamental equations in thermodynamics and physical chemistry. It describes the relationship between four key properties of an ideal gas: pressure (P), volume (V), the number of moles (n), and temperature (T). The equation PV = nRT ties them together through the universal gas constant R. While no real gas behaves perfectly ideally, the law is accurate enough for most practical purposes at moderate pressures and temperatures well above the condensation point. PVT The concept of an ideal gas assumes that gas molecules occupy negligible space and exert no intermolecular forces on each other. In reality, molecules do have finite volume and they do attract or repel one another, but at low pressures and high temperatures these effects become negligible. This is why the ideal gas law works so well for gases like nitrogen, oxygen, hydrogen, and helium under standard laboratory conditions. This ideal gas law calculator lets you solve for any one of the four variables — pressure, volume, moles, or temperature — as long as you provide the other three. It handles unit conversions automatically, supporting atmospheres (atm), kilopascals (kPa), pascals (Pa), and millimeters of mercury (mmHg) for pressure; liters (L), milliliters (mL), and cubic meters (m³) for volume; and Kelvin (K) and degrees Celsius (°C) for temperature. The gas constant R = 0.08206 L·atm/(mol·K) is used internally for all calculations. Whether you are working on a chemistry homework problem, verifying a lab result, or exploring gas behavior in a physics course, this tool provides fast, reliable answers.

How it works

The ideal gas law calculator works by rearranging PV = nRT to isolate whichever variable is missing. If you need pressure, it computes P = nRT / V. For volume, V = nRT / P. For moles, n = PV / (RT). For temperature, T = PV / (nR). Before performing the calculation, all input values are converted to a consistent set of internal units: pressure in atmospheres (atm), volume in liters (L), and temperature in Kelvin (K). The gas constant used is R = 0.08206 L·atm/(mol·K). The table below shows the most commonly used values of the gas constant R in different unit systems:
R ValueUnitsTypical Use
0.08206L·atm/(mol·K)Chemistry (atm & L)
8.314J/(mol·K)SI units (Pa & m³)
8.314kPa·L/(mol·K)kPa & L
62.36L·mmHg/(mol·K)mmHg & L
1.987cal/(mol·K)Thermodynamics (calories)
The calculator validates inputs to prevent division by zero: temperature cannot be absolute zero when solving for P, V, or n; moles cannot be zero when solving for P or T; and pressure or volume cannot be zero when dividing. After computing the result, the tool converts the answer back into the unit you selected and displays all four values for a complete picture of the gas state.
Ad

How to use

  1. Enter any three of the four variables: pressure, volume, moles, and temperature.
  2. Select the appropriate units for pressure, volume, and temperature from the dropdowns.
  3. Leave the field you want to calculate blank.
  4. Click Calculate to solve for the unknown variable.
  5. Review the complete result showing all four values.

Frequently Asked Questions

What is the ideal gas law?

The ideal gas law is the equation PV = nRT, which relates the pressure (P), volume (V), number of moles (n), and temperature (T) of an ideal gas. R is the universal gas constant (0.08206 L·atm/(mol·K)). It is a cornerstone of thermodynamics and physical chemistry.

What value of R does this calculator use?

The calculator uses R = 0.08206 L·atm/(mol·K) internally and converts all inputs to atm, liters, and Kelvin before computing. The result is then converted back to whichever unit you selected. This ensures consistent, accurate results regardless of your input units.

What units are supported?

Pressure: atm, kPa, Pa, mmHg. Volume: L, mL, m³. Temperature: K, °C. Moles are entered directly in mol. The calculator handles all conversions automatically — just pick the unit from the dropdown next to each input field.

When does the ideal gas law fail?

The ideal gas law breaks down at very high pressures or very low temperatures near the gas condensation point, because real gas molecules have finite volume and intermolecular forces. Under such conditions, the van der Waals equation or other real gas models give more accurate results.

Can I use this for real gases?

Yes, for most practical purposes at moderate conditions (room temperature, atmospheric pressure), the ideal gas law is accurate to within a few percent for common gases like nitrogen, oxygen, hydrogen, and helium. For precision work or extreme conditions, use a real gas equation of state.

What is STP and how does it relate to the ideal gas law?

STP (Standard Temperature and Pressure) is defined as 0 °C (273.15 K) and 1 atm. At STP, one mole of an ideal gas occupies 22.4 liters. This molar volume is a useful reference point when checking your calculations.

Tips & Advice

Always convert temperature to Kelvin before using the ideal gas law. If your input is in Celsius, add 273.15 to get Kelvin; subtracting 273.15 converts back. Remember that the ideal gas law is an approximation — it works best at low pressures (a few atm or less) and high temperatures (well above the boiling point of the gas). For gases near their condensation point or at very high pressures, consider using the van der Waals equation for greater accuracy. When working with STP (Standard Temperature and Pressure, 0 °C and 1 atm), one mole of an ideal gas occupies 22.4 L — this is a handy check value. If your result is far from this at STP conditions, double-check your inputs.

Related Tools

Ad