The ideal gas law: the pressure, volume, amount and temperature of a gas are tied together by a single equation — P·V = n·R·T. This free calculator solves for the pressure, the volume, the amount in moles or the temperature, in any unit, converts °C and °F to absolute kelvin automatically, and shows every step of the working.
The ideal gas law ties together the four state variables of a gas — its pressure P, its volume V, the amount of gas n in moles, and its absolute temperature T — through the single relationship P·V = n·R·T, where R = 8.314 J/(mol·K) is the universal gas constant. Fix any three of these and the fourth is determined. The law combines Boyle’s law (P ∝ 1/V at fixed T), Charles’s law (V ∝ T at fixed P) and Avogadro’s law (V ∝ n) into one compact equation that describes any gas remarkably well whenever its molecules are far apart.
There are three steps. First, decide what you want — the pressure, volume, moles or temperature — and pick it in the calculator’s Solve for menu. Second, enter the values you know: pressure in Pa, kPa, atm or bar; volume in m³, litres or millilitres; the amount in moles; and temperature in K, °C or °F. Third, read the answer with the worked steps, which show the rearranged formula, your numbers substituted in, and the result in SI units. Its two practical traps are both about units: temperature must be absolute, so the calculator converts °C and °F to kelvin for you, and pressure and volume must be scaled to match the gas constant, which it also handles.
Two relationships are worth feeling directly. At constant temperature, pressure and volume trade off inversely — squeeze a gas into half the volume and its pressure doubles. At constant pressure, volume rises in lockstep with absolute temperature — warm a balloon from 273 K to 546 K and it swells to twice its size. Because the temperature is absolute, going from 20 °C to 40 °C is not a doubling: it is 293 K to 313 K, a rise of only about 7%, which is exactly the sort of mistake working in kelvin avoids.
The ideal gas law rarely acts alone. In a heat engine it is the expanding working gas that does the useful work, and the law sets the pressures and volumes around the cycle — though the maximum efficiency is capped by the hot and cold reservoir temperatures, as the Carnot efficiency calculator shows. To find the heat needed to warm a substance once you know its temperature, see the specific heat calculator, or look up a term in the physics glossary.
Take one mole of gas at 0 °C (273.15 K) and 1 atm (101 325 Pa) — the calculator’s defaults — and solve for the volume. Rearranging gives V = nRT/P = (1 × 8.314 × 273.15) / 101 325 = 0.0224 m³ = 22.4 L, the classic molar volume of a gas at standard temperature and pressure. Now warm that gas to 100 °C (373.15 K) at the same pressure: the volume grows to V = (1 × 8.314 × 373.15) / 101 325 ≈ 0.0306 m³ = 30.6 L, an increase of about 37%, in direct proportion to the rise in absolute temperature from 273 K to 373 K.
The ideal gas law underpins engine and HVAC design, scuba diving and ballooning, chemistry stoichiometry, and weather and atmospheric modelling. Anywhere a gas is heated, compressed, or counted out in moles — from a car’s combustion cylinder to a weather balloon rising into thinner air — PV = nRT is the starting point for predicting how it behaves.
The ideal gas law, PV = nRT, links the four state variables of a gas: pressure P, volume V, the amount n in moles and the absolute temperature T, tied together by the universal gas constant R = 8.314 J/(mol·K). It combines Boyle’s law, Charles’s law and Avogadro’s law into a single equation, and describes any gas well when the molecules are far apart — that is, at low pressure and away from condensation.
PV = nRT only holds when T is the absolute temperature in kelvin, because the relationship is proportional: at T = 0 K the term nRT vanishes. Using °C or °F directly would make a 0° reading collapse the equation incorrectly. This calculator accepts °C and °F and converts them to kelvin for you (adding 273.15 to °C), so you can enter whatever unit your data uses.
Internally everything is SI: pressure in pascals and volume in cubic metres, with R = 8.314 J/(mol·K). You can enter pressure in Pa, kPa, atm (1 atm = 101 325 Pa) or bar (1 bar = 100 000 Pa), and volume in m³, litres or millilitres; the calculator scales each to SI before solving and reports the answer in SI units.
At standard temperature and pressure — 0 °C (273.15 K) and 1 atm (101 325 Pa) — one mole of an ideal gas occupies V = nRT/P = (1 × 8.314 × 273.15) / 101 325 ≈ 0.0224 m³, or 22.4 litres. This “molar volume” is the calculator’s default volume, and it is the same for any ideal gas regardless of its identity.
Real gases deviate from PV = nRT at high pressure and low temperature, where the molecules are crowded enough that their finite size and mutual attraction matter. Near the boiling point a gas may even condense. For those conditions a real-gas equation such as van der Waals’ adds correction terms, but for everyday pressures and temperatures the ideal gas law is accurate to within a few percent.