Measurement

Ideal Gas Law & Gas Laws Calculator

Calculate pressure, volume, moles, and temperature using PV = nRT, explore Boyle's and Charles's laws, and visualize real-time piston compression with animated thermal particle collisions.

Free to use No sign-up Runs in your browser

Tool workspace

Standard Real Gas Presets

101.3 kPa
22414 mL
28.01 g
0.0 °C
Pressure (P)1.000 atm
Gas Density (g/L)1.250 g/L
Root-Mean-Square Speed (v_rms)493 m/s
Temperature (°C)0.0 °C

Interactive Piston Cylinder & Microscopic Particles

Adjust temperature to see thermal particle motion accelerate; adjust volume to observe live piston movement and pressure gauge response.

22.4 L @ 1.00 atm
T = 273.1 K | v = 493 m/s

What is the Ideal Gas Law Calculator?

The Ideal Gas Law Calculator is an interactive physics and physical chemistry simulator based on the fundamental equation of state: PV = nRT. It interrelates the macroscopic state variables of a gas—pressure (P), volume (V), substance amount in moles (n), and absolute temperature in Kelvin (T). By coupling thermodynamic equations with kinetic molecular theory, it computes microscopic molecular velocities (v_rms), average translational kinetic energy, and gas densities across common gases like air, helium, nitrogen, and carbon dioxide.

How to Use the Calculator

  1. 1Select the target variable you wish to calculate: Pressure (P), Volume (V), Substance Moles (n), or Temperature (T).
  2. 2Click any real gas preset (such as Helium, Nitrogen, Oxygen, or CO2) to load its molecular molar mass.
  3. 3Input the known parameters using numeric fields or interactive sliders. The missing variable and kinetic metrics compute immediately in real time.
  4. 4Observe the animated piston cylinder to visualize how volume changes compress the gas and how temperature affects particle vibration and collision frequency.

Practical & Academic Applications

STP and Molar Volume Verification

Demonstrate that 1 mole of any ideal gas occupies 22.414 L at Standard Temperature and Pressure (0°C, 1 atm) and 24.465 L at 25°C.

Gas Cylinder Pressure and Safety Audits

Calculate internal cylinder pressure rises when storage containers are exposed to elevated environmental temperatures.

Kinetic Molecular Velocity Comparisons

Compare root-mean-square velocities of light gases like hydrogen (~1920 m/s) versus heavy gases like carbon dioxide (~410 m/s) at ambient temperature.

Frequently asked questions

What is the difference between STP and NTP?

STP (Standard Temperature and Pressure) is defined as 0°C (273.15 K) and 1 atm (101.325 kPa), where 1 mole of ideal gas occupies 22.414 L. NTP (Normal Temperature and Pressure) is 20°C (293.15 K) or 25°C (298.15 K) at 1 atm, yielding a molar volume of approximately 24.05 L or 24.47 L.

Why does molecular mass affect the speed of gas particles?

According to the Maxwell-Boltzmann distribution, all gas particles at the same temperature have the same average kinetic energy (Ek = 3/2 kB T = 1/2 m v^2). Consequently, lighter molecules (such as H2 or He) must move significantly faster than heavier molecules (such as N2 or CO2) to maintain the same kinetic energy.

When does a real gas deviate from ideal gas behavior?

Real gases deviate from the ideal gas law under very high pressures (where particle volumes become significant) and very low temperatures (where intermolecular attractive forces cause condensation).