What is the Ideal Gas Law Calculator?
The ideal gas law PV = nRT relates pressure, volume, amount, and absolute temperature for gases at moderate conditions. Classroom calculations usually use R = 0.082057 L·atm/(mol·K) with P in atm, V in liters, and T in kelvin. Real gases deviate at high pressure or low temperature, but the ideal model is the standard starting point in general chemistry.
The Ideal Gas Law Calculator solves for whichever variable you leave blank and can estimate molar mass from gas density via M = dRT/P.
- Always convert temperature to kelvin for PV = nRT
- Keep P, V, R unit-consistent (tool converts atm/kPa/mmHg and L/mL)
- Molar mass from density: M = dRT/P with d in g/L
Formulas you will actually use
Ideal gas relations used here:
PV = nRT
R = 0.082057 L·atm/(mol·K)
T(K) = t(°C) + 273.15
M = dRT / P (d in g/L)Step-by-step example: Moles of gas at STP-like conditions
A sample occupies 22.4 L at 1.00 atm and 273.15 K. How many moles are present?
- n = PV/(RT) = (1.00 × 22.4) / (0.082057 × 273.15) ≈ 1.00 mol.
Enter P = 1.00 atm, V = 22.4 L, leave n blank, T = 273.15 K.
Frequently asked questions
Why must temperature be in kelvin?
Gas laws are proportional to absolute temperature. Zero on the Celsius scale is not zero thermal energy; 0 °C is 273.15 K.
Can I use this as an ideal gas density calculator?
Yes. Rearrange PV = nRT with n = m/M and density d = m/V to get M = dRT/P (d in g/L). Enter P, T, and density to estimate molar mass, or use the same relation to check a homework density from known M.
When does the ideal gas law fail?
At high pressures and low temperatures, attractions and molecular volume matter. Use van der Waals or tabulated compressibility for precise work; for homework STP/room-condition problems, PV = nRT is expected.
References & further reading
Standards bodies, university open courseware, and peer-reviewed references that align with the methods used on this page.
Keep learning with more calculators and study guides on Online Science Tools.