Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles or temperature.
Please note: Results use idealised models — point masses, no air resistance, ideal gases and uniform materials. Real experiments deviate. Use these for study and estimation, not for engineering sign-off.
What the Ideal Gas Law Calculator does
The ideal gas law combines Boyle’s, Charles’s and Avogadro’s laws into one relationship linking pressure, volume, amount and temperature. It holds well for real gases at ordinary pressures and temperatures well above their boiling point.
Formula
PV = nRTV = nRT ÷ PP = nRT ÷ Vn = PV ÷ RTR = 8.314462618 J/(mol·K)
Inputs explained
| Input | Unit | Required | Notes |
|---|---|---|---|
| Solve for | one of 4 options | Yes | — |
| Pressure | number | In some modes | Shown in 3 of the 4 modes. |
| Pressure unit | one of 7 options | In some modes | Shown in 3 of the 4 modes. |
| Volume | number | In some modes | Shown in 3 of the 4 modes. |
| Volume unit | one of 6 options | In some modes | Shown in 3 of the 4 modes. |
| Amount of gas | mol | In some modes | Accepts more than 0. Shown in 3 of the 4 modes. |
| Temperature | number | In some modes | Shown in 3 of the 4 modes. |
| Temperature unit | one of 3 options | In some modes | Shown in 3 of the 4 modes. |
| Molar mass | g/mol | Optional | Optional — gives the gas mass and density. Air is 28.96, oxygen 32.00, CO₂ 44.01. Accepts 0 or more. |
How to use it
- Choose Solve for.
- Fill in the remaining inputs the form shows for your choice.
- Optionally add Molar mass.
- Select Calculate.
Worked example
One mole of an ideal gas at 1 atm and 0 °C.
- Pressure
- 1 atm
- Moles
- 1
- Temperature
- 0 °C
V = 1 × 8.3145 × 273.15 ÷ 101,325 = 0.022414 m³, which is 22.414 litres — the classic molar volume at STP.
Frequently asked questions
Why must temperature be in kelvin?
Because the law is proportional to absolute temperature. Using Celsius would make a gas at 0 °C occupy zero volume, which is plainly wrong.
When does the ideal gas law fail?
At high pressure and low temperature, where molecules are close enough that their own volume and mutual attraction matter. Then equations like van der Waals are needed.