Ideal Gas Law Calculator

The ideal gas law calculator helps you solve for pressure, volume, temperature, or amount of substance using the Ideal Gas Law equation (PV = nRT) where R is the Gas Constant. See detailed explanations and worked examples below.

Calculate...

Formula

Enter Values

What is the Ideal Gas Law?

An ideal gas is a theoretical gas composed of randomly moving point particles that do not interact with each other. The Ideal Gas Law is the equation of state that describes the macroscopic behavior of such a gas [1].

It is expressed mathematically as $PV = nRT$, where pressure ($P$), volume ($V$), amount of substance ($n$), and absolute temperature ($T$) are related through the universal gas constant ($R$). This law serves as a foundational model in chemistry and physics, effectively combining Boyle's Law, Charles's Law, and Avogadro's Law into a single, comprehensive equation.

What is An Ideal Gas?

An ideal gas is a hypothetical gas that perfectly conforms to all the assumptions of the kinetic-molecular theory. While no real gas is perfectly ideal, many common gases (such as helium, nitrogen, and oxygen) approximate ideal behavior very closely under standard conditions of temperature and pressure [6].

Properties of an Ideal Gas

  • Negligible Molecular Volume: The particles (atoms or molecules) of an ideal gas are treated as point masses. This means their individual physical volume is assumed to be zero compared to the total volume of the container they occupy.
  • No Intermolecular Forces: Ideal gas particles exert no attractive or repulsive forces on one another. They move entirely independently, and their motion is only altered by direct collisions, not by long-range intermolecular interactions.
  • Perfectly Elastic Collisions: When ideal gas particles collide with each other or with the walls of their container, absolutely no kinetic energy is lost to friction or deformation. The total kinetic energy of the gas system remains constant unless the temperature is externally changed.
  • Continuous, Random Motion: The particles are in constant, random, straight-line motion until they collide with another particle or the container walls.

The Ideal Gas Law Equation (PV = nRT) Explained

The Ideal Gas Law equation relates four fundamental properties of a gas system through a universal constant. Each variable in the equation represents a measurable physical quantity with specific SI units [2].

$$PV = nRT$$
  • P = Pressure, measured in Pascals (Pa) in SI units
  • V = Volume, measured in cubic meters (m³) in SI units
  • n = Amount of substance, measured in moles (mol)
  • R = Universal gas constant, equal to 8.314462618 J/(mol·K) in SI units
  • T = Absolute temperature, measured in Kelvin (K)

The equation reveals inverse and direct relationships: pressure and volume are inversely proportional (if one increases, the other decreases at constant temperature), while temperature and amount of substance are directly proportional to both pressure and volume.

The Ideal Gas Constant (R) — Values and Units

The universal gas constant $R$ is a fundamental physical constant that appears in the Ideal Gas Law. While $R$ is the same constant regardless of units, its numerical value changes depending on which unit system you use for pressure, volume, and temperature [2].

Unit System Value of R Common Use Cases
SI Units 8.314462618 Pa·m³/(mol·K) Scientific calculations, engineering
Chemistry 0.082057 L·atm/(mol·K) Laboratory chemistry, gas law problems
Torr/mmHg 62.36 L·torr/(mol·K) Pressure measurements in mmHg or torr
Imperial 10.7316 ft³·psi/(lb-mol·°R) US engineering, imperial unit systems

Our calculator automatically recalculates $R$ based on your selected units, ensuring accurate calculations regardless of the unit system you choose.

How to Use the Ideal Gas Law Calculator

Using this calculator is straightforward and requires only three known values to solve for the fourth unknown variable.

Step 1: Select what you want to calculate by choosing one of the four radio buttons: Pressure (P), Volume (V), Temperature (T), or Amount of Substance (n).

Step 2: Enter the three known values in their respective input fields. The calculator accepts both periods and commas as decimal separators.

Step 3: Select the appropriate units for each variable from the dropdown menus. The calculator supports 29 different units across 4 categories, including both metric and imperial units.

Step 4: The result appears automatically in the output field. You can change the result unit at any time, and the calculator will convert the value instantly.

For advanced users, the collapsible Gas Constant (R) field allows you to view and manually adjust the R value if needed.

How to Calculate Using the Ideal Gas Law Equation

