Effusion remaining fraction calculator
See how a pinhole leak changes a gas mixture: with hydrogen at 2.016 g/mol and oxygen at 32 g/mol, at a time ratio of 0.5 roughly 14% of the hydrogen is left while about 61% of the oxygen remains. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Molar mass 1
- 2.016
- Molar mass 2
- 32
- Time ratio
- 0.5
- Lighter molar mass
- 2.016
- Heavier molar mass
- 32
- Graham factor
- 3.9840953644
- Remaining fraction lighter
- 0.136415803
This effusion remaining fraction calculator returns how much of the lighter gas is still left inside a vessel after a pinhole leak, given two molar masses and an elapsed effusion time ratio. Under Graham effusion kinetics the mole count of each gas decays exponentially because the leak rate is proportional to amount over the square root of molar mass, so the lighter species always depletes faster than the heavier one under the same orifice and temperature. Zero or negative molar mass is rejected because the square-root law is undefined for non-positive masses. The path is fully deterministic arithmetic with no network calls, no Monte Carlo sampling, and no date-dependent shortcuts.
Where lighter-gas remaining fractions fit in study, lab work, and software
Students meet gas-leak remaining fractions when a kinetic-molecular chapter connects Graham's law rates to how a mixture composition shifts after a pinhole forms, when a lab models helium enrichment in a leaky container, or when an exam supplies two molar masses and a scaled time and demands how much of the light species is left without a programmable calculator. Teachers can pre-generate answer keys for modest mass pairs and time ratios without trusting opaque apps that silently invert which gas is lighter or drop the exponential.
Process and materials engineers use the same contract as a quick sanity check before full multi-species transport models, confirming that a light process gas will out-leak a heavier impurity under equal orifice conditions and estimating how composition drifts with dimensionless leak time. Developers call it from scripts to seed deterministic test vectors for chemistry dashboards, to normalize user-entered molar masses before plotting remaining curves, or to satisfy programming-challenge statements that demand the lighter remaining fraction rather than a hand-waved estimate.
Product and education tools use the evaluation when a learner types two molar masses and a time ratio and the UI must show the lighter remainder plus the heavier companion and the Graham factor.
What you can do with it
Tutoring and kinetics software
Normalize two user-entered molar masses and a time ratio into lighter remaining fraction for plotters, step helpers, and interactive lessons.
FAQ
What does the effusion remaining fraction calculator cost?
It is free in your browser on this page.
What happens if a molar mass is zero?
Zero or negative molar mass is invalid because the Graham lifetime places mass under a square root.
Does this tool look up molar mass from a chemical formula?
Use a molar-mass tool if you need formula-to-mass conversion first.
What does the time ratio mean?
It is the elapsed time divided by the heavier gas's natural lifetime, the time it takes to fall to 1/e of its starting amount. At a ratio of 1 the heavier gas has exactly that share left, and the lighter one less.
Why does the lighter gas leak out faster?
By Graham's law the leak rate of each gas is proportional to its amount divided by the square root of its molar mass. Hydrogen against oxygen gives a Graham factor of 3.9840953644, so hydrogen decays that many times faster.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/chem/gas-leak-effusion-fraction \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"molar_mass_1":2.016,"molar_mass_2":32,"time_ratio":0.5}'const res = await fetch("https://api.kit.forhosting.com/chem/gas-leak-effusion-fraction", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"molar_mass_1": 2.016,
"molar_mass_2": 32,
"time_ratio": 0.5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/gas-leak-effusion-fraction",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"molar_mass_1": 2.016,
"molar_mass_2": 32,
"time_ratio": 0.5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/gas-leak-effusion-fraction", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"molar_mass_1":2.016,"molar_mass_2":32,"time_ratio":0.5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"molar_mass_1":2.016,"molar_mass_2":32,"time_ratio":0.5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/gas-leak-effusion-fraction", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"molar_mass_1": 2.016,
"molar_mass_2": 32,
"time_ratio": 0.5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.gas_leak_effusion_fraction",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_value | 1000000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
You supply positive molar masses M1 and M2 in consistent units, typically grams per mole, plus a non-negative time_ratio equal to elapsed time divided by the heavier gas one-over-e lifetime, and the engine returns the remaining fraction of the lighter gas, the companion remaining fraction of the heavier gas, the Graham factor square root of M heavy over M light, and a percent form of the lighter remainder. A familiar textbook check is hydrogen near 2.016 grams per mole against oxygen at 32 grams per mole with time_ratio 0.5, which leaves roughly fourteen percent of the hydrogen while about sixty-one percent of the oxygen remains.
What the gas-leak remaining fraction means and what the response contains
When a closed vessel loses gas through a tiny orifice into vacuum or a much lower-pressure region, ideal kinetic theory says the instantaneous effusion rate of each species is proportional to its partial density divided by the square root of its molar mass. That first-order decay integrates to an exponential remaining fraction n over n zero equals e to the minus kappa t over square root of M for each pure component under a shared orifice factor kappa. This calculator anchors the clock to the heavier gas by defining time_ratio as t divided by tau heavy, where tau heavy is the heavier gas one-over-e lifetime square root of M heavy over kappa, so the heavier remaining fraction is simply e to the minus time_ratio. The lighter remaining fraction is then e to the minus time_ratio times the Graham factor square root of M heavy over M light, which is always smaller than or equal to the heavier remainder when time_ratio is positive. The response echoes molar_mass_1, molar_mass_2, and time_ratio after rounding, names lighter_molar_mass and heavier_molar_mass, reports graham_factor, remaining_fraction_lighter, remaining_fraction_heavier, remaining_percent_lighter as one hundred times the lighter fraction, the method tag graham_effusion_leak_exponential, the precision used, a formula reminder, and a unit note. There is no lookup of molar masses from chemical formulas, no temperature or pressure correction beyond the ideal shared kappa, and no symbolic CAS path: the engine either evaluates finite floating-point exponentials inside the supported magnitude range or rejects the input with invalid_input. Rejected cases include missing required fields, non-finite values, magnitudes above the documented ceiling, any molar mass that is zero or negative, and a negative time_ratio, because elapsed time scaled by a positive lifetime cannot run backward in this model.
How M1, M2, and time_ratio are read and how results stay reproducible
Units for the two molar masses are your responsibility: both values must use the same molar-mass unit, almost always grams per mole in general chemistry tables; mixing grams per mole with kilograms per mole would scale the Graham factor incorrectly without any automatic conversion in this tool. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong remaining fraction. The preferred fields are molar_mass_1 for M1, molar_mass_2 for M2, and time_ratio for the dimensionless elapsed ratio t over tau heavy, but aliases M1, m1, mm1, mass1, and molarMass1 for the first gas, M2, m2, mm2, mass2, and molarMass2 for the second, and timeRatio, t_ratio, elapsed_ratio, elapsed_time_ratio, and tau for the time ratio are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Each molar mass must be strictly positive: if either is zero or negative, the request fails with invalid_input because zero molar mass would place mass under a square root in the kinetic lifetime and negative mass has no meaning for a pure substance. The time_ratio must be non-negative; zero means no elapsed leak time so both remaining fractions equal one, and large positive values drive both fractions toward zero with the lighter gas falling faster. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric fields, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the leak exponentials yourself.
Where lighter-gas remaining fractions fit in study, lab work, and software
Contest and homework practice often needs a fast, offline source of remaining_fraction_lighter so solutions can be checked without graphing calculators under time pressure. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with the relative effusion-rate calculator when you only need rate one over rate two, with STP volume or molar concentration tools when you need related gas-law steps, and with other chem endpoints when you are building a small lab of free, deterministic chemistry helpers.
Integration use cases
Homework and exam checks
Compute remaining_fraction_lighter = exp(−time_ratio·√(M_heavy/M_light)) for textbook molar masses and verify how much light gas is left after a leak.
Deterministic leak-fraction fixtures
Generate reproducible remaining_fraction_lighter, remaining_fraction_heavier, and graham_factor values for unit tests, property checks, and CI assertions.
Technical questions
How is the remaining fraction of the lighter gas defined?
remaining_lighter = exp(−time_ratio · √(M_heavy/M_light)), where time_ratio = t/τ_heavy is elapsed time scaled by the heavier gas 1/e lifetime and M_light, M_heavy are the two molar masses ordered by size.
What is time_ratio?
time_ratio = t/τ_heavy, a dimensionless elapsed effusion time. At time_ratio = 1 the heavier gas has remaining fraction e⁻¹ ≈ 0.3679; the lighter gas has depleted further by the Graham factor.