Four numbers describe a gas: pressure, volume, amount, and temperature. Change one, and at least one other must change, because the ideal gas law ties them together in one equation: pressure times volume equals moles times a constant times temperature, PV equals nRT. This calculator solves that equation for whichever of the four you do not know, from the three you do. It is the single most used equation in gas problems, and it rewards careful units.
The constant R sets the units, and this tool uses R equals 0.082057 litre-atmospheres per mole-kelvin. That choice fixes the units: pressure in atmospheres, volume in litres, amount in moles, and temperature in kelvin. Temperature must be in kelvin, never in Celsius, because the law needs an absolute scale that starts at zero. A gas at 0 degrees Celsius is at 273.15 kelvin, and forgetting that conversion is the most common gas-law error in homework.
Here is a worked example. One mole of gas at 1 atmosphere and 273.15 kelvin fills 22.414 litres. Check it: nRT is 1 times 0.082057 times 273.15, which is 22.414, and dividing by pressure 1 leaves 22.414 litres. That number, 22.414 litres per mole at standard temperature and pressure, is worth memorising, because it lets you sanity-check many answers. If your answer for one mole at room conditions is far from 24 litres, something went wrong.
Solving for each variable is the same equation rearranged. Pressure is nRT divided by volume: squeeze a gas into half the volume and the pressure doubles. Volume is nRT divided by pressure: halve the pressure and the volume doubles. Moles are PV divided by RT: more pressure or volume at the same temperature means more gas. Temperature is PV divided by nR: heat a sealed container and the pressure climbs, which is why sealed cans warn against heating.
Units trip up even careful students. If a problem gives pressure in kilopascals or volume in millilitres, convert before you calculate: 101.325 kilopascals is 1 atmosphere, and 1,000 millilitres is 1 litre. If it gives temperature in Celsius, add 273.15 first. A quick unit check at the end helps too: pressure answers should be near 1 atmosphere for everyday conditions, and volume answers for a mole or two should be in tens of litres, not thousands.
The word ideal is a warning, not decoration. Real gases have molecules with size, and those molecules attract each other, so the law drifts off at high pressure, where molecules crowd together, and at low temperature, where attractions matter more. For school problems at near-room conditions, the error is small and the law is a fine tool. For industrial pressures or gases near liquefaction, engineers use corrected equations, and this calculator does not pretend otherwise.
Use this calculator as a practice aid for study and homework, not as engineering procedure. It is an educational estimator, and real pressure work follows safety rules, rated equipment, and trained supervision. Pressurised containers store serious energy, and no web tool can judge whether a vessel is safe. Check every result against a worked example in your textbook, and if a pressure answer looks large, stop and redo the units before anything else.
The combined gas law is the ideal gas law with moles held fixed, and it answers most everyday gas questions without R. Pressure times volume divided by temperature stays constant, so P1V1 over T1 equals P2V2 over T2, with temperature always in kelvin. A balloon that holds 2 litres at 300 kelvin and 1 atmosphere, taken to a place where the pressure is 0.5 atmospheres and the temperature is still 300 kelvin, expands to 4 litres, because halving the pressure doubles the volume. Standard conditions are worth pinning down too: older textbooks use 0 degrees Celsius and 1 atmosphere, giving 22.414 litres per mole, while newer ones use 25 degrees Celsius, giving about 24.8 litres, so always check which standard your question means.