The following sections demonstrate how to solve for each variable in the Ideal Gas Law equation with detailed worked examples. Each example shows the complete calculation process from given values to final result.

Finding the Pressure (P) of an Ideal Gas

To calculate pressure, use the rearranged equation $P = \frac{nRT}{V}$. This formula applies when you know the amount of substance, temperature, and volume.

Example 1: Pressure of Gas in a Container

Calculate the pressure of 2 moles of gas at 25°C in a 10 L container.

  1. Given: $n = 2 \text{ mol}$, $T = 25°C = 298.15 \text{ K}$, $V = 10 \text{ L} = 0.01 \text{ m}^3$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $P = \frac{nRT}{V}$
  3. Calculation: $P = \frac{2 \times 8.314 \times 298.15}{0.01} = 495,900 \text{ Pa} = 495.9 \text{ kPa}$

The pressure is 495.9 kPa, or approximately 4.89 atm.

Example 2: Helium Gas Pressure

Find the pressure of 0.5 mol of helium at 300 K in a 5 L container.

  1. Given: $n = 0.5 \text{ mol}$, $T = 300 \text{ K}$, $V = 5 \text{ L} = 0.005 \text{ m}^3$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $P = \frac{nRT}{V}$
  3. Calculation: $P = \frac{0.5 \times 8.314 \times 300}{0.005} = 249,420 \text{ Pa} = 249.4 \text{ kPa}$

The pressure is 249.4 kPa, or approximately 2.46 atm.

Calculating an Ideal Gas Volume (V)

To calculate volume, use the rearranged equation $V = \frac{nRT}{P}$. This formula applies when you know the amount of substance, temperature, and pressure.

Example 1: Volume at STP

Calculate the volume of 1 mole of gas at 1 atm and 0°C (standard temperature and pressure).

  1. Given: $n = 1 \text{ mol}$, $T = 0°C = 273.15 \text{ K}$, $P = 1 \text{ atm} = 101,325 \text{ Pa}$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $V = \frac{nRT}{P}$
  3. Calculation: $V = \frac{1 \times 8.314 \times 273.15}{101,325} = 0.02241 \text{ m}^3 = 22.41 \text{ L}$

The volume is 22.41 L, which is the molar volume of an ideal gas at STP [1].

Example 2: Nitrogen Gas Volume

Find the volume of 3 moles of nitrogen at 2 atm and 298 K.

  1. Given: $n = 3 \text{ mol}$, $T = 298 \text{ K}$, $P = 2 \text{ atm} = 202,650 \text{ Pa}$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $V = \frac{nRT}{P}$
  3. Calculation: $V = \frac{3 \times 8.314 \times 298}{202,650} = 0.0367 \text{ m}^3 = 36.7 \text{ L}$

The volume is 36.7 L.

How to Find the Temperature (T) in Ideal Gas Equation

To calculate temperature, use the rearranged equation $T = \frac{PV}{nR}$. This formula applies when you know the pressure, volume, and amount of substance.

Example 1: Temperature from Known Conditions

Calculate the temperature of 1 mole of gas at 1 atm in a 22.4 L container.

  1. Given: $n = 1 \text{ mol}$, $P = 1 \text{ atm} = 101,325 \text{ Pa}$, $V = 22.4 \text{ L} = 0.0224 \text{ m}^3$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $T = \frac{PV}{nR}$
  3. Calculation: $T = \frac{101,325 \times 0.0224}{1 \times 8.314} = 273.1 \text{ K}$

The temperature is 273.1 K, or 0°C, confirming STP conditions.

Example 2: Gas Temperature Calculation

Find the temperature of 2 moles of gas at 100 kPa in a 50 L container.

  1. Given: $n = 2 \text{ mol}$, $P = 100 \text{ kPa} = 100,000 \text{ Pa}$, $V = 50 \text{ L} = 0.05 \text{ m}^3$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $T = \frac{PV}{nR}$
  3. Calculation: $T = \frac{100,000 \times 0.05}{2 \times 8.314} = 300.7 \text{ K}$

The temperature is 300.7 K, or 27.5°C.

How to Solve for Amount of Substance (Moles)

To calculate the amount of substance, use the rearranged equation $n = \frac{PV}{RT}$. This formula applies when you know the pressure, volume, and temperature.

