Calculation details
Review the generated output before relying on it.
This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.
Use this result
Share the current inputs or ask ChatGPT to explain the calculation in context.
What does this calculator estimate?
A gas laws calculator solves the ideal gas law PV = nRT for whichever variable is missing. Enter three of pressure, volume, moles, and temperature (in °C) to find the fourth.
- PV = nRT with R = 0.08206 L·atm/(mol·K)
- K = °C + 273.15
- 1 mole at STP ≈ 22.4 L
What the ideal gas law describes
The ideal gas law ties together pressure, volume, temperature, and the amount of gas. It's an excellent approximation for most gases at ordinary pressures and temperatures — and the basis for predicting gas behavior in balloons, tanks, engines, and the atmosphere.
Limitations to watch for
Real gases deviate at high pressure and low temperature, where intermolecular forces and molecular volume matter (the van der Waals equation corrects for this). Temperature must be in kelvin — using °C directly breaks the equation.
How to use it in practice
Convert temperature to kelvin first. Use the tool to find a missing variable: gas released from a tank, volume at a new temperature, or moles from pressure and volume. For precision work, account for non-ideal behavior.
['Enter three of the four variables: P (atm), V (L), n (mol), T (°C).', 'Leave the unknown blank.', 'The tool converts °C to K and solves PV = nRT.']
The combined gas law
The combined gas law relates pressure, volume, and temperature: P1V1/T1 = P2V2/T2. A gas at 2 atm, 3 L, and 300 K moving to 1 atm and 350 K occupies about 7 L. The calculator solves for any variable with temperature in kelvin.
Why kelvin
Gas laws require absolute temperature — kelvin, not Celsius. Room temperature is about 293 K, not 20. Using Celsius produces negative-volume nonsense at low temperatures. The calculator converts so the equation is applied correctly.
When the law applies
The combined law holds for ideal gases at moderate pressures and temperatures. Real gases deviate at high pressure and near condensation — the calculator is the ideal-gas approximation, which is accurate for most practical problems.
A worked example
A tire at 30 psi and 20°C (293 K) warms to 40°C (313 K) at constant volume: pressure rises to about 32 psi. The calculator shows the temperature-pressure relationship behind tire-pressure warnings.
Isolated cases
Boyle's law (constant T): P1V1 = P2V2. Charles's law (constant P): V1/T1 = V2/T2. The combined calculator handles the general case, which reduces to these when one variable is held fixed.
How this calculator works
Formula
Ideal gas law: PV = nRT, where P is pressure (atm), V volume (L), n moles, R = 0.08206 L·atm/(mol·K), and T is temperature in kelvin (K = °C + 273.15). Given any three of P, V, n, T, the fourth is solved.
Worked example
2.0 moles of gas at 2.0 atm and 25°C (298.15 K): V = nRT ÷ P = 2.0 × 0.08206 × 298.15 ÷ 2.0 ≈ 24.47 L. At 1 atm and 0°C, one mole occupies 22.41 L (molar volume).
Assumptions to verify
- The gas behaves ideally (low pressure, moderate temperature).
- R = 0.08206 L·atm/(mol·K) is used.
- Temperature is entered in °C and converted to kelvin.
Frequently asked questions
What is the ideal gas law?
PV = nRT — pressure × volume equals moles × gas constant × temperature. It relates the four state variables of an ideal gas.
What is R?
The ideal gas constant, 0.08206 L·atm/(mol·K) when using liters, atmospheres, moles, and kelvin.
Why must temperature be in kelvin?
Because the kelvin scale starts at absolute zero, where gas volume would theoretically be zero. Celsius values would give nonsense results in the equation.
What is molar volume at STP?
At 0°C (273.15 K) and 1 atm, one mole of an ideal gas occupies 22.41 L.
When does the ideal gas law fail?
At high pressures and low temperatures, where molecules interact and occupy volume. Real gases follow the van der Waals equation more closely.
What is STP?
Standard temperature and pressure: 0°C and 1 atm (or 1 bar in some conventions). It's a reference point for gas measurements.
Can I use this for real gases?
Yes, as a close approximation under ordinary conditions — air, oxygen, nitrogen, and many industrial gases behave nearly ideally.
What is the combined gas law?
P1V1/T1 = P2V2/T2 — pressure, volume, and temperature in one equation.
Why kelvin?
Gas laws are linear only in absolute temperature — Celsius breaks the math.
Does it apply to real gases?
Approximately — ideal-gas behavior holds at moderate pressure and temperature.
Why do tire pressures rise when hot?
Temperature increases pressure at constant volume: 20°C→40°C raises ~30 psi to ~32 psi.
Cite this tool
BoringToolsKit. “Gas Laws Calculator.” boringtoolskit.com/gas-laws-calculator/ (reviewed 2026-08-25). Free to reference in articles, syllabi, and answer posts with a link.
Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.