How the math works
Updated:
Most pool apps hand you a number and ask you to trust it. We'd rather show the work. Everything below is the actual model DoseMyPool runs — the same engine that powers the free calculators on this site.
1. From ppm to a scoop: the core identity
A “part per million” is just a mass ratio: 1 ppm means 1 gram of chemical in a million grams (one cubic metre) of water. A US gallon is 3.785412 litres (NIST), and a litre of water weighs about a kilogram, so raising one gallon by 1 ppm takes 0.00378541 g of pure active ingredient. Every dry dose starts from:
grams of active = 0.00378541 × ppm change × gallons
Then we divide by the product's real strength. A worked example: raising free chlorine by 2 ppm in a 15,000-gallon pool needs 0.00378541 × 2 × 15,000 ≈ 114 g of available chlorine. Liquid chlorinating solution at 12.5% carries about 125 g of available chlorine per litre, so the dose is 114 ÷ 125 ≈ 0.91 L ≈ 3.8 cups (31 fl oz). Run the chlorine calculator with these exact numbers — you'll get the same answer, because it is the same code.
2. Product strengths are not marketing labels
“Shock” is not a chemical; it's a bag with a percentage on it. The engine models each product by its actual available-chlorine fraction or acid equivalents:
| Product | Modeled strength | Side effects the engine tracks |
|---|---|---|
| Liquid chlorine 12.5% / 10% | 125 / 100 g available Cl₂ per litre | — |
| Household bleach 8.25% | 90.2 g/L | — |
| Cal-hypo 73% / 65% | 73% / 65% by mass | Adds calcium hardness |
| Dichlor 56% | 56% by mass | Adds ~0.9 ppm CYA per 1 ppm FC |
| Muriatic acid 31.45% / 14.5% | 10.0 / 4.25 acid equivalents per litre | Lowers TA too |
| Dry acid (sodium bisulfate) | 93.2% pure, by molar mass | Adds sulfates |
These are the common retail strengths, not measurements of the bottle in your hand, so the label wins. That's why dichlor is a fine startup sanitizer but a bad habit: the engine shows you the CYA it silently adds with every dose, which is exactly how stabilizer “creep” happens.
3. Why chlorine targets scale with CYA
Cyanuric acid protects chlorine from sunlight by binding most of it in reserve — but bound chlorine sanitizes far more slowly. The practical consequence, set out in Trouble Free Pool's chlorine/CYA chart: the free chlorine you need is a percentage of your CYA, not a fixed number. DoseMyPool follows that chart. The minimum is 7.5% of your CYA (5% with a salt cell, and never under the CDC's 2 ppm with stabilizer), the target range sits a few ppm above it, and the shock level is 40% of CYA, the same rule the shock calculator uses. An app that says “2 ppm is fine” without asking your CYA is guessing.
4. pH and alkalinity: a real equilibrium model, not a lookup table
pH dosing is where most calculators cut corners, because pH isn't linear — it's buffered by the carbonate system. DoseMyPool solves the actual chemistry:
- Your measured total alkalinity is corrected for the cyanurate contribution (CYA is itself a weak acid that inflates the TA reading, pH-dependently).
- The remaining carbonate alkalinity plus your current pH fixes the water's total dissolved carbonate via the carbonic-acid dissociation constants (pK₁ 6.35, pK₂ 10.33 at 25 °C).
- Lowering pH: the engine computes the exact strong-acid equivalents needed to move the carbonate system from your pH to the target — and reports the TA drop that comes with it, because every acid dose lowers both.
- Raising pH: it numerically solves the soda-ash addition that lands on the target pH, reporting the TA rise — and will suggest aeration instead when that's the better tool.
Because pH and TA are solved together, the recommendations can't fight each other — no more “add acid, then add baking soda, then add acid again” oscillation.
5. Water balance (LSI)
Beyond sanitation, water either dissolves things (etching plaster, corroding heaters) or deposits them (scale). The Langelier Saturation Index, in the form the MAHC Annex gives (5.7.4.6), combines pH, temperature, calcium hardness, carbonate alkalinity, and TDS into one number; the app computes it with every test and nudges you when your water trends corrosive or scale-forming — before it costs you equipment.
6. The safety layer on top of the math
A correct number delivered dangerously is still a bad recommendation. Every dose passes through rules the math alone doesn't know:
- Order of addition — one chemical at a time, with circulation time between; acid and chlorine never together.
- Never-mix warnings — cal-hypo and trichlor, acid into chlorine, calcium chloride with soda ash.
- Plausibility checks — readings that imply an implausibly large dose get flagged for a re-test instead of a blind mega-dose.
- Practical handling — acid diluted and added to the deep end, pre-dissolving dry chemicals, swim-wait guidance.
7. Accuracy, honestly stated
The engine is checked against figures that documents publish: the MAHC Annex's 1.4 lb of baking soda per 10,000 gallons for 10 ppm of alkalinity, and Pentair's stabilizer table, where 3.25 lb takes 10,000 gallons from 0 to 40 ppm. Target ranges come from the CDC, the MAHC, the Hayward and Pentair manuals, and Trouble Free Pool, and each calculator page lists the ones it uses. Estimates are still estimates: test kits have tolerances, pools have dead spots, and product labels are the final word. That disclaimer is on every calculator — because a chemistry tool that pretends to be infallible shouldn't be trusted with your pool.
Sources
- NIST Special Publication 811, Appendix B.8: conversion factors. 3.785412 litres per US gallon, behind the ppm-to-grams identity
- CDC, Model Aquatic Health Code, 5th edition (2024), Annex. 1.4 lb of baking soda per 10,000 gallons for 10 ppm of alkalinity; the Langelier Saturation Index formula and table (5.7.4.6); how CYA binds chlorine and inflates the alkalinity reading
- Trouble Free Pool, CYA Chlorine Relationship (Chlorine/CYA chart). Minimum free chlorine at 7.5% of CYA (5% with a salt cell), the target range, and shock level at 40%
- Pentair, IntelliChlor IC15/IC20/IC40/IC60 Installation and User’s Guide (P/N 520589 Rev. R, 2023). Stabilizer table: 3.25 lb takes 10,000 gallons from 0 to 40 ppm
- Stephen K. Lower, Carbonate equilibria in natural waters (Chem1 Reference Text). Carbonic acid pK₁ 6.35 and pK₂ 10.33 at 25 °C, from Stumm and Morgan, Aquatic Chemistry
- U.S. EPA, accepted label for Trichloroisocyanuric Acid (TCCA) 90, EPA Reg. No. 103874-1 (April 9, 2025). Trichlor must not meet remnants of other products: a violent reaction, fire or explosion can follow
- CDC, Pool Chemical Safety. Pool chemicals can injure people when mixed
- ATSDR, Toxicological Profile for Chlorine: Public Health Statement. Acidic chemicals mixed with bleach can release chlorine gas
Keep going
Get exact doses, saved and on schedule
DoseMyPool remembers your pool, gives the safe order to add things, and reminds you to test. Free on the App Store.