Home › Chemistry › Stoichiometry Calculator
Stoichiometry Calculator
Parses a balanced chemical equation, converts the given reactant masses or moles to moles, identifies the limiting reagent from mole-to-coefficient ratios and reports the theoretical yield (moles and grams) of every product and the amount of excess reactant left over.
When to use
You have a balanced equation and the amount of one or two reactants and need the limiting reagent, the maximum product mass or moles, or how much of the other reactant remains.
Do not use when: You only need the molar mass of one substance (use molar-mass), a grams-to-moles conversion (use moles-mass), or the percent yield from a measured product mass (use percent-yield after this calculator).
Formula
n_i = mass_i / M_i; ξ = min over known reactants of n_i / ν_i (the reactant giving the minimum is limiting); moles_product = ν_product × ξ; theoretical_yield_g = ν_product × ξ × M_product; excess_remaining = n_excess − ν_excess × ξ
Atom balance is checked with the same formula parser as molar-mass (charges are not balanced). Reactants without a stated amount are assumed to be in excess. Molar masses use IUPAC 2021 abridged atomic weights.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
equation | string | yes | Balanced chemical equation with coefficients and formulas, e.g. 2H2 + O2 -> 2H2O or 3Si + 2N2 = Si3N4 (arrow: ->, =, →; states such as (aq) are ignored; write ion charges as Cu^2+ because Cu2+ is read as two copper atoms). An unbalanced equation is rejected. | |
given_formula | string | yes | Formula of the reactant whose amount is known; must appear on the left side of the equation. | |
given_mass_g | number | g | no | Mass of the given reactant in grams (alternative to given_moles). Range: > 0 |
given_moles | number | mol | no | Amount of the given reactant in moles; takes precedence over given_mass_g. Range: > 0 |
second_formula | string | no | Formula of a second reactant with a known amount, for limiting-reagent analysis. Omit to treat the given reactant as limiting. | |
second_mass_g | number | g | no | Mass of the second reactant in grams (alternative to second_moles). Range: > 0 |
second_moles | number | mol | no | Amount of the second reactant in moles; takes precedence over second_mass_g. Range: > 0 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
balanced_equation | string | The parsed equation with its coefficients, confirming the atom balance. | |
limiting_reagent | string | Reactant with the smallest moles ÷ coefficient ratio among those with a known amount. | |
limiting_reagent_moles | number | mol | Amount of the limiting reagent available. |
extent_of_reaction_mol | number | mol | ξ = moles of limiting reagent ÷ its coefficient; every species changes by coefficient × ξ. |
main_product | string | First product in the equation, to which the theoretical-yield outputs refer. | |
theoretical_yield_g | number | g | Maximum mass of the main product. |
theoretical_yield_moles | number | mol | Maximum moles of the main product. |
excess_reagent | string | The other reactant with a known amount (only when second_formula is given). | |
excess_remaining_moles | number | mol | Moles of the excess reagent left after complete reaction. |
excess_remaining_g | number | g | Mass of the excess reagent left after complete reaction. |
reactants | list | Per reactant: formula, coefficient, molar mass, moles and mass consumed, and (when known) moles/mass available, moles/mass in excess and role. | |
products | list | Per product: formula, coefficient, molar mass, moles and mass formed (theoretical yields). |
Example
3Si + 2N2 -> Si3N4 with 2.00 g Si and 1.50 g N2: {"equation":"3Si + 2N2 -> Si3N4","given_formula":"Si","given_mass_g":2,"second_formula":"N2","second_mass_g":1.5} → {"limiting_reagent":"Si","limiting_reagent_moles":0.071212,"extent_of_reaction_mol":0.023737,"main_product":"Si3N4","theoretical_yield_g":3.33,"theoretical_yield_moles":0.023737,"excess_reagent":"N2","excess_remaining_moles":0.00607,"excess_remaining_g":0.17}
2H2 + O2 -> 2H2O with 4.0 g H2 and 16.0 g O2: {"equation":"2H2 + O2 -> 2H2O","given_formula":"H2","given_mass_g":4,"second_formula":"O2","second_mass_g":16} → {"balanced_equation":"2 H2 + O2 → 2 H2O","limiting_reagent":"O2","theoretical_yield_g":18.016,"theoretical_yield_moles":1.00006,"excess_reagent":"H2","excess_remaining_g":1.9839,"excess_remaining_moles":0.98406}
GET https://tttkmbb.com/api/v1/calculate/stoichiometry?equation=3Si+%2B+2N2+-%3E+Si3N4&given_formula=Si&given_mass_g=2&second_formula=N2&second_mass_g=1.5
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/stoichiometry(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/stoichiometry · Markdown: https://tttkmbb.com/chemistry/stoichiometry.md · JSON definition: https://tttkmbb.com/chemistry/stoichiometry.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="stoichiometry" - OpenAPI operationId:
solve_stoichiometry - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- OpenStax Chemistry 2e – 4.3 Reaction Stoichiometry (textbook)
- OpenStax Chemistry 2e – 4.4 Reaction Yields (textbook)
- Wikipedia – Limiting reagent (reference)
FAQ
What if I only know the amount of one reactant?
Omit second_formula: the given reactant is treated as limiting and the yields assume every other reactant is present in excess.
Why is my equation rejected as unbalanced?
Atom counts of every element must match on both sides, e.g. H2 + O2 -> H2O fails because oxygen is 2 on the left and 1 on the right. The error lists each element that differs; charges of ions are not checked.
Which product does theoretical_yield_g refer to?
The first product written in the equation (main_product); the products list gives the yield of every product.
Related calculators
- Percent Yield Calculator — Compare the measured product mass with this theoretical yield.
- Molar Mass Calculator — Molar mass and composition of any species in the equation.
- Moles to Grams Calculator — Plain grams-to-moles conversion for one substance.