How to use the ideal gas law calculator
Choose which quantity you want to solve for: absolute pressure, volume, amount of gas in moles, or temperature. Enter the other three values and choose the units for pressure, volume and temperature. The unknown quantity is not used as an input, even if an old value remains stored in the form. This avoids the common mistake of applying an inconsistent gas constant to a mix of liters, atmospheres and degrees Celsius.
The ideal gas law describes a simplified gas whose molecules occupy negligible volume and do not attract or repel one another. It is a useful approximation for many dilute gases, but it is not a universal real-gas equation of state. The model becomes less reliable near condensation or at high pressure, where compressibility effects matter.
PV = nRT and the four rearrangements
The equation is pressure P multiplied by volume V equals the amount n in moles multiplied by the molar gas constant R and absolute temperature T. The four rearrangements are P = nRT/V, V = nRT/P, n = PV/(RT), and T = PV/(nR). The calculator uses R = 8.31446261815324 joules per mole per kelvin, with pressure converted to pascals and volume converted to cubic meters.
For pressure, one atmosphere equals 101,325 pascals and one bar equals 100,000 pascals. One liter equals 0.001 cubic meters. Celsius temperature must be increased by 273.15 to obtain kelvin; zero Celsius is not zero absolute temperature. Absolute pressure, rather than gauge pressure, belongs in the ideal gas law. If a pressure instrument shows gauge pressure, add the appropriate local atmospheric pressure before using the equation.
Worked example: one mole at standard conditions
At 0 °C, or 273.15 K, one mole of ideal gas at 101.325 kPa occupies approximately 22.414 liters. To check this, multiply 1 mol by 8.31446261815324 J/(mol·K) and 273.15 K, then divide by 101,325 Pa. The result is about 0.022414 cubic meters. Change the selected temperature unit to kelvin and enter 273.15 to obtain the same answer; the displayed numerical temperature changes but the underlying physical state does not.
Pressure, temperature and safety limits
Pressure and volume must be positive for this single-state gas model, and absolute temperature must be greater than zero kelvin. Negative Celsius temperatures are permitted as long as they remain above −273.15 °C. A gas cylinder can contain much more gas than its volume at ambient pressure suggests, but the ideal model should not be relied on for high-pressure vessel design, flammable gases or pressure-relief sizing.
For lab solutions, the molarity calculator relates dissolved moles to liquid volume, which is a different relationship. This page computes one ideal gas state locally in your browser; it does not identify a gas, model humidity, calculate phase transitions or transmit your inputs to a server.
Frequently asked questions
Can I enter degrees Celsius?
Yes. The calculator converts Celsius to kelvin internally and rejects temperatures at or below absolute zero.
Should I enter gauge or absolute pressure?
Use absolute pressure. Gauge pressure must be adjusted for the local atmospheric pressure.
Does PV = nRT work for every gas at every pressure?
No. It is an approximation that can deviate substantially for real gases at high pressure or near condensation.
Last updated: November 14, 2026