Example 1: Moles from Gas Conditions

Calculate the moles of gas at 1 atm, 25°C, in a 10 L container.

  1. Given: $P = 1 \text{ atm} = 101,325 \text{ Pa}$, $V = 10 \text{ L} = 0.01 \text{ m}^3$, $T = 25°C = 298.15 \text{ K}$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $n = \frac{PV}{RT}$
  3. Calculation: $n = \frac{101,325 \times 0.01}{8.314 \times 298.15} = 0.409 \text{ mol}$

The amount of substance is 0.409 mol.

Example 2: Oxygen Moles at STP

Find the moles of oxygen at 101.325 kPa, 0°C, in a 22.4 L container.

  1. Given: $P = 101.325 \text{ kPa} = 101,325 \text{ Pa}$, $V = 22.4 \text{ L} = 0.0224 \text{ m}^3$, $T = 0°C = 273.15 \text{ K}$, $R = 8.314 \text{ J/(mol·K)}$
  2. Formula: $n = \frac{PV}{RT}$
  3. Calculation: $n = \frac{101,325 \times 0.0224}{8.314 \times 273.15} = 1.00 \text{ mol}$

The amount of substance is 1.00 mol, confirming the molar volume at STP.

Standard Temperature and Pressure (STP)

Standard Temperature and Pressure (STP) is a set of standard conditions used in chemistry and physics to allow comparison of gas properties. The definition of STP has changed over time, which affects the molar volume of ideal gases [1].

Definition Period Temperature Pressure Molar Volume
Pre-1982 (Traditional) 0°C (273.15 K) 1 atm (101.325 kPa) 22.414 L/mol
Post-1982 (IUPAC) 0°C (273.15 K) 100 kPa (1 bar) 22.711 L/mol

The International Union of Pure and Applied Chemistry (IUPAC) changed the STP pressure definition from 1 atm to 100 kPa (1 bar) in 1982. This change increased the molar volume from 22.414 L/mol to 22.711 L/mol. Many textbooks and older references still use the traditional definition, so it's important to know which standard applies to your calculations.

Ideal Gases vs Real Gases (When the Law Breaks Down)

The Ideal Gas Law is an approximation that works well under many conditions but fails when gases deviate significantly from ideal behavior. Understanding when to use the ideal gas law versus real gas corrections is crucial for accurate calculations [6].

Condition Ideal Gas Law Accuracy Recommended Approach
Low pressure & high temperature Excellent (>99% accurate) Use Ideal Gas Law
Moderate conditions Good (95-99% accurate) Use Ideal Gas Law with caution
High pressure & low temperature Poor (<90% accurate) Use van der Waals equation
Near critical point Very poor Use specialized equations of state

Real gases deviate from ideal behavior because gas molecules do have finite volume and do experience intermolecular forces. The van der Waals equation corrects for these effects by introducing two parameters: $a$ (intermolecular attraction) and $b$ (molecular volume). For most introductory chemistry and physics problems, the Ideal Gas Law provides sufficient accuracy.

Common Pressure Units

Pressure can be measured in many different units depending on the application and region. Understanding the relationships between these units is essential for accurate gas law calculations [2].

Unit Name Symbol Conversion to Pa Common Use Cases
Pascal Pa 1 SI unit, scientific calculations
Kilopascal kPa 1,000 Meteorology, engineering
Megapascal MPa 1,000,000 High-pressure systems
Atmosphere atm 101,325 Chemistry, gas law problems
Bar bar 100,000 Meteorology, engineering
Millibar mbar 100 Weather reports
Torr torr 133.322 Vacuum systems
Millimeter of mercury mmHg 133.322 Blood pressure, barometers
Pound per square inch psi 6,894.757 US engineering, tires
Inch of mercury inHg 3,386.389 Aviation, US weather

Common Volume Units

Volume units vary between metric and imperial systems. The liter is the most common unit in chemistry, while cubic meters are used in engineering applications.

