Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles or temperature with AI-powered step-by-step solutions
The Ideal Gas Law
The ideal gas law ties together the four state variables of a gas sample in one equation:
- тАФ pressure, in atm (or Pa, or kPa).
- тАФ volume, in litres (or m┬│).
- тАФ amount of gas, in moles.
- тАФ absolute temperature in kelvin, never ┬░C.
- тАФ the universal gas constant. Its numerical value depends entirely on the units you chose: with atm and litres, or with pascals and cubic metres.
What "ideal" assumes. The molecules are treated as point particles with no volume of their own and no attraction between them, colliding elastically. That is a good description at low pressure and high temperature тАФ roughly, ordinary room conditions for , or He, with errors under about 1%. Near condensation, or above a few tens of atmospheres, real gases deviate and a correction such as the van der Waals equation is needed.
Standard conditions. At STP (0 ┬░C = 273.15 K and 1 bar) one mole of an ideal gas occupies 22.71 L; under the older 1 atm definition it occupies 22.41 L.
Solving for Each Variable
Rearrangements
Procedure
- Write down the three known quantities with units.
- Convert: temperature to kelvin, pressure and volume to units matching your chosen (mL тЖТ L, kPa тЖТ atm by dividing by 101.325, mmHg тЖТ atm by dividing by 760).
- Substitute and evaluate, carrying units through so they cancel to the unit you expect.
- Check plausibility: a mole of gas near room conditions occupies roughly 24 L, so an answer of 0.02 L or 2000 L for one mole signals an arithmetic slip.
The combined gas law
When the amount of gas is fixed and only the conditions change, and cancel and you never need at all:
Boyle's Law ( constant), Charles's Law ( constant) and Gay-Lussac's Law ( constant) are each this equation with one variable held fixed.
Significant figures
The result carries the fewest significant figures of the inputs. Because is quoted to 5 figures it never limits the answer; a 3-figure pressure does.
Common Mistakes to Avoid
- Leaving temperature in Celsius. 27 ┬░C is 300.15 K, and using 27 makes the answer wrong by a factor of about 11.
- Mismatching with the units. Using with pressure in kPa, or volume in mL, is the single most common source of wrong answers. Pick the that matches your units, or convert the units to match .
- Confusing gauge and absolute pressure. in is absolute. A tyre gauge reading 2.0 atm means 3.0 atm absolute.
- Using the combined gas law when moles change. is valid only for a sealed, fixed amount of gas; if gas is added, removed or produced by a reaction, go back to for each state.
- Assuming 22.4 L per mole always. That molar volume belongs to one specific temperature and pressure, not to room conditions.
Examples
Frequently Asked Questions
R depends on the units. With pressure in atm and volume in litres, R = 0.082057 L┬╖atm/(mol┬╖K). In SI units (Pa and m┬│) R = 8.3145 J/(mol┬╖K). With kPa and litres it is 8.3145 L┬╖kPa/(mol┬╖K). The number changes; the physics does not.
At high pressure and low temperature. The model ignores molecular volume and intermolecular attraction, so it fails as molecules are squeezed close together or slowed near condensation. Below a few atmospheres and well above the boiling point, errors are usually under 1%.
PV = nRT describes one state of a gas and can find the number of moles. The combined gas law, P1V1/T1 = P2V2/T2, compares two states of the same sealed sample; n and R cancel, so it cannot give you moles but it also does not need R.
Find n = PV/(RT), then divide the measured mass by n: M = m/n = mRT/(PV). Equivalently, with density d = m/V, M = dRT/P. Both require the temperature in kelvin and a value of R matching your pressure and volume units.
Related Solvers
Try AI-Math for Free
Get step-by-step solutions to any math problem. Upload a photo or type your question.
Start Solving