Neutral chemical-equation balancer
Balance explicitly declared neutral formulas with exact rational arithmetic, preserving the full element matrix, nullspace basis and conservation proof without guessing nonunique solutions.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Enter both sides with no initial coefficients. A unique strictly positive nullspace vector gives primitive integer coefficients; every other state remains explicit.
How to use this tool
- Enter a neutral equation with both sides and no starting coefficients.
- Read the conservation state, rank and nullity; accept coefficients only when state is balanced.
- Copy balanced text or download the full exact proof, matrix and original equation.
Supported inputs and limits
UTF-8 equation up to16KiB,50 ordered species,109 elements H–Mt, nesting depth16 and100 digits per count. Exact intermediate integers≤4,096 bits, work≤1,000,000 operations, complete original/proof/matrix/balance/totals≤2MiB. Dimensions and coefficient growth remain coupled.
ASCII case-sensitive symbols, positive integer counts without leading zero, nested ()/[] and top-level hydrate dot or · with an optional positive factor after that delimiter. Whitespace only around species. Exactly one ->, → or = and plus-separated species; duplicates stay ordered.
Ds–Og, initial coefficients, charges/electrons, isotopes, states, macros, fractions and scripts are Unsupported. A hydrate dot is not decimal stoichiometry. The operation ceiling is a work guard, not a promise of a reachable successful exact1million-operation case.
Nullity0: no-nonzero-balance. Nullity1 and all coefficients strictly positive: balanced. Nullity1 with zero/mixed signs: no-strictly-positive-balance. Nullity>1: underdetermined with the complete exact basis; no guessed positive combination or claim that no positive solution exists.
All species counts, UTF-8 source spans, signed matrix, RREF, rational basis and primitive integer basis remain in proof.json. Balanced output adds full left/right element totals. Exact decimal/rational CSV tokens may be reinterpreted by spreadsheet software. No reaction-occurrence, mechanism, energy or safety conclusion.
The table shows all species within the50-species cap; long cells preview2,000 UTF-16 units. Copy gives balanced text or the explicit machine-state code. Full proof and CSV downloads remain complete; failures and cancellation publish no partial files.
Worked example
Example input
H2 + O2 -> H2O
Example options
{"params":{}}Example output
2 H2 + 1 O2 -> 2 H2O
When something does not work
Check the selected profile and the original source, then correct the input or reduce complete input/output size. Cancellation and errors publish no partial files; rerun the same supported source.
Frequently asked questions
Does balanced mean the reaction happens?
No. It proves element conservation for the declared species only; occurrence, charge, energy and mechanisms remain unreviewed.
What happens with several independent balances?
The result is underdetermined and includes every exact basis vector. It does not silently choose a convenient coefficient set.
Documentation & further reading
Related tools
Unit converter
Convert length, area, mass, volume and temperature with compatible units side by side.
Percentage calculator
Find a share, calculate an amount from a percent, or measure percentage change.
Aspect ratio calculator
Reduce a width and height to a ratio, then plan a proportional pixel size.
Data size converter
Convert bit and byte amounts across decimal MB/GB and binary MiB/GiB units.