Ideal Gas Law Calculator

Solve for any variable in the equation PV = nRT with automatic unit conversion.

mol

Calculation Result

Fill in the standard inputs
to solve for p

Equation Logic

P×V=nRT
Pressure is directly proportional to n and T, inversely to V.
Used R Constant
0.0821 L·atm/(mol·K)

The Equation of State

The Ideal Gas Law is the "Master Key" of gas chemistry. It unifies Boyle's, Charles's, and Avogadro's laws into one elegant equation that connects the physical properties of a gas to the amount of particles present.

The Holy Grail of Gases

PV = nRT

P
Pressure
Force of collisions
V
Volume
Space occupied
n
Moles
Particle count
T
Temp
Kinetic Energy

The Gas Constant (R)

The confusing part of the Ideal Gas Law is that "R" changes depending on what units you use. You must memorize these common values:

P UnitV UnitR Value
atmLiters0.08206
kPaLiters8.314
mmHgLiters62.36
Pa8.314

Ideal vs. Real

This law works perfectly for "Ideal Gases". But essentially all real gases (Oxygen, Nitrogen, CO2) act like Ideal Gases except under extreme conditions.

When it FAILS:

High Pressure: Particles are squished so close that their own size matters.
Low Temperature: Particles move so slow that they stick together (condense).

When it WORKS:

Standard Conditions: At room temperature and 1 atm pressure, the error is less than 1%.

Car Airbags

In a crash, a sensor ignites Sodium Azide ($NaN_3$). It decomposes instantly into $N_2$ gas. Engineers use PV=nRT to calculate exactly how many grams of $NaN_3$ are needed to fill the bag volume $V$ to pressure $P$ in milliseconds.

Weather Balloons

As a weather balloon rises, standard pressure $P$ drops. To compensate and keep the equation balanced, the volume $V$ must increase. The balloon expands until it eventually pops in the upper atmosphere.

Finding Molar Mass

Chemists use this law to identify unknown gases. By measuring the mass, pressure, volume, and temperature of a sample, they can calculate its Molar Mass ($g/mol$) and identify the substance.

Frequently Asked Questions

What is the Ideal Gas Law?

The Ideal Gas Law is the most important equation in gas thermodynamics. It combines Boyle's, Charles's, and Avogadro's laws into a single relationship: PV = nRT. It allows you to find any single variable if you know the other three.

What is 'R' (The Gas Constant)?

R is a proportionality constant that connects the units of Pressure, Volume, and Temperature. Its value changes depending on your units.

  • 0.0821 L·atm/(mol·K)
  • 8.314 J/(mol·K) or L·kPa/(mol·K)
  • 62.36 L·mmHg/(mol·K)
Why must Temperature be in Kelvin?

Gas laws are based on Absolute Temperature. 0°C is an arbitrary point (freezing water), but 0 Kelvin is Standard Zero (no molecular motion). If you used Celsius, you could divide by zero or get negative pressures, which is impossible.

What is an 'Ideal' Gas?

It's a theoretical model where we assume: 1) Gas particles take up zero volume (point masses). 2) Particles do not attract or repel each other (no intermolecular forces). Real gases behave 'ideally' at high temperatures and low pressures.

How do I calculate Moles (n)?

Algebraically rearrange the formula: n = PV / RT. This allows you to convert gas data into moles for stoichiometry problems.

How do I calculate Molar Mass?

Since moles (n) equals mass (m) divided by Molar Mass (M), we can substitute: PV = (m/M)RT. Rearranging gives: M = mRT / PV.

How do I calculate Gas Density?

Density (d) is mass/volume. Using the Molar Mass equation, we can derive d = PM / RT. This explains why hot air (high T) has lower density (low d) and rises.

What is STP?

Standard Temperature and Pressure. Modern IUPAC definition: 0°C (273.15 K) and 100 kPa (1 bar). At STP, 1 mole of any ideal gas occupies 22.7 Liters.

What if my gas is not ideal?

At very high pressures (like in a scuba tank) or very low temperatures (near condensation), gases deviate from the law. Scientists then use the Van der Waals Equation which adds corrections for particle volume and attraction.

Can I use Volume in mL?

Ideally, convert to Liters (L) because the constant 'R' is usually defined with Liters. If you use mL, you must ensure your 'R' value matches mL, or just divide by 1000 to get Liters.

Why does P increase if T increases?

Higher temperature means particles move faster (more kinetic energy). They hit the container walls harder and more often, which we measure as increased Pressure.

Is this used in car engines?

Yes! Engineers use it to model the pressure inside the cylinders. As the fuel burns, T spikes, causing P to spike (since particle count n also increases), forcing the piston down.

What is Avogadro's Law?

It is the 'n' part of PV=nRT. It states that Volume is directly proportional to moles (n). More gas = more space needed.

Can I mix units?

No! This is the most common error. If R uses atm, your pressure MUST be in atm. If R uses kPa, pressure must be kPa. Units must cancel out.

How does this relate to airbags?

Airbags work by rapidly generating nitrogen gas (increasing n). PV=nRT predicts exactly how much chemical is needed to fill the bag volume (V) to the correct hardness (P) at the reaction temperature (T).