Ideal Gas Law Simulator (pV = nRT)
Move a piston, heat the gas and add more of it: watch the particles, the pressure and the graph respond together. Then solve pV = nRT step by step in SI units, and compare He, N₂ and CO₂ with ideal behaviour at high pressure and low temperature.
About this simulation
- What
- An interactive Chemistry simulation of Ideal Gas Law Simulator (pV = nRT).
- Who
- Designed for AP, IB, and A‑Level Chemistry students.
- How
- Runs in any modern browser — drag, adjust, and explore in real time.
Updated 2026-10-02
Key Concepts
The gas laws
At fixed amount, p ∝ 1/V (Boyle), V ∝ T (Charles) and p ∝ T (Gay-Lussac); at fixed p and T, V ∝ n (Avogadro). T must be in kelvin.
Ideal gas equation pV = nRT
With R = 8.314 J mol⁻¹ K⁻¹, use SI units: p in Pa, V in m³, T in K, n in mol. 1 dm³ = 10⁻³ m³; 1 kPa = 10³ Pa.
Kinetic model of pressure
Pressure is the force per unit area from molecules colliding with the walls. Hotter molecules move faster and hit more often and harder; at the same T all gases have the same mean kinetic energy.
Real gases and Z
Z = pV/nRT is 1 for an ideal gas. Molecular volume pushes Z above 1 at high pressure; intermolecular attraction pulls Z below 1, most strongly at low temperature.
Exam specification coverage
Understanding the Ideal Gas Law
The ideal gas equation, pV = nRT, links the pressure, volume, temperature and amount of any gas that behaves ideally. Hold two of the variables constant and it reduces to the classic gas laws: Boyle's law (p ∝ 1/V at constant n and T), Charles's law (V ∝ T at constant n and p), Gay-Lussac's law (p ∝ T at constant n and V) and Avogadro's law (V ∝ n at constant p and T). This simulator shows each relationship three ways at once: as moving particles, as live readings, and as a graph that plots every state you visit.
The particle model explains why. Pressure comes from molecules colliding with the walls of the container. Squeeze the gas into half the volume and each wall is hit twice as often. Heat it and the molecules move faster, so they hit more often and with more momentum. Temperature must always be in kelvin because the average kinetic energy of the molecules is proportional to the absolute temperature: at the same temperature, helium and xenon molecules have the same mean kinetic energy, so the lighter helium atoms move much faster.
In calculations, R = 8.314 J mol⁻¹ K⁻¹ only gives the right answer when every quantity is in SI units: pressure in pascals, volume in cubic metres and temperature in kelvin. The pV = nRT tab shows each conversion explicitly, which is where most exam marks are lost. Finally, the Real Gases tab uses the van der Waals model to show when the ideal gas law breaks down: at high pressure, where the volume of the molecules matters, and at low temperature, where intermolecular forces are significant.
Frequently Asked Questions
Related Simulations

Collision Theory Simulator
Understand how concentration, temperature, and catalysts affect the rate of chemical reactions through effective collisions and activation energy thresholds.

Intermolecular Forces Visualizer
Intermolecular Forces (IMFs) are the electrostatic attractions between neighboring molecules. This interactive lab compares the strength of Hydrogen Bonding, Dipole-Dipole, and London Dispersion Forces.

Stoichiometry Calculator
Stoichiometry is the calculation of reactants and products in chemical reactions. This tool visualizes the Limiting Reagent and how its depletion dictates the Theoretical Yield.