image thumbnail


version (7.6 KB) by Antonio Trujillo-Ortiz
Calculation of the quantities of reactants and products in a chemical reaction.


Updated Tue, 28 Nov 2006 15:54:44 +0000

View License

WARNING: To apply this procedure it is strictly necessary to know a priori the chemical species (reactants & products) that participate in the reaction.
A chemical equation describes what happens in a chemical reaction. The equation identifies the reactants (starting materials) and products (resulting substance), the formulas of the participants, the phases of the participants (solid, liquid, gas), and the amount of each substance. Balancing a chemical equation refers to establishing the mathematical relationship between the quantity of reactants and products; this procedure is known as stoichiometry. Stoichiometry rests upon the law of conservation of mass, the law of definite proportions (i.e., the law of constant composition) and the law of multiple proportions. In general, chemical reactions will combine in definite ratios of chemicals.
A number of different techniques exist. Commonly are by Inspection, Half-Equation, Oxidation Number, and Algebraic. This last one is considered arguably more general and powerful. The unbalanced chemical equation is used to define a system of linear equations, which can then be solved to yield the stoichiometric coefficients.
This m-file contains the stoichiometric algebraic method.

(varargin) = (s1 = species 1(cell array),s2 = species 2(cell array)
...sN = species N(cell array)
The species is the 'formula'. [eg. ('H2S','H2SO4','S2O2','H2O')]

A table of the stoichiometric coefficients. The sign minus or plus indicates in what side of the reaction they are.

Cite As

Antonio Trujillo-Ortiz (2022). Stoichiometry (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Stoichiometry Tools

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!