Mole ratio calculator
Six moles of hydrogen make four moles of ammonia, because N2 + 3 H2 → 2 NH3 sets a ratio of two to three. Enter the reactant moles and both coefficients from your balanced equation to get the product moles and the ratio used. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Reactant moles
- 4
- Reactant coefficient
- 2
- Product coefficient
- 2
- Mole ratio
- 1
- Product moles
- 4
Stoichiometry turns a balanced chemical equation into a precise conversion factor between moles of one species and moles of another. The mole ratio is simply the quotient of the product coefficient and the reactant coefficient in that balanced equation, and multiplying the moles of reactant you actually have by that ratio yields the moles of product that can form if the reactant is limiting. Students first meet this idea when converting from hydrogen moles to water moles in 2 H2 plus O2 yields 2 H2O, then reuse it for ammonia synthesis, combustion, and precipitation drills. Process chemists and lab technicians use the same closed form when sizing feeds and predicting theoretical yield before any percent-yield correction. This calculator accepts reactant moles plus both coefficients, returns product moles with the intermediate mole ratio, unit labels, and formula string for audit, and rejects a zero coefficient so a bad denominator never becomes Infinity or NaN.
How the stoichiometric mole ratio converts reactant moles to product moles
Start from a balanced chemical equation written with integer or fractional coefficients that conserve atoms on both sides. Pick the reactant species whose amount you know and the product species whose amount you want. The stoichiometric mole ratio is the product coefficient divided by the reactant coefficient, written ν_p over ν_r, and it has units of moles of product per mole of reactant.
The reactant coefficient must not be zero, because the conversion divides by it; a zero product coefficient is likewise rejected as invalid for this calculator. Reactant moles must be finite and non-negative: zero moles correctly yields zero product, while a negative amount is non-physical and fails validation. Classic textbook checks include four moles of H2 with coefficient two converting to water with coefficient two, giving four moles of water, and six moles of H2 with coefficient three converting to ammonia with coefficient two, giving four moles of NH3.
The tool does not balance equations, look up molar masses, convert grams to moles, identify which of several reactants is limiting, or apply percent yield; those remain separate search intents when product coverage grows.
Where mole-ratio calculators show up in real work
Secondary-school and introductory university chemistry courses assign conversion drills that chain grams to moles, mole ratios, and moles back to grams; a trusted mole-ratio oracle speeds the middle step without hand-waving floating-point noise. AP and IB exam prep sets reuse the same pattern for combustion, acid-base neutralization, and precipitation stoichiometry, and auto-graders need a stable ground truth for product moles given a limiting reactant. Process chemists size reactor feeds when a single reactant amount is known and theoretical product loading must be estimated before yield corrections.
Analytical labs convert titrant moles into analyte moles using the balanced titration equation coefficients. If you later need automatic equation balancing, multi-reactant limiting-reagent selection, percent yield from actual mass, or gram-to-mole conversion from molar mass tables, treat those as separate search intents and landings rather than overloading this mole ratio calculator page.
What you can do with it
Homework and exam answer keys
Compute product moles from reactant moles and balanced coefficients so students and auto-graders share one closed-form mole-ratio ground truth.
Limiting-reactant theoretical yield
After you identify the limiting reactant, convert its moles into theoretical product moles using the balanced equation coefficients.
Lab and process feed sizing
Estimate product moles from a known reactant charge before percent-yield corrections in teaching labs or pilot recipes.
FAQ
What happens if a coefficient is zero?
The mole ratio divides by the reactant coefficient, and a zero product coefficient is also rejected as invalid for this calculator.
Do coefficients have to be integers?
No. Any finite non-zero number is accepted, so fractional coefficients from a normalized balanced equation work without re-integerizing.
Does this balance the chemical equation?
No. You must supply already-balanced coefficients. Balancing equations, molar-mass conversion, limiting-reagent selection among several reactants, and percent yield are separate tools.
What does it cost?
The browser tool is free and runs locally.
Can I enter grams instead of moles?
No. The calculator works in moles only and does not look up molar masses, so convert grams to moles first, then turn the product moles back into grams if you need a mass.
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/stoichiometry-mole-ratio \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"reactant_moles":4,"reactant_coefficient":2,"product_coefficient":2}'const res = await fetch("https://api.kit.forhosting.com/chem/stoichiometry-mole-ratio", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"reactant_moles": 4,
"reactant_coefficient": 2,
"product_coefficient": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/stoichiometry-mole-ratio",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"reactant_moles": 4,
"reactant_coefficient": 2,
"product_coefficient": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/stoichiometry-mole-ratio", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"reactant_moles":4,"reactant_coefficient":2,"product_coefficient":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"reactant_moles":4,"reactant_coefficient":2,"product_coefficient":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/stoichiometry-mole-ratio", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"reactant_moles": 4,
"reactant_coefficient": 2,
"product_coefficient": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.stoichiometry_mole_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
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
How the stoichiometric mole ratio converts reactant moles to product moles
Multiply the available reactant moles by that ratio to obtain product moles: product_moles equals reactant_moles times product_coefficient over reactant_coefficient. The entire pipeline is deterministic floating-point arithmetic with no random seeds, wall-clock timestamps, network calls, or model drift, so identical inputs always produce identical JSON.
What you send and what you get back
Classic checks include two H2 plus O2 yielding two H2O with four moles of hydrogen giving four moles of water, and N2 plus three H2 yielding two NH3 with six moles of hydrogen giving four moles of ammonia. Keep coefficients on the same balancing scale across multi-step pipelines: if you half-scale the equation, half-scale both coefficients so the numeric ratio still matches the chemistry your report claims. Send three required finite numbers under the fields reactant_moles, reactant_coefficient, and product_coefficient. reactant_moles is the amount of the chosen reactant in moles and must be greater than or equal to zero. reactant_coefficient is the balanced-equation coefficient of that reactant and must be non-zero. product_coefficient is the balanced-equation coefficient of the chosen product and must also be non-zero. Missing fields, non-numeric strings, NaN, Infinity, negative reactant moles, and any zero coefficient fail with invalid_input and are not charged. On success the response echoes cleaned reactant_moles, reactant_coefficient, and product_coefficient, provides mole_ratio as the quotient product over reactant coefficient, provides product_moles as the primary result, includes a units hint object naming moles and dimensionless coefficients, sets method to stoichiometric_mole_ratio, and formula to product_moles equals reactant_moles times product_coefficient over reactant_coefficient so homework write-ups can cite the same expression. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where mole-ratio calculators show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Technical questions
How does the mole ratio calculator work?
It multiplies reactant moles by the quotient of the product coefficient and the reactant coefficient from the balanced equation: product_moles = reactant_moles × (product_coefficient / reactant_coefficient).