Gas Laws Simulator
Change temperature, volume and particles to see pressure follow PV = nRT.
Pump gas into the box with the bicycle pump, drag the right wall to squeeze or expand it, and turn the heater or cooler up. Watch pressure, temperature and the speed histogram change. Hold one quantity constant to test Boyle's, Charles's or Gay-Lussac's law.
About the Gas Laws Simulator
Free interactive gas laws simulation. Change temperature, volume and number of particles and watch pressure respond. Explore Boyle's law, Charles's law and the ideal gas law. Built for chemistry, the gas laws simulator runs instantly in your browser: change a setting or drag an object and the result updates at once, so you learn by trying things out rather than only reading about them.
Change temperature, volume and particles to see pressure follow PV = nRT. Use it to explore chemistry ideas at your own pace, then check what you found against the key ideas further down this page.
How to use the Gas Laws Simulator
- Use the controls to change Pump species, Heater (+) / Cooler (−), Hold constant, Add or remove particles. The simulation reacts instantly.
- Pick an option such as Heavy (blue), Light (orange), Nothing, Volume to switch modes or load an example.
- Press "Add 10 particles", "Remove 10", "Reset gas" to start, reset or change what is happening.
- Where you see a glowing handle, object, weight or atom, drag it with your mouse or finger. Everything responds in real time.
- Watch the readouts and graphs update as you experiment, and compare what you see with the key ideas below.
Things to try
- Halve the volume and watch the pressure double.
- Hold pressure constant and raise the temperature.
- Add particles and watch the gauge climb.
- Compare the pressure at 200 K and 800 K.
Key ideas you can learn
- Boyle's law: at constant temperature, halving the volume doubles the pressure.
- Charles's law: at constant pressure, volume rises with temperature.
- Pressure comes from particles hitting the walls, so more particles or faster particles means more pressure.
Where this is used in the real world
Gas laws explain tyre pressure, scuba diving limits, weather balloons, aerosol cans and car engines. Chemists use them to convert between moles, volume and pressure.
Who is this simulation for?
Chemistry students from middle school to university, teachers who need a virtual demonstration, and anyone without access to a lab. It is safe, free and repeatable as many times as you like.
For teachers: project it on the board, let students predict what will happen, then run it together. For students: change one thing at a time and write down what changes.
Frequently asked questions
What is the ideal gas law?
PV = nRT relates pressure, volume, amount of gas and temperature. This simulator calculates pressure from the other three values.
Why does pressure go up when I heat the gas?
Hotter particles move faster, hit the walls harder and more often, so the pressure rises.
Is the Gas Laws Simulator free to use?
Yes. It is completely free, with no signup, no download and no ads inside the simulation. It runs in your web browser.
Does the Gas Laws Simulator work on a phone or tablet?
Yes. It uses touch as well as the mouse, so you can drag objects with your finger. A larger screen makes the controls easier to see.