Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, amount or temperature with unit conversions (Pa, kPa, atm, mmHg, L, mL, °C, K) and the working shown. The combined gas law P₁V₁/T₁ = P₂V₂/T₂ and gas density or molar mass with ρ = PM/(RT) are supported too.
Try an example
e.g. 1.013×10⁵, 2.0e5, 5.0
Enter every quantity except the one you solve for. Scientific notation such as 1.013×10⁵ or 2.0e5 works.
Done
Ideal Gas Law Calculator
How to use
- 1
Choose the type of calculation
Select the ideal gas law (one state), the combined gas law (two states), or density and molar mass.
- 2
Enter every value except the unknown
Enter values with their units (Pa, L, °C and more). The field to solve for is disabled automatically.
- 3
Check the result and working
See the unit conversions, the substitution into the formula, and the result in additional units.
Features
- Solve PV = nRT for pressure, volume, amount or temperature
- Compare two states with the combined gas law P₁V₁/T₁ = P₂V₂/T₂
- Unit conversion for Pa, kPa, hPa, atm, mmHg, L, mL, m³, mol, mmol, °C and K
- Convert between gas density ρ and molar mass M (ρ = PM/RT, M = ρRT/P)
- Switch the gas constant R (8.31×10³ or 8.3×10³); input stays in your browser
Use cases
Check homework
Verify mole and gas-volume problems with the unit conversions and substitution shown.
Confirm unit conversions
See °C to K, mmHg to Pa and mL to L conversions in one place.
Lab and report calculations
Use measured density or molar mass with the ideal gas law.
Details
The ideal gas law PV = nRT relates pressure P, volume V, amount of substance n and temperature T. Use P in Pa, V in L, n in mol and T in kelvin. R is the gas constant; this tool uses 8.31×10³ Pa·L/(K·mol) by default (switchable to the 8.3×10³ used by some textbooks). The measured value is about 8.314×10³ Pa·L/(K·mol).
Temperature must be absolute: convert t °C with T = t + 273.15 (some textbooks use 273). Pressures convert with 1 atm = 1.013×10⁵ Pa and 760 mmHg = 1 atm. At standard conditions (0 °C, 1.013×10⁵ Pa) one mole of gas occupies about 22.4 L, which follows from V = 8.31×10³ × 273.15 ÷ (1.013×10⁵) ≈ 22.4 L.
For two states with an unchanged amount of gas, P₁V₁/T₁ = P₂V₂/T₂ (the combined gas law). At constant temperature PV is constant (Boyle's law); at constant pressure V/T is constant (Charles's law). Gas density is ρ = PM/(RT), so you can find density from molar mass or molar mass from density. Note 1 g/L = 1 kg/m³.
The calculation assumes an ideal gas. Real gases deviate at high pressure and low temperature because molecular volume and intermolecular forces matter; for example, nitrogen compressed to high pressure occupies less volume than PV = nRT predicts.
FAQ
What is the ideal gas law?
It relates pressure P, volume V, amount n and temperature T as PV = nRT, where R is the gas constant. It combines Boyle's law and Charles's law and holds for an ideal gas.
Can I enter a Celsius temperature directly?
No. T in the equation is absolute temperature in kelvin, so 27 °C becomes 300.15 K. Choose °C in this tool and it converts automatically, showing the +273.15 step.
Which value of R should I use?
With P in Pa and V in L, the standard choice is 8.31×10³ Pa·L/(K·mol). The measured value is about 8.314×10³, and some textbooks use 8.3×10³, which is why the tool lets you switch.
How do Boyle's and Charles's laws relate?
They are special cases. With a fixed amount of gas PV/T is constant; at constant temperature PV is constant (Boyle), and at constant pressure V/T is constant (Charles).
Why is 22.4 L the molar volume at standard conditions?
Substituting n = 1 mol, T = 273.15 K and P = 1.013×10⁵ Pa gives V = 8.31×10³ × 273.15 ÷ (1.013×10⁵) ≈ 22.4 L. That value only applies at standard conditions; change the temperature or pressure and the volume changes.
Does it work for real gases?
As an approximation, yes, but deviations grow at high pressure and low temperature. A van der Waals equation may be needed when molecular volume and intermolecular forces matter.
Related Tools
Moles & Molarity
Calculate molarity from moles and solution volume, or convert mass to moles with a supplied molar mass. View results in mol/L and mmol/L.
Significant Figures Calculator
Count significant figures, round to a chosen precision, and apply the multiplication/division or addition/subtraction rules. Switch between half-up and JIS Z 8401 half-even rounding; scientific notation is shown alongside.
Dilution Calculator
Find the required stock volume from stock concentration, target concentration and final solution volume using C₁V₁ = C₂V₂.
pH Calculator
Compute pH from hydrogen ion concentration or the reverse, in both directions. Accepts e-notation like 1e-7 and shows the substituted pH = −log₁₀[H⁺] working plus an acidic / neutral / basic classification based on 25 °C water.
All processing happens in your browser. Your files are never uploaded.
Verified: Textbook cases (1 mol at STP giving 22.4 L, 0.50 mol in 5.0 L at 27 °C giving 2.49×10⁵ Pa, Boyle's law 2.0 L giving 0.500 L, O₂ density giving 1.30 g/L, and 1.34 g/L giving a molar mass of 30.0 g/mol) plus error handling are covered by browser tests
Did you know?
The 22.4 L occupied by one mole of gas at standard conditions (0 °C, 1.013×10⁵ Pa) is also a way to check the gas constant: rearranging PV = nRT with V = 22.4 L, n = 1 mol, T = 273.15 K and P = 1.013×10⁵ Pa gives R ≈ 8.31×10³ Pa·L/(K·mol).