How the Ideal Gas Law Works: PV = nRT
A visual guide to the ideal gas law: what pressure, volume, temperature, and moles mean, why PV = nRT, and how heating or compressing a gas changes it.
Quick Answer
The ideal gas law says PV = nRT: the pressure times the volume of a gas equals the amount in moles times the gas constant R times the absolute temperature. Rearranged, the pressure is P = nRT / V. For example, one mole of gas at 300 K in 25 litres sits near 100 kPa. Squeeze the volume or raise the temperature and the pressure climbs. Temperature must be in kelvin. Open this simulator, drag the piston or a slider, and watch the pressure and the gas particles respond live.
Open The Ideal Gas Law Simulator →How the Ideal Gas Law Works
The canvas draws a box of gas particles with a movable piston. The particles bounce around and strike the walls, and the sum of those collisions is the pressure. For example, that is why PV = nRT holds: more particles, faster particles, or a smaller box all increase the collision rate. Raise the temperature and the particles speed up; drag the piston in and they crowd together. Each change pushes the pressure in the direction the equation predicts.
Pressure, Volume, Temperature, and Amount
Four quantities describe the gas, and the ideal gas law links them.
- Pressure (P), in kilopascals: the force per area from particle collisions with the walls.
- Volume (V), in litres: the space the gas fills, set here by the piston.
- Temperature (T), in kelvin: how fast the particles move. It must be absolute, never celsius.
- Amount (n), in moles: how many particles there are, which sets how many the box holds.
Calculating Pressure and Volume
To calculate the pressure of a gas, rearrange to P = nRT / V: multiply the amount by the gas constant and the kelvin temperature, then divide by the volume. To find the volume from the ideal gas law instead, use V = nRT / P. For example, one mole at 300 K in 25 litres gives a pressure near 100 kPa, and doubling the temperature to 600 K doubles that pressure. The simulator does the arithmetic live as you move each slider.
Pressure vs Volume and Temperature
At a fixed temperature, pressure and volume are inversely related: halve the volume and the pressure doubles, tracing Boyle's law as a hyperbola. For example, a bike pump warms and stiffens as you push the piston in. At a fixed volume, pressure instead rises in step with the absolute temperature, which is why a sealed can heated in the sun can burst. Comparing high vs low temperature in the simulator shows the particles speeding up and the pressure climbing.
Common Mistakes
Related Tools
You May Also Need
You may also need
- Heat Transfer SimulatorShares the concept of temperature.
Next steps
- Heat Transfer SimulatorA closely related simulator to explore next.