The ideal gas law, PV = nRT, ties a gas's pressure, volume, amount and absolute temperature together. Drag the sliders below to change the moles, temperature (in kelvin) and volume, and watch the pressure respond — with Boyle's, Charles's and Gay-Lussac's laws falling out when you hold one fixed.
The single line PV = nRT quietly holds Boyle's, Charles's and Gay-Lussac's laws inside it; each one surfaces the moment you freeze a quantity in place. This simulation seals a fixed sample of nitrogen and hands you three sliders — Amount of gas n in moles, Temperature T in kelvin, and Volume V in litres — then solves P = nRT/V live, printing the pressure P and the molar volume (V/n) beside a fixed constant R = 8.314 J/(mol·K).
Watch how P responds: it climbs as you add moles or raise temperature, and sinks as the volume opens up. The preset buttons lock one variable so a named law stands alone. Hold n and T and you get Boyle's law, with P proportional to 1/V — halve the volume, double the pressure. Hold n and P for Charles's law, V proportional to T; hold n and V for Gay-Lussac's law, P proportional to T.
One trap catches everyone: T is absolute temperature. Doubling it truly doubles the pressure only in kelvin — 200 K to 400 K works, but 20°C to 40°C does not, because those are really 293 K and 313 K, a rise of under ten percent. Remember this is the ideal model — point molecules with no forces — so real gases drift off at high pressure or low temperature. Put numbers to it in the ideal gas law calculator, or bend other equations by hand across our collection of physics playgrounds.
The ideal gas law, PV = nRT, links the pressure, volume, amount (in moles) and absolute temperature of a gas, with the gas constant R = 8.314 J/(mol·K). It rearranges to P = nRT/V.
Because the law uses absolute temperature. Doubling the temperature doubles the pressure only in kelvin (200 K to 400 K); it does not work in Celsius, since 20 °C to 40 °C is really 293 K to 313 K — a rise of under ten percent.
They are special cases of PV = nRT. Holding n and T gives Boyle's law (P inversely proportional to V); holding n and P gives Charles's law (V proportional to T); holding n and V gives Gay-Lussac's law (P proportional to T).
At high pressure or low temperature, near where it condenses to a liquid, because real molecules take up space and attract one another — effects the ideal model ignores.