Gas Laws Calculator (Boyle, Charles, Combined)
Two-state gas laws, partial pressures, gas over water and effusion — in any units.
The law through both states
Table
How it was worked out
About the Gas Laws Calculator (Boyle, Charles, Combined)
Solve the classic gas laws between a starting and a final state: Boyle’s law (P₁V₁ = P₂V₂), Charles’s law (V₁/T₁ = V₂/T₂), Gay-Lussac’s law (P₁/T₁ = P₂/T₂), Avogadro’s law (V₁/n₁ = V₂/n₂), the combined gas law and the general form with the amount of gas. Each value can have its own unit, temperatures in °C or °F are converted to kelvins automatically, and the result shows the rearranged equation, the substitution, a graph of the law through both states — and what you would have got by forgetting to convert to kelvins.
Three more tabs cover the rest of the topic: Dalton’s law of partial pressures from moles, partial pressures or mole fractions; gas collected over water, using the vapour pressure of water from the IAPWS equation instead of a rounded table; and Graham’s law of effusion for rate ratios, rates, effusion times and unknown molar masses.
How to use it
- Choose a tab: Two states (Boyle, Charles, Gay-Lussac, Avogadro, combined), Dalton, Over water or Graham.
- In Two states, pick the law and the quantity to solve for, then fill in the other values with their units.
- For Dalton’s law, add a row per gas and say whether you know moles, partial pressures or mole fractions; for gas over water, type the barometric pressure and the water temperature.
- Read the answer, the steps and any notes, and copy the result if you need it.
Examples
15.0 mL at 13.0 psi compressed to 7.5 mL
P₂ = 26 psi
OpenStax Chemistry 2e Example 9.8.
0.300 L of CO₂ at 10 °C warmed to 30 °C
V₂ = 0.3212 L (0.321 L)
OpenStax Example 9.6. Using 10 and 30 directly would give 0.9 L.
360 kPa at 24 °C heated to 50 °C
P₂ = 391.5 kPa (about 390 kPa)
OpenStax Example 9.5.
13.2 L at 153 atm and 300 K → 3.13 atm and 310 K
V₂ = 666.7 L
OpenStax Example 9.10.
2.83 mol O₂ and 8.41 mol N₂O at 192 kPa
X(O₂) = 0.252: 48.3 kPa O₂ and 143.7 kPa N₂O
OpenStax Example 9.15.
Argon collected over water at 26 °C, 750 torr
P(Ar) = 724.8 torr (water vapour 25.2 torr)
OpenStax Example 9.16: 725 torr.
Xe takes 243 s to effuse; how long for Ne?
95.27 s
OpenStax Example 9.21: 95.3 s.
Common uses
- Chemistry and physics homework on the gas laws, with the rearrangement and units explained.
- Lab reports: correcting a gas collected over water for water vapour and finding the moles collected.
- Everyday questions: tyre pressure in hot weather, a balloon taken to altitude, an aerosol can left in a car.
- Effusion and diffusion problems, including identifying a gas from its effusion rate.
The two-state gas laws
For a fixed amount of an ideal gas, PV/T stays constant, so P₁V₁/T₁ = P₂V₂/T₂ (the combined gas law). Holding one more quantity constant gives the named laws (OpenStax Chemistry 2e §9.2):
- Boyle’s law (constant T): P₁V₁ = P₂V₂ — halving the volume doubles the pressure.
- Charles’s law (constant P): V₁/T₁ = V₂/T₂ — volume is proportional to absolute temperature.
- Gay-Lussac’s (Amontons’s) law (constant V): P₁/T₁ = P₂/T₂.
- Avogadro’s law (constant P and T): V₁/n₁ = V₂/n₂.
When the amount of gas also changes, P₁V₁/(n₁T₁) = P₂V₂/(n₂T₂). Each value may use its own unit; the calculator converts them so they cancel properly.
Always use kelvins
The gas laws are proportional to absolute temperature, which starts at absolute zero (0 K = −273.15 °C). Celsius and Fahrenheit have arbitrary zeros, so 20 °C is not “twice as hot” as 10 °C: in kelvins it is 293.15 ÷ 283.15, only 3.5 % more. Forgetting to convert is the most common gas-law mistake — the result shows what the unconverted numbers would have given, so you can see the size of the error.
Dalton’s law and gas collected over water
In a mixture of gases each gas exerts its own partial pressure, and the total is their sum: P_total = P₁ + P₂ + … The partial pressure of each gas is its mole fraction times the total, P_i = X_i × P_total, with X_i = n_i ÷ n_total (OpenStax §9.3).
A gas collected by displacing water is saturated with water vapour, so the gas itself is at P_gas = P_total − P_H₂O. The vapour pressure of water comes from the international IAPWS equation for the saturation properties of water rather than a rounded table: 3.17 kPa (23.8 torr) at 25 °C, 12.35 kPa at 50 °C and 101.42 kPa at 100 °C.
Graham’s law of effusion
At the same temperature and pressure, the rate at which a gas escapes through a tiny hole is inversely proportional to the square root of its molar mass: rate₁ ÷ rate₂ = √(M₂ ÷ M₁) (OpenStax §9.4). For equal amounts, the effusion times go the other way, t₁ ÷ t₂ = √(M₁ ÷ M₂). Measuring how much faster an unknown gas effuses than a known one gives its molar mass: M = M_known ÷ (rate ratio)². Diffusion through another gas follows the same trend only roughly.
Sources
- OpenStax, Chemistry 2e: §9.2 (gas laws, Examples 9.5–9.10), §9.3 (Dalton’s law, gas collected over water, Examples 9.14–9.16) and §9.4 (Graham’s law, Examples 9.20–9.22).
- IAPWS SR1-86(1992), Revised Supplementary Release on Saturation Properties of Ordinary Water Substance (Wagner and Pruß), eq. (1): vapour pressure of water from 0 °C to the critical point, with the release’s check values.
- NIST SP 811 (2008), Appendix B.8: pressure and volume conversion factors; BIPM SI Brochure (2019): exact R = N_A·k.
Limitations
- All laws here assume ideal gases. At high pressures or near condensation, use the van der Waals tab of the ideal gas law calculator to see how large the error is.
- Gas collected over water is assumed to be saturated with water vapour at the water temperature, and the water levels inside and outside the vessel to be equal.
- Graham’s law describes effusion through a hole much smaller than the distance molecules travel between collisions; it applies to diffusion only approximately.
- Molar masses typed as formulas use IUPAC (CIAAW 2024) atomic weights.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
Which gas law should I use?
Look at what is held constant. Constant temperature: Boyle (P and V). Constant pressure: Charles (V and T). Constant volume: Gay-Lussac (P and T). Constant P and T: Avogadro (V and n). If P, V and T all change, use the combined gas law.
Do I have to convert pressure and volume units?
Not for the two-state laws, as long as both states use the same unit — the units cancel. If they differ (atm before, kPa after), they must be converted, which the calculator does for you. Temperature is the exception: it must always be in kelvins.
What happens to a balloon’s volume if the temperature doubles?
Only if the absolute temperature doubles does the volume double (at constant pressure). Going from 20 °C to 40 °C is 293.15 K to 313.15 K, which increases the volume by just 6.8 %.
How do I find the partial pressure of a gas?
Multiply its mole fraction by the total pressure. In air at 101.325 kPa, oxygen (20.95 % of the molecules) has a partial pressure of 0.2095 × 101.325 = 21.2 kPa.
Why subtract the vapour pressure of water?
Gas collected over water contains water vapour, which contributes its own partial pressure. Only the rest of the total pressure belongs to the gas you collected, so P_gas = P_atmosphere − P_water.
How much faster does hydrogen effuse than oxygen?
About four times: √(31.998 ÷ 2.016) = 3.98. A lighter molecule moves faster at the same temperature, so it escapes through a small hole more often.