Unit Name Symbol Conversion to m³ Common Use Cases
Cubic meter 1 SI unit, engineering
Liter L 0.001 Chemistry, everyday use
Milliliter mL 0.000001 Laboratory measurements
Cubic centimeter cm³ 0.000001 Small volumes, medicine
Cubic foot ft³ 0.0283168 HVAC, US engineering
Cubic inch in³ 0.0000163871 Small volumes, US
US gallon gal (US) 0.00378541 US liquid measurements
UK gallon gal (UK) 0.00454609 UK liquid measurements
Quart (US) qt 0.000946353 US liquid measurements
Pint (US) pt 0.000473176 US liquid measurements

Common Temperature Units

Temperature is unique among gas law variables because it requires an absolute scale. The Kelvin scale is the SI unit and is required for all gas law calculations.

Unit Name Symbol Conversion Formula Common Use Cases
Kelvin K Base unit SI unit, scientific calculations
Celsius °C K = °C + 273.15 Most common in chemistry
Fahrenheit °F K = (°F + 459.67) × 5/9 US everyday use
Rankine °R K = °R × 5/9 US engineering, thermodynamics

The Kelvin scale is an absolute temperature scale where 0 K represents absolute zero (the theoretical point where all molecular motion ceases). Celsius and Fahrenheit are relative scales that require conversion to Kelvin for gas law calculations.

Common Substance Amount Units

The mole is the SI unit for amount of substance and is defined as exactly 6.02214076 × 10²³ elementary entities (Avogadro's number) [5].

Unit Name Symbol Conversion to mol Common Use Cases
Mole mol 1 SI unit, chemistry
Millimole mmol 0.001 Laboratory measurements
Micromole μmol 0.000001 Trace amounts, biochemistry
Kilomole kmol 1,000 Industrial processes
Pound-mole lb-mol 453.59237 US engineering

Ideal Gas Law Calculator FAQ

When does the ideal gas law not work?

The ideal gas law becomes inaccurate at high pressures (typically above 10 atm) and low temperatures (near the condensation point of the gas). Under these conditions, gas molecules are close enough that their finite volume and intermolecular forces become significant, requiring real gas equations like the van der Waals equation.

What is STP (Standard Temperature and Pressure)?

STP is defined by IUPAC as 0°C (273.15 K) and 100 kPa (1 bar). Under these conditions, one mole of an ideal gas occupies 22.711 liters. The older traditional definition used 1 atm (101.325 kPa) instead of 100 kPa, giving a molar volume of 22.414 liters [1].

How do I convert Celsius to Kelvin?

Add 273.15 to the Celsius temperature. For example, 25°C = 25 + 273.15 = 298.15 K. This conversion is essential because the Ideal Gas Law requires absolute temperature in Kelvin.

What is the difference between ideal and real gases?

Ideal gases are theoretical constructs where molecules have no volume and no intermolecular forces. Real gases have finite molecular volume and experience attractive and repulsive forces. Real gases approximate ideal behavior at low pressure and high temperature [6].

Can I use this calculator with imperial units?

Yes, the calculator supports imperial units including psi for pressure, cubic feet and gallons for volume, and Fahrenheit and Rankine for temperature. The calculator automatically handles all unit conversions internally.

Why is temperature in Kelvin instead of Celsius?

The Ideal Gas Law requires absolute temperature because the equation is derived from kinetic theory, where temperature is proportional to the average kinetic energy of molecules. Zero Kelvin represents zero kinetic energy, while 0°C does not. Using Celsius would give incorrect results.

What is the molar volume of an ideal gas at STP?

At the current IUPAC STP definition (0°C, 100 kPa), the molar volume is 22.711 L/mol. At the traditional STP definition (0°C, 1 atm), the molar volume is 22.414 L/mol.

References and Authoritative Sources

The formulas, constants, and conversion factors presented on this page are based on established physical principles from authoritative sources:

  1. IUPAC Periodic Table and Gas Constant Values (International Union of Pure and Applied Chemistry)
  2. Fundamental Physical Constants (NIST)
  3. Equation of State (Ideal Gas) (NASA Glenn Research Center)
  4. Gas Constant and Unit Conversions (Engineering Toolbox)
  5. The Mole (NIST)
  6. Ideal Gas Law (HyperPhysics, Georgia State University)

All calculations performed by this calculator have been verified against established physics equations and standard conversion factors. The implementation uses IEEE 754 double-precision floating-point arithmetic to ensure numerical accuracy across all 29 supported unit conversions.