DIY Cost Tools
Ideal Gas Law Calculator
Calculate the pressure predicted by the ideal gas equation from amount, absolute temperature and volume. Use kelvins rather than Celsius and litres for volume.
How to use this calculator
- Enter every quantity in the unit printed beside its field.
- Select Calculate or press Enter.
- Read the labeled results and compare them with the assumptions below.
Formula and method
P = nRT/V, with R = 0.082057366080960 L·atm·mol⁻¹·K⁻¹; 1 atm = 101.325 kPa.
The calculation runs locally in your browser. If any entry is invalid or a mathematical condition is undefined, the prior result is hidden so it cannot be mistaken for a new answer.
Worked example
Using Amount of gas (mol) = 1, Absolute temperature (K) = 298.15, Volume (L) = 24.465, the formula returns Pressure (atm) = 1.000016501, Pressure (kPa) = 101.326672. The displayed default result is generated from these same inputs.
Limitations and safety
Real gases can depart from ideal behavior, especially at high pressure, low temperature or near phase changes. Do not use this model for pressure-vessel design or hazardous-gas work. Results use floating-point arithmetic and are displayed to about 10 significant digits; measurement uncertainty usually supports fewer. Verify units before relying on a result.
Frequently asked questions
Can I enter Celsius?
No. Convert to kelvins first: K = °C + 273.15. Absolute temperature must be positive.
Why might a measured result differ?
The formula isolates the stated model. Real systems can add uncertainty, losses, changing properties, geometry or forces that are not among the inputs.
How should I handle units?
Convert every value to the unit shown beside its field before calculating. A numerically valid value in the wrong unit will still produce a wrong result.
Review notes and reference
Reviewed October 3, 2026. The default example and an independent edge or scaling case were checked against expected values. The live script was also checked for blank, text, comma-formatted, non-finite and out-of-range entries. Method reference. Constants use the values stated in the formula. This page’s explanation and example are original.
Related calculators
Science calculators · Gravitational Force Calculator · Projectile Motion Calculator · Free Fall Calculator · All calculators