Skip to main content
chemistry

Ideal Gas Law Calculator

Calculate pressure, volume, moles, or temperature of an ideal gas using PV = nRT. Essential for chemistry, physics, engineering, and understanding gas behavior in real-world applications.

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. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Ideal Gas Law Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Ideal Gas Law Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Ideal Gas Law Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Ideal Gas Law Calculator when you need accurate results quickly without the risk of manual computation errors or unit conversion mistakes.
  • Use it to verify calculations made by hand or in spreadsheets — an independent check can catch errors before they lead to costly decisions.
  • Use it to explore how changing input parameters affects the output — a quick way to develop intuition and identify the most influential variables.
  • Use it when collaborating with others to ensure everyone is working from the same numbers and applying the same assumptions.

About This Calculator

The Ideal Gas Law Calculator is a free, browser-based calculation tool for engineers, students, and technical professionals. Calculate pressure, volume, moles, or temperature of an ideal gas using PV = nRT. Essential for chemistry, physics, engineering, and understanding gas behavior in real-world applications. It implements standard formulas and supports both metric (SI) and imperial unit systems with automatic unit conversion. All calculations are performed instantly in your browser with no data sent to a server. Use this calculator as a quick reference and sanity-check tool during design, analysis, and learning. Always verify results against primary engineering references and applicable standards for any safety-critical application.

About Ideal Gas Law Calculator

The Ideal Gas Law Calculator applies the fundamental equation PV = nRT to determine any property of a gas given the others. This law is the cornerstone of gas chemistry, describing how pressure, volume, temperature, and amount of gas relate in any situation. From calculating how much helium to fill a balloon, to understanding atmospheric pressure at altitude, to sizing industrial chemical reactors, the ideal gas law is essential. While no real gas is truly 'ideal', most gases follow this law closely enough at moderate temperatures and pressures to make it extremely useful in chemistry, physics, and engineering.

The Math Behind It

The ideal gas law is a single equation that combines three historical gas laws: Boyle's law (P·V = constant at constant T), Charles's law (V/T = constant at constant P), and Avogadro's law (V/n = constant at constant T and P). **The Formula**: PV = nRT Where: - **P** = Pressure (atm, Pa, torr, etc.) - **V** = Volume (L, m³) - **n** = Number of moles - **R** = Universal gas constant - **T** = Temperature in Kelvin (NEVER Celsius or Fahrenheit) **Values of R** (depending on units): - **0.08206 L·atm/(mol·K)** — for pressure in atmospheres and volume in liters - **8.314 J/(mol·K)** — for SI units (pressure in Pa, volume in m³) - **62.36 L·torr/(mol·K)** — for pressure in torr - **62.36 L·mmHg/(mol·K)** — same as torr **Why Temperature Must Be in Kelvin**: The ideal gas law assumes absolute temperature — where 0 represents no thermal motion. Celsius and Fahrenheit have arbitrary zero points. Using 0°C in the formula would give wrong (and sometimes negative) results for quantities that can't physically be negative. **Real Gas Deviations**: Ideal gas law is an approximation. Real gases deviate because: 1. **Molecules have volume** (ideal assumes point particles) 2. **Molecules attract each other** (ideal assumes no interactions) The van der Waals equation (P + a(n/V)²)(V - nb) = nRT corrects for these effects. Deviations are significant at: - **Low temperatures** (near liquefaction) - **High pressures** (molecules are crowded) - **Polar molecules** (strong intermolecular forces) At STP (standard temperature 273.15 K and pressure 1 atm), most common gases obey the ideal gas law within 1%. **STP and Molar Volume**: At Standard Temperature and Pressure (0°C or 273.15 K, and 1 atm): - **1 mole of any ideal gas = 22.4 liters** - This is called the 'molar volume' and is a useful reference **Applications**: 1. **Breathing Calculations**: Lung capacity, oxygen content, CO2 exchange 2. **Scuba Diving**: Pressure at depth (1 atm per 10 meters) × breathing volume 3. **Weather**: Atmospheric pressure, humidity calculations, cloud formation 4. **Industrial**: Gas reactor design, pipeline flow, fuel efficiency 5. **Aviation**: Jet engine performance, altitude effects on propulsion 6. **Automotive**: Engine combustion, tire pressure changes with temperature **Related Gas Laws** (derived from PV=nRT): - **Boyle's Law**: P₁V₁ = P₂V₂ (at constant T, n) — Pressure × Volume is constant - **Charles's Law**: V₁/T₁ = V₂/T₂ (at constant P, n) — Volume ÷ Temperature is constant - **Gay-Lussac's Law**: P₁/T₁ = P₂/T₂ (at constant V, n) - **Combined Gas Law**: P₁V₁/T₁ = P₂V₂/T₂ (at constant n) — useful when n doesn't change - **Dalton's Law of Partial Pressures**: P_total = P₁ + P₂ + P₃ + ... (for gas mixtures)

Formula Reference

Ideal Gas Law

PV = nRT

Variables: P = pressure, V = volume, n = moles, R = 0.08206 L·atm/(mol·K), T = temperature in Kelvin

Worked Examples

Example 1: Balloon at Standard Conditions

Calculate moles of gas in a 22.4 L balloon at 1 atm pressure and 273.15 K (0°C).

Step 1:Apply PV = nRT, solving for n
Step 2:n = PV / RT
Step 3:n = (1 × 22.4) / (0.08206 × 273.15)
Step 4:n = 22.4 / 22.41 ≈ 1.0 mol

Exactly 1 mole of gas — this is the molar volume at STP.

Example 2: Helium Balloon at Higher Temperature

A 5 L helium balloon at 1.2 atm and 300 K (room temperature).

Step 1:n = PV / RT
Step 2:n = (1.2 × 5) / (0.08206 × 300)
Step 3:n = 6 / 24.618
Step 4:n ≈ 0.244 mol
Step 5:Molecules: 0.244 × 6.022×10²³ ≈ 1.47×10²³

About 0.24 moles (1.46 grams) of helium, containing 147 billion billion molecules.

Common Mistakes & Tips

  • !Using Celsius instead of Kelvin. Always convert: K = °C + 273.15.
  • !Using wrong value of R for your units. 0.08206 L·atm/(mol·K) works with L and atm; 8.314 J/(mol·K) works with m³ and Pa.
  • !Applying ideal gas law to liquid or solid phases. It only works for gases.
  • !Using at extreme conditions. Near boiling/liquefaction, real gas corrections needed.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

Why is the ideal gas law called 'ideal'?

Because it assumes gas molecules are infinitely small (point particles) and don't interact with each other. No real gas meets these criteria exactly, but most gases at normal conditions (room temperature, atmospheric pressure) behave close enough to 'ideal' for the equation to work within a few percent accuracy.

Why must temperature be in Kelvin?

The ideal gas law assumes absolute temperature. Celsius has an arbitrary zero (water freezing), not based on molecular motion. Using Celsius would produce nonsensical negative values for quantities that can't be negative. Kelvin starts at absolute zero (-273.15°C), where molecular motion theoretically stops.

What conditions make real gases deviate most from ideal?

Real gases deviate most at low temperatures (approaching liquefaction), high pressures (molecules get close enough to interact), and for polar molecules with strong intermolecular forces. Noble gases behave most ideally because they have no intermolecular interactions.

Can I use the ideal gas law for gas mixtures?

Yes, with total pressure. Dalton's law of partial pressures says P_total = P₁ + P₂ + P₃ + ... You can apply PV = nRT to each gas separately (using its partial pressure and moles) or to the mixture as a whole (using total pressure and total moles). Both approaches give the same answer for ideal gases.