Skip to main content
engineering

Ideal Gas Law Calculator

Solve for P, V, n, or T using PV = nRT with unit conversions for pressure, volume, and temperature

Reviewed by Christopher FloiedUpdated

This free online ideal gas law calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Supports both metric (SI) and imperial units with built-in unit selection dropdowns on every input field, so you can work in whatever units your problem provides. Designed for engineering students and professionals working through coursework, design projects, or quick reference calculations.

Ideal Gas Law Calculator

PV = nRT  |  R = 8.314 J/(mol·K)

Solving for: Pressure

Use mass-based (PV = mRT/M)
mol

Pressure P

101383 Pa

Formula

P = nRT/V = 1.0000 × 8.314 × 273.15 / 2.2400e-2

= 101383 Pa

How to Use This Calculator

1

Select the unknown

Choose which variable you want to solve for: Pressure (P), Volume (V), Amount (n), or Temperature (T).

2

Enter the known values

Fill in the three known quantities with their units. Use the dropdowns to select appropriate units for each field.

3

Read the result

The calculator applies PV = nRT and displays the unknown value in your selected output unit.

Formula Reference

Ideal Gas Law

PV = nRT

Variables: P = pressure, V = volume, n = moles of gas, R = universal gas constant (8.314 J/mol·K), T = absolute temperature

When to Use This Calculator

  • Use the Ideal Gas Law Calculator when solving homework or exam problems that require quick numerical verification of your hand calculations — instant feedback helps identify arithmetic errors before they propagate.
  • Use it during the early design phase to rapidly iterate on parameters and narrow down feasible configurations before committing time to detailed finite element simulations or full design packages.
  • Use it when reviewing a colleague's calculation or checking a vendor's data sheet for plausibility — a quick sanity check can prevent costly downstream errors.
  • Use it to generate reference data for a technical report or presentation without manual computation, ensuring consistent, reproducible numbers throughout the document.
  • Use it in the field when a quick estimate is needed and a full engineering software package is not available.

About This Calculator

The Ideal Gas Law calculator solves for pressure (P), volume (V), moles (n), or temperature (T) using the equation PV = nRT, where R is the universal gas constant (8.314 J/mol·K). This fundamental equation in thermodynamics and chemistry describes the behavior of an ideal gas — one where intermolecular forces and molecular volume are negligible. The ideal gas law applies accurately to real gases at low pressures and high temperatures. It is widely used in chemistry, physics, and chemical engineering for calculations involving gas mixtures, reaction stoichiometry, and process design.

The Theory Behind It

The ideal gas law PV = nRT is the equation of state for a hypothetical gas whose molecules have negligible volume and no intermolecular forces. P is the absolute pressure, V is the volume, n is the number of moles, R is the universal gas constant (8.314 J/(mol·K) or 0.08206 L·atm/(mol·K)), and T is the absolute temperature in Kelvin. The law is a combination of three earlier empirical gas laws: Boyle's law (PV = const at constant T and n), Charles's law (V/T = const at constant P and n), and Avogadro's law (V/n = const at constant P and T). Together these unify into the ideal gas law, which is exact for a 'perfect' gas and accurate to within a few percent for real gases at conditions far from the liquefaction temperature and critical pressure. Real gases deviate from ideal behavior at high pressures (where molecular volumes matter) and low temperatures near saturation (where intermolecular attractions matter). The ideal gas law is often written in alternative forms: pV = mRT (where R is the specific gas constant R_universal/M, with M the molecular weight), or ρ = pM/(RT) (density from pressure, temperature, and molecular weight). Air at sea level (101.325 kPa, 15°C) has density 1.225 kg/m³ by the ideal gas law — which is accurate to about 0.1% at these conditions. For HVAC and building engineering, the ideal gas law is the standard for computing air density, airflow mass rates, and ventilation calculations. For combustion engineering, the reactant and product mixtures are treated as ideal gases for stoichiometry and heat release calculations. For cryogenic engineering (temperatures below 100 K) or high-pressure applications (above 5 MPa), real-gas equations of state (van der Waals, Redlich-Kwong, Peng-Robinson) are used for accuracy.

Real-World Applications

  • HVAC load calculation: compute air mass flow from volumetric flow, temperature, and pressure using ρ = pM/(RT). Heating and cooling loads depend on mass flow (not volume), so density correction is essential for accurate sizing.
  • Tire pressure and volume changes with temperature: using P₁V₁/T₁ = P₂V₂/T₂, estimate how tire pressure changes with ambient temperature. A tire at 32 psi and 70°F drops to about 29 psi at 20°F (assuming rigid tire, no expansion).
  • Chemistry stoichiometry: compute the volume of gas produced or consumed in a chemical reaction at specified P and T. A mole of ideal gas occupies 22.4 L at STP (0°C, 1 atm) or 24.5 L at NTP (25°C, 1 atm).
  • Balloon and airship design: compute the volume of gas needed to generate a given buoyancy force. Hot air balloons heat the air inside to reduce density (ρ = pM/RT with higher T), reducing weight relative to the displaced ambient air.
  • Diving and scuba: gas consumption at depth is much higher than at surface because pressure is higher. A diver breathing at 4 bar (30 m depth) uses 4× the mass flow of surface breathing for the same volume of lung ventilation.

Frequently Asked Questions

What is the ideal gas law?

PV = nRT, where P is absolute pressure, V is volume, n is number of moles, R is the gas constant (8.314 J/(mol·K)), and T is absolute temperature in Kelvin. This equation describes the relationship between pressure, volume, temperature, and amount of gas for an 'ideal' gas — a model assumption where molecules have no volume and no intermolecular forces. Real gases obey the ideal gas law accurately under moderate conditions (not near saturation, not at very high pressures).

When does the ideal gas law fail?

At high pressures (typically above 5-10 MPa), molecular volume becomes significant compared to the free volume, and the law predicts smaller V than actual. At low temperatures near the saturation line, intermolecular attractions become significant, causing larger density than predicted. Near the critical point, both effects matter strongly and real-gas equations of state (van der Waals, Peng-Robinson, Redlich-Kwong) are needed. For air, steam, and natural gas at typical engineering conditions (below 2 MPa, above 100°C for steam), ideal gas is usually within 1-5%.

What is the value of the gas constant R?

R = 8.314 J/(mol·K) in SI. Other common forms: 0.08206 L·atm/(mol·K), 8.314 kPa·L/(mol·K), 1545 ft·lbf/(lbmol·°R). The 'specific' gas constant for a particular gas is R_specific = R/M, where M is the molecular weight. For air (M = 28.97 g/mol), R_air = 8.314/0.02897 = 287 J/(kg·K). Using specific R allows the law to be written in mass form: pV = mR_specific·T.

Why must temperature be in Kelvin?

The ideal gas law is derived from kinetic theory, which relates pressure to the average kinetic energy of molecules. Kinetic energy is proportional to ABSOLUTE temperature (K or °R). If you use Celsius or Fahrenheit, the law gives wrong results because the zero point is arbitrary. Always convert temperature to Kelvin (K = °C + 273.15) or Rankine (°R = °F + 459.67) before using the ideal gas law.

How is density computed from the ideal gas law?

Rearrange PV = nRT using n = m/M (where m is mass and M is molecular weight) to get PV = (m/M)RT, or ρ = m/V = PM/(RT). For air at 101.325 kPa and 15°C (288.15 K) with M = 0.02897 kg/mol: ρ = 101325 × 0.02897 / (8.314 × 288.15) = 1.225 kg/m³. This is the standard-atmosphere density commonly used in aerospace and meteorology.

Related Calculators

References & Further Reading

Wikipedia

Standards & Organizations

Industry References