ForHosting KIT · Science

Graham's law calculator

Hydrogen at 2 g/mol effuses four times as fast as oxygen at 32 g/mol, because rates scale with one over the square root of molar mass. Enter two molar masses in the same unit and get both rate ratios, step by step. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
M1
2
M2
32
You get
Mass ratio
16
Rate ratio
4
Rate1 over rate2
4
Rate2 over rate1
0.25

A Graham's law effusion rate ratio calculator turns two molar masses into the relative speed at which the gases escape through a tiny hole. Ideal-gas classroom problems, isotope enrichment intuition, and coding kata expected values all need that same inverse-square-root of mass rule without opening a kinetic-theory simulator.

What Graham's law says about effusion rates

Graham's law of effusion states that the rate at which a gas escapes through a pinhole is inversely proportional to the square root of its molar mass when temperature is the same for both species. Comparing two gases at the same conditions cancels constants and yields a simple ratio: rate of gas one over rate of gas two equals the square root of M two over M one.

Lighter molecules move faster on average at a fixed temperature, so they effuse more quickly; hydrogen with molar mass about two grams per mole effuses four times as fast as oxygen at thirty-two grams per mole because the square root of thirty-two over two is four. The same formula is often taught for relative rates of diffusion through a porous barrier, though the microscopic mechanism differs; for homework the inverse-square-root ratio is what graders expect.

Teachers and automated checkers care about the zero-mass rejection as much as the happy path: a student who sets M1 to zero has left the domain of the square-root ratio, and inventing infinity would hide that mistake. The check path recomputes M2 over M1 and its square root with the same fixed twelve-decimal rounding used for published fields, so a successful response always ships with steps you can assert in tests or worksheets.

Molar-mass units are caller-chosen and consistent—grams per mole or kilograms per mole both work as long as M1 and M2 share the same unit—because only the mass ratio enters the square root.

Practical tips, limits, and related searches

Keep both molar masses inside the published absolute range so the ratio M2 over M1 cannot produce a non-finite square root that the solver must reject. Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Near-zero masses after floating cancellation are classified as zero and rejected so noise does not invent a huge rate ratio.

Prefer this capability when you already have two molar masses and only need the relative effusion rates; if you need moles from mass first, use a moles-from-mass tool, then feed the masses here.

Homework checks for Graham's law ratios

Students enter textbook molar masses for two gases and compare hand-written rate1/rate2 and inverse against a deterministic result before submitting.

Lab intuition for light vs heavy gases

Process notes estimate how much faster helium or hydrogen escapes a pinhole relative to air or a heavier product gas at the same temperature.

What is Graham's law of effusion?

At the same temperature, the effusion rate of a gas is inversely proportional to the square root of its molar mass. For two gases: rate1/rate2 = √(M2/M1).

What happens when a molar mass is zero?

The ratio under the square root is undefined.

Do M1 and M2 need the same units?

Yes. Use any consistent molar-mass unit (g/mol or kg/mol) for both; only the mass ratio enters the formula.

Is this the same as absolute effusion rate?

No. It returns the relative ratio rate1/rate2 (and the inverse). Absolute rates need temperature, orifice size, and kinetic-theory constants.

Is the Graham's law calculator free?

The browser tool is free and runs locally.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/chem/graham-effusion-rate-ratio

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/chem/graham-effusion-rate-ratio \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m1":2,"m2":32}'
{
  "m1": 2,
  "m2": 32
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.graham_effusion_rate_ratio",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs1000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Enter M1 and M2 in any consistent unit such as grams per mole; the tool returns rate1 over rate2 equals the square root of M2 over M1, the inverse rate2 over rate1, a clear formula string, and step-by-step substitution so homework checks, lab write-ups, and pipeline tests all see the same deterministic JSON. When either molar mass is zero the ratio under the square root is undefined, so the API returns invalid_input instead of NaN or a silent nonsense number.

How to call the API and what comes back

Both molar masses must be strictly positive; values whose absolute value is at or below one times ten to the minus fifteen are treated as zero and rejected. Send a JSON body with two required finite numbers: m1 (aliases M1, molar_mass1, mass1, molar_mass_1) and m2 (aliases M2, molar_mass2, mass2, molar_mass_2). Absolute values must stay within the published limit of one trillion so intermediate ratios remain finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded m1 and m2, sets mass_ratio to M2 over M1, rate_ratio and rate1_over_rate2 to the same rounded square-root value, rate2_over_rate1 to the inverse, formula to the string rate1 slash rate2 equals square root of M2 over M1, law to graham_effusion, unit_molar_mass to a short unit hint, message to a short English summary, and steps to an ordered array of substitution lines. Failed validation—missing fields, non-finite numbers, values outside absolute limits, zero or negative molar mass, or a non-finite rate ratio—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, limits, and related searches

When teaching, pair examples: M1 equals two and M2 equals thirty-two yields rate1 over rate2 equals four; equal masses leave the rate ratio at one; M1 equals four and M2 equals sixteen yields two; and M1 equals zero demonstrates the hard invalid_input path that protects division under the square root. This landing targets people searching for a Graham's law calculator, effusion rate ratio, or gas effusion from molar mass online; it is not an absolute effusion-rate solver that needs temperature and orifice geometry, not a molar-mass lookup by chemical formula, and not a full kinetic-theory simulator. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set a mass to zero. Round-trip checks are easy: recompute the square root of M2 divided by M1 by hand and confirm it equals the published rate_ratio within the same twelve-decimal rounding, and confirm that swapping M1 and M2 inverts rate_ratio into rate2_over_rate1.

Unit tests for gas-law helpers

Generate known-good rate ratios plus deliberate zero-mass rejections for coding kata expected values and CI fixtures.

Read the full KIT documentation →