# Graham's Law Calculator

> Applies Graham's law, rate1/rate2 = √(M2/M1), to two gases given by formula or molar mass, returning the effusion-rate ratio, the time ratio and the root-mean-square molecular speeds; alternatively solves the unknown molar mass of gas 2 from a measured rate ratio.

- Calculator id: `grahams-law` · Category: Chemistry (`chemistry`) · Tool name: `calculate_grahams_law`
- Canonical page: https://tttkmbb.com/chemistry/grahams-law · This document: https://tttkmbb.com/chemistry/grahams-law.md · JSON definition: https://tttkmbb.com/chemistry/grahams-law.json

## Purpose

Applies Graham's law, rate1/rate2 = √(M2/M1), to two gases given by formula or molar mass, returning the effusion-rate ratio, the time ratio and the root-mean-square molecular speeds; alternatively solves the unknown molar mass of gas 2 from a measured rate ratio.

**Use when:** You need how much faster one gas effuses or diffuses than another, the relative effusion times, or the molar mass of an unknown gas from its effusion rate relative to a known gas.

**Do not use when:** You need the absolute effusion rate through a specific orifice (depends on geometry and pressure), or the gases are at high pressure where mean free paths make diffusion non-ideal.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `gas_1_formula` | string |  | optional | Formula of gas 1, e.g. He, H2, O2, CO2, UF6 (case-sensitive symbols). Alternative to gas_1_molar_mass_g_mol. |
| `gas_1_molar_mass_g_mol` | number | g/mol | optional | Molar mass of gas 1, if no formula is given. (> 0, max 100000) |
| `gas_2_formula` | string |  | optional | Formula of gas 2. Leave both gas 2 inputs empty and give rate_ratio_1_to_2 to solve its molar mass. |
| `gas_2_molar_mass_g_mol` | number | g/mol | optional | Molar mass of gas 2, if no formula is given. (> 0, max 100000) |
| `rate_ratio_1_to_2` | number |  | optional | Measured effusion-rate ratio of gas 1 to gas 2 (equal to the time ratio t2/t1); used only to solve the molar mass of an unknown gas 2. (> 0) |
| `temperature` | number |  | optional, default 25 | Temperature for the root-mean-square speeds, in temperature_unit. |
| `temperature_unit` | enum: celsius \| kelvin |  | optional, default "celsius" | Unit of the temperature inputs; the calculation uses kelvin (K = °C + 273.15). |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `molar_mass_1_g_mol` | number | g/mol | M1 from the formula or as given. |
| `molar_mass_2_g_mol` | number | g/mol | M2 from the formula, as given, or solved from the rate ratio. |
| `rate_ratio_1_to_2` | number |  | √(M2 / M1): how many times faster gas 1 effuses than gas 2. |
| `time_ratio_1_to_2` | number |  | √(M1 / M2): time for gas 1 to effuse a given amount relative to gas 2. |
| `faster_gas` | string |  | The lighter gas effuses faster. |
| `rms_speed_1_m_s` | number | m/s | √(3RT/M1) at the given temperature. |
| `rms_speed_2_m_s` | number | m/s | √(3RT/M2) at the given temperature. |
| `temperature_k` | number | K | Temperature used for the speeds. |
| `solved_for` | string |  | rate_ratio_1_to_2 or molar_mass_2_g_mol. |

## Formula

`rate_1 / rate_2 = √(M2 / M1); t_1 / t_2 = √(M1 / M2); M2 = M1 × (rate_1 / rate_2)²; v_rms = √(3RT / M) with M in kg/mol and R = 8.314462618 J/(mol·K)`

Graham's law follows from equal average kinetic energy of ideal gases at the same temperature; it applies to effusion through a small hole and approximately to diffusion. Molar masses use IUPAC 2021 abridged atomic weights.

## Data Sources

- OpenStax Chemistry 2e – 9.4 Effusion and Diffusion of Gases — https://openstax.org/books/chemistry-2e/pages/9-4-effusion-and-diffusion-of-gases (textbook, retrieved 2026-09-24)
- Wikipedia – Graham's law — https://en.wikipedia.org/wiki/Graham%27s_law (reference, retrieved 2026-09-24)
- NIST – CODATA internationally recommended values of the fundamental physical constants (molar gas constant R = 8.314462618 J/(mol·K), exact) — https://physics.nist.gov/cuu/Constants/index.html (standard, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/grahams-law?`
- `POST https://tttkmbb.com/api/v1/calculate/grahams-law` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/grahams-law · OpenAPI operationId `calculate_grahams_law` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "grahams-law", "inputs": {…}}`

## Example

- Helium vs oxygen at 25 °C: inputs `{"gas_1_formula":"He","gas_2_formula":"O2"}` → `{"molar_mass_1_g_mol":4.003,"molar_mass_2_g_mol":31.998,"rate_ratio_1_to_2":2.8274,"time_ratio_1_to_2":0.3537,"faster_gas":"He","rms_speed_1_m_s":1363.1,"rms_speed_2_m_s":482.1,"solved_for":"rate_ratio_1_to_2"}`
- Unknown gas effusing 4 times slower than H2: inputs `{"gas_1_formula":"H2","rate_ratio_1_to_2":4}` → `{"molar_mass_2_g_mol":32.256,"rate_ratio_1_to_2":4,"time_ratio_1_to_2":0.25,"solved_for":"molar_mass_2_g_mol"}`

```
GET https://tttkmbb.com/api/v1/calculate/grahams-law?gas_1_formula=He&gas_2_formula=O2
```

## Limitations

You need the absolute effusion rate through a specific orifice (depends on geometry and pressure), or the gases are at high pressure where mean free paths make diffusion non-ideal. Graham's law follows from equal average kinetic energy of ideal gases at the same temperature; it applies to effusion through a small hole and approximately to diffusion. Molar masses use IUPAC 2021 abridged atomic weights. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Is the ratio the same for diffusion?**

Approximately. Graham's law is exact for effusion through a pinhole into vacuum; for diffusion through another gas it gives the right trend but collisions make real rates lower.

**I measured times, not rates. What do I enter?**

A gas that takes 3 times longer effuses 3 times slower, so rate_ratio_1_to_2 = t2 / t1. The output time_ratio_1_to_2 is the inverse of the rate ratio.

## Related

- [Molar Mass Calculator](https://tttkmbb.com/chemistry/molar-mass.md) — Molar mass of each gas from its formula.
- [Ideal Gas Law Calculator](https://tttkmbb.com/chemistry/ideal-gas-law.md) — Pressure, volume and moles of the gases.
