/
/
CalculateYogi
  1. Home
  2. Science
  3. Ideal Gas Law Calculator
Science

Ideal Gas Law Calculator

Solve the ideal gas law PV = nRT for pressure, volume, moles, or temperature, with units (atm, kPa, L, mL, K, °C) and the steps.

Quick Examples

Pick an example, then enter your own values.

mol
g/mol
Made with love
SupportI build these free tools with love, late nights, and way too much coffee ☕ If this calculator helped you, a small donation would mean the world to me and help keep this site running. Thank you for your kindness! 💛

Related Calculators

You might also find these calculators useful

Molarity, Molality & Normality Calculator

Calculate solution concentrations for chemistry

Mole Converter Calculator

Convert between mass, moles, and number of particles

Percent Yield Calculator

Find percent, actual, or theoretical yield — plus theoretical from reactant

Significant Figures Calculator

Count significant figures and round numbers to a specified precision

What Is the Ideal Gas Law?

The ideal gas law, PV = nRT, ties together the four properties of a gas: pressure (P), volume (V), the amount in moles (n), and temperature (T), linked by the gas constant R. Know any three and you can solve for the fourth — which is exactly what this calculator does. Choose what to solve for, enter the other three values in whatever units you have (atmospheres, kilopascals, mmHg, liters, milliliters, Kelvin, Celsius, and more), and it returns the answer along with the full gas state, a pressure–volume curve, and the steps. It even gives the mass of the gas if you add a molar mass. Everything is converted to SI internally and solved with R = 8.314 J/(mol·K), so you never have to match R to your units.

How to Use PV = nRT

Rearrange PV = nRT to solve for the unknown: pressure P = nRT/V, volume V = nRT/P, moles n = PV/(RT), or temperature T = PV/(nR). The gas constant R depends on your units — it's 0.08206 L·atm/(mol·K) for atmospheres and liters, or 8.314 J/(mol·K) in SI (pascals and cubic meters). Temperature must always be absolute (Kelvin); convert Celsius by adding 273.15. A classic example is the molar volume at STP (standard temperature and pressure, 0 °C and 1 atm): for 1 mole, V = nRT/P = (1 × 0.08206 × 273.15) / 1 ≈ 22.4 liters — the well-known result that one mole of any ideal gas occupies about 22.4 L at STP. The law assumes gas particles have no volume and no intermolecular forces, so it's most accurate at low pressure and high temperature; real gases deviate under extreme conditions.

Ideal Gas Law

How to Use This Ideal Gas Law Calculator

1

2

3

4

5

6

Common Use Cases

Chemistry Homework

Solve PV = nRT problems with the full working shown.

Finding Moles of a Gas

Determine how many moles a gas sample contains from P, V, and T.

Gas at STP

Confirm the 22.4 L molar volume or work out volumes at other conditions.

Lab Gas Calculations

Find the pressure or volume of a gas collected in an experiment.

Gas Density & Mass

Get the mass of a gas from its moles and molar mass.

Exam Prep

Practice solving the ideal gas law for every variable and unit.

Why Use an Ideal Gas Law Calculator?

Solve for Any Variable

Find pressure, volume, moles, or temperature from the other three.

Any Units

Mix atm, kPa, mmHg, bar, liters, mL, Kelvin, or Celsius — conversions are handled for you.

No R Headaches

Everything is normalized to SI internally, so you never pick the wrong gas constant.

Gas Mass Too

Add a molar mass and it returns the mass of the gas, not just the moles.

Pressure–Volume Curve

See the inverse P–V relationship at constant temperature and amount.

Step-by-Step

Shows the rearranged formula and the working — great for homework.

Frequently Asked Questions

The ideal gas law is PV = nRT, relating a gas's pressure (P), volume (V), amount in moles (n), and absolute temperature (T) through the gas constant R. It describes how an ideal gas behaves and lets you solve for any one property given the other three.

Rearrange it for the unknown: P = nRT/V, V = nRT/P, n = PV/(RT), or T = PV/(nR). Make sure temperature is in Kelvin and that R matches your pressure and volume units — this calculator converts everything for you automatically.

R is the universal gas constant. Its value depends on units: 0.08206 L·atm/(mol·K) when using atmospheres and liters, or 8.314 J/(mol·K) in SI units (pascals and cubic meters). This tool uses 8.314 internally after converting your inputs to SI.

Use n = PV/(RT). Enter the pressure, volume, and temperature, set 'solve for' to moles, and the calculator returns the amount in moles. Add a molar mass and it also gives the mass.

About 22.4 liters. At standard temperature and pressure (0 °C and 1 atm), V = nRT/P = (1 × 0.08206 × 273.15) / 1 ≈ 22.414 L — the molar volume of an ideal gas at STP.

Pressure in atm, kPa, mmHg, bar, or Pa; volume in liters, milliliters, or cubic meters; and temperature in Kelvin, Celsius, or Fahrenheit. You can mix units freely — the calculator converts to SI before solving.

The math requires absolute temperature (Kelvin), but you can enter Celsius or Fahrenheit and the calculator converts it. Temperature must be above absolute zero (0 K, −273.15 °C), or the result is undefined.

It's an approximation that assumes gas molecules have no volume and don't attract each other. Real gases deviate at high pressure and low temperature, where those assumptions fail; equations like van der Waals give better results under those conditions.

CalculateYogi

The most comprehensive calculator web app. Free, fast, and accurate calculators for everyone.

Calculator Categories

  • Math
  • Finance
  • Health
  • Conversion
  • Date & Time
  • Statistics
  • Science
  • Engineering
  • Business
  • Everyday
  • Construction
  • Education
  • Technology
  • Food & Cooking
  • Sports
  • Climate & Environment
  • Agriculture & Ecology
  • Social Media
  • Other

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service

© 2026 CalculateYogi. All rights reserved.

Sitemap

Made with by the AppsYogi team