Ideal Gas Law Calculator — Pressure, Volume, Amount of Substance and Temperature Solver
Calculate pressure, volume, amount of substance or temperature using the ideal gas equation and the three provided state variables.
Enter the known values and review the calculated result
Input parameters
Use consistent values and select the intended engineering units.
Ideal Gas State Variables
Additional Parameters
Results
Engineering Pro Save, document and continue this calculation
Turn this result into a reusable engineering record with saving, PDF export and reporting workflows.
Method, application and limitations
Review the calculation method, intended application and engineering assumptions before using the result in a design decision.
Formula and calculation method
pressure, volume, amount of substance and temperature formula:
P · V = n · R · T
Rearranged forms:
- P = (n · R · T) / V
- V = (n · R · T) / P
- n = (P · V) / (R · T)
- T = (P · V) / (n · R)
where:
- P — Pressure [Pa]
- V — Volume [m³]
- n — Amount of substance [mol]
- T — Temperature [K]
- R — Gas constant = 8.314462618 [J/(mol·K)]
When to use this calculator
When to use this calculator:
- Calculate missing gas pressure when volume, amount of substance and temperature are known.
- Calculate required gas volume from pressure, amount of substance and temperature.
- Calculate amount of substance from pressure, volume and temperature.
- Calculate absolute temperature from pressure, volume and amount of substance.
- Check the ideal gas equation residual after solving one missing state variable.
- Calculate molar volume, molar density and density when molar mass is provided.
How to interpret the result
The calculated state variable is defined as the missing value required to satisfy P · V = n · R · T.
The result depends on the three provided gas state variables. Increasing pressure increases calculated amount of substance when volume and temperature are fixed. Increasing volume increases calculated amount of substance when pressure and temperature are fixed. Increasing temperature decreases calculated amount of substance when pressure and volume are fixed.
- Safe — the ideal gas equation residual is not greater than 1e-5.
- Info — the ideal gas equation residual is greater than 1e-5 and not greater than 1e-3.
- Warning — the ideal gas equation residual is greater than 1e-3.
- Invalid — not exactly one state variable is empty, or at least one required positive input is missing, non-finite or not greater than zero.
The result is used to complete the gas state from pressure, volume, amount of substance and temperature.
Calculation example
Example:
A user wants to calculate the missing amount of substance for a gas state with known pressure, volume and temperature.
- P — Pressure = 101325 Pa
- V — Volume = 1 m³
- T — Temperature = 293.15 K
- n — Amount of substance = empty
n = (101325 · 1) / (8.314462618 · 293.15) = 41.57 mol
Assumptions and limitations
- The gas state is solved using P · V = n · R · T.
- Exactly one of pressure, volume, amount of substance or temperature must be empty.
- All provided pressure, volume, amount of substance and temperature values must be greater than zero.
- Molar mass is optional, but when provided it must be greater than zero.
- Density is calculated only when molar mass is provided.
