Solve the ideal gas law, pV = nRT, for any one of its four quantities. Enter any three of pressure, volume, amount of substance, and temperature — each with its own unit — and leave the one you want to find blank. The calculator uses the universal gas constant R = 8.31446 J/(mol·K).
The ideal gas law calculator works with the single most important equation in the study of gases, pV = nRT. This one relationship ties together the four properties that describe the state of a gas — its pressure (p), its volume (V), the amount of substance present in moles (n), and its temperature (T) — through the universal gas constant R. Enter any three of these quantities and the calculator instantly solves for the fourth. Because each field has its own unit menu, you can work in pascals or atmospheres, liters or cubic meters, kelvins or degrees Celsius, and the calculator handles all the conversions behind the scenes.
Whether you are a chemistry student checking a homework problem, a physics teacher preparing examples, or an engineer sizing a gas system, this tool removes the tedious algebra and unit juggling so you can focus on the result. It rearranges pV = nRT for whichever variable you leave blank and shows the calculation step by step.
The ideal gas law is an equation of state that describes how a hypothetical "ideal" gas behaves. An ideal gas is one whose particles take up no volume of their own and do not attract or repel one another — a simplification that real gases follow remarkably closely under ordinary conditions of temperature and pressure. The law is written as:
pV = nRT
Here p is the pressure of the gas, V is the volume it occupies, n is the number of moles of gas, R is the universal gas constant, and T is the absolute temperature. The equation says that the product of pressure and volume is directly proportional to the amount of gas and its temperature. Double the temperature (in kelvin) and, holding the amount and volume fixed, the pressure doubles too. Add more gas and, at fixed temperature and volume, the pressure rises in proportion.
The ideal gas law is a beautiful unification of several older, simpler gas laws that were discovered experimentally over the seventeenth, eighteenth, and nineteenth centuries. It captures all of them in a single compact statement.
The formula pV = nRT can be rearranged to solve for any of its variables:
p = nRT ÷ V
V = nRT ÷ p
n = pV ÷ (RT)
T = pV ÷ (nR)
The calculator applies whichever rearrangement matches the field you leave blank. The constant R is the universal (molar) gas constant, and this tool uses its exact modern value:
R = 8.31446261815324 J/(mol·K)
Because R is expressed in joules per mole per kelvin, the equation balances cleanly when pressure is in pascals, volume is in cubic meters, amount is in moles, and temperature is in kelvin. That combination of units is the SI standard for the ideal gas law. When you choose other units — atmospheres, liters, or degrees Celsius, for example — the calculator converts your entries to these SI units first, performs the calculation, and then presents the answer in the unit you selected for the unknown quantity.
Suppose you have 40 moles of a gas at a pressure of 1013 hPa (roughly one standard atmosphere) and a temperature of 250 K, and you want to find the volume it occupies. Leave the volume field blank and the calculator solves:
V = nRT ÷ p = (40 × 8.31446 × 250) ÷ 101300 = 0.82 m³
First the pressure is converted from hectopascals to pascals (1013 hPa = 101,300 Pa). Then the numbers are substituted into V = nRT/p, giving a volume of about 0.82 cubic meters, or 820 liters. This is exactly the default example loaded into the calculator, so you can press Calculate to see it worked out immediately. Change any value or unit and press Calculate again to explore how the volume responds — raising the temperature increases the volume, while raising the pressure squeezes it down.
The ideal gas law brings together four experimental laws, each of which describes how two of the gas properties relate when the others are held constant. Understanding them makes the combined law far more intuitive.
Multiply these proportionalities together and introduce the single constant R, and you arrive at pV = nRT. That is why the ideal gas law is so powerful: it is not a new idea, but the elegant combination of everything the earlier gas laws taught us.
One of the most common mistakes when using the ideal gas law is entering temperature in degrees Celsius or Fahrenheit as if it were an absolute scale. The law only works with an absolute temperature measured in kelvin, where zero represents the theoretical point at which molecular motion stops (absolute zero, −273.15 °C). If you plug in a Celsius value directly, doubling "temperature" from 10 °C to 20 °C would suggest the volume should double, which is simply wrong — in kelvin those temperatures are 283.15 K and 293.15 K, a change of less than 4%. This calculator lets you enter temperature in kelvin, Celsius, or Fahrenheit and converts to kelvin automatically, so you get the right answer no matter which scale you prefer. To convert by hand, add 273.15 to a Celsius reading to get kelvin.
The ideal gas law is dimensionally consistent only when the units of every quantity match the units of the gas constant R. With R in J/(mol·K), the natural unit set is:
You do not have to memorize any of these conversions to use the calculator — simply pick the units you have and it takes care of the rest — but knowing them helps you sanity-check the result. If you ever see an answer that looks a thousand times too big or too small, a unit mix-up between liters and cubic meters or between pascals and kilopascals is usually the culprit.
Scientists often quote gas properties at agreed reference conditions so that measurements can be compared fairly. The most common is standard temperature and pressure (STP). Under the older definition of STP — 0 °C (273.15 K) and 1 atmosphere — one mole of an ideal gas occupies about 22.414 liters, a figure known as the molar volume. You can verify it in this calculator by entering p = 1 atm, n = 1 mol, and T = 0 °C, then solving for the volume in liters. At the more relaxed "room" conditions of 25 °C and 1 atm, that molar volume grows to roughly 24.5 liters, which is where the handy "about 24 liters per mole" rule of thumb comes from. These benchmarks make excellent sanity checks: if the volume you calculate for a mole of gas is nowhere near 22 to 25 liters at everyday conditions, a unit or temperature-scale slip is the likely cause.
The ideal gas law is an approximation, and it is worth knowing where it breaks down. Real gases deviate from ideal behavior most noticeably at high pressures and low temperatures, conditions under which the molecules are pushed close together. In that regime the volume the molecules themselves occupy is no longer negligible, and the attractive forces between them — ignored by the ideal model — become significant. Near the point where a gas is about to condense into a liquid, the ideal gas law can be off by a wide margin. For most everyday situations, though — gases at around room temperature and atmospheric pressure — the law is accurate to within a few percent, which is why it remains the workhorse of introductory chemistry and physics. When higher accuracy is needed, scientists turn to more elaborate equations of state such as the van der Waals equation, which add correction terms for molecular size and intermolecular attraction.
It is pV = nRT, where p is pressure, V is volume, n is the amount of substance in moles, R is the universal gas constant, and T is the absolute temperature in kelvin.
It uses the exact modern value of the universal gas constant, R = 8.31446261815324 J/(mol·K), which is consistent with SI units of pascals, cubic meters, moles, and kelvin.
Yes. Enter any three of pressure, volume, amount, and temperature, and leave the fourth blank. The calculator rearranges pV = nRT and solves for whichever quantity you left empty.
No. Each field has a unit menu, so you can enter pressure in atmospheres, volume in liters, or temperature in Celsius. The calculator converts everything to SI internally and reports the answer in the unit you choose for the unknown.
The ideal gas law describes proportionality to absolute temperature, which starts at absolute zero. Only the kelvin scale measures from that point, so temperatures in Celsius or Fahrenheit must be converted to kelvin first. This calculator does that automatically.
For gases near room temperature and atmospheric pressure it is accurate to within a few percent. It becomes less reliable at very high pressures or very low temperatures, where real-gas effects matter and more detailed equations of state are needed.
This Ideal Gas Law Calculator is provided for educational and general informational purposes. It applies the idealized relationship pV = nRT, which approximates the behavior of real gases. Verify results independently for critical laboratory, engineering, or safety-related work.