Pooldex

Methodology: formulas, sources, and test cases

Every calculator on this site and in the Pooldex app uses one chemistry engine. This page lists its units, constants, and formulas, the sources behind them, where those sources disagree and what we chose, and how we test each release.

Last updated October 7, 2026

On this page (11 sections)

Units and constants

Inside the engine, everything is kept in base units and nothing is rounded: US gallons or liters for volume, ppm (mg/L) for concentrations, grams for dry products, and milliliters for liquids. Total alkalinity (TA) and calcium hardness (CH) are expressed "as CaCO3", and borates as boron (B). Rounding happens only when a number is shown to you.

ConstantValue
1 US gallon3.785411784 L
1 cubic foot7.48052 US gallons
1 fl oz29.5735 mL
1 oz (weight) / 1 lb28.3495 g / 453.592 g
Equivalent weight of CaCO350.04 g per equivalent
Molar masses usedCl2 70.906; NaHCO3 84.007; Na2CO3 105.988; NaHSO4 120.06; HCl 36.461; CaCl2 110.98; CaCO3 100.087; cyanuric acid 129.07; B 10.81

The general rule for any product: grams of active ingredient = ppm change × liters ÷ 1,000. Products differ only in how much active ingredient they contain.

Chlorine dosing by product and label basis

The same "10%" means different things on different labels, and this is the most common reason chlorine answers disagree online.

  • Pool liquid chlorine (10%, 12.5%) is labeled in trade percent: grams of available chlorine per liter divided by 10. So 12.5% trade = 125 g/L, and the dose in mL = ppm × liters ÷ (percent × 10). This is also how the Taylor K-1005 treatment table is built.
  • Household bleach (6%, 7.5%, 8.25%) is labeled in percent sodium hypochlorite by weight. We convert it to g/L of available chlorine with the solution's density (linear interpolation in the OxyChem sodium hypochlorite table) and the ratio of chlorine to sodium hypochlorite: g/L = percent × density × 10 ÷ 1.05.
  • Cal-hypo, dichlor, and trichlor are labeled in percent available chlorine: grams = ppm × liters ÷ 1,000 ÷ (percent ÷ 100). Side effects are shown with the dose. Cal-hypo adds about 0.7 ppm calcium hardness per 1 ppm chlorine (from its formula). Dichlor adds 0.9 ppm cyanuric acid (CYA) and trichlor 0.6 ppm CYA per 1 ppm chlorine (PHTA).

Liquid chlorine also loses strength over time. PHTA data: 12.5% sodium hypochlorite loses half its strength in about 180 days at 77 °F, but in about 48 days at 95 °F. You can measure your jug's real strength with a retest 30–120 minutes after a dose. The site lets you enter a "strength left" percent by hand on the liquid chlorine calculator.

How much free chlorine to aim for

Stabilizer (cyanuric acid, CYA) protects chlorine from sunlight but also binds part of it. The CDC's Model Aquatic Health Code (MAHC 2024 Annex, 5.7.3.1.1.2) explains that the active form (hypochlorous acid) stays about the same when the CYA-to-chlorine ratio stays the same, so the minimum chlorine should rise with CYA. Our rules:

  • minimum free chlorine (FC) = the larger of 1 ppm (no CYA) or 2 ppm (with CYA), and 7.5% of CYA (5% for salt water generators), rounded up to 0.5 ppm;
  • target range = from the minimum (at least 2 ppm) to 2 ppm above it (at least 4, at most 10 ppm);
  • shock: no level from CYA. The engine still keeps a reference value (40% of CYA, at least 10 ppm), but the site and the app never show it or turn it into a dose, because it is above the swim limit on pool chlorine labels. Shock follows your product's label;
  • hot tubs: minimum 3 ppm (CDC), target 3–5 ppm capped at the label's swim limit (default 4 ppm, so 3–4 ppm), and no CYA.

The 7.5% and 5% ratios follow a principle popularized by the Trouble Free Pool community. We could read it only in secondary sources, so we treat it as secondary and use our own parameterization rather than copying any published table. See it for your pool on the chlorine levels page. Pool Math, the app from that community, uses the same idea; we compare the two apps on Pool Math app alternative.

pH correction model

How much acid lowers pH by 0.3 depends on alkalinity, stabilizer, and borates in your water, so a fixed "ounces per 0.1 pH" rule is often wrong. We use a closed carbonate-system model: while you dose, no CO2 escapes, so total inorganic carbon stays constant.

  1. From your pH and TA, we compute total carbonate, after subtracting the part of TA that comes from cyanurate, borate, hydroxide, and hydrogen ions at your pH.
  2. For acid, the dose in equivalents is the drop in alkalinity needed to reach the target pH at that carbonate level. Muriatic acid strength comes from its density table (31.45% ≈ 9.97 mol/L); dry acid is sodium bisulfate at 93.2%.
  3. For soda ash or borax, the amount is found numerically (200 steps of bisection), because both raise pH and alkalinity at the same time.

Constants at 25 °C: carbonic acid pK1 6.35 and pK2 10.33 (standard textbook values), cyanuric acid pKa 6.88, boric acid 9.24, with a Davies activity correction based on total dissolved solids (TDS): ionic strength ≈ 2.5 × 10⁻⁵ × TDS. Compared with the legacy TFP pool calculator, the model agrees within 1–5% (for example, both give 9.6 fl oz of 31.45% acid for pH 7.8 → 7.5 at TA 100 and CYA 40 in 10,000 gallons). With 50 ppm borates the difference grows to about 14%, because sources use different pKa values for boric acid.

Limits: the model does not include CO2 loss after dosing, which slowly pushes pH back up, and it uses 25 °C constants. That is why every acid step says "retest", and why acid is never more than 0.4 pH or 20 ppm TA per step. See it in action on the muriatic acid calculator.

LSI formula

The Langelier Saturation Index tells whether water tends to dissolve plaster (negative) or deposit scale (positive). We use the continuous formula instead of lookup tables, so small changes move the result smoothly:

  • pHs = (9.3 + A + B) − (C + D), and LSI = pH − pHs
  • A = (log10 TDS − 1) ÷ 10
  • B = −13.12 × log10(°C + 273) + 34.55
  • C = log10(CH as CaCO3) − 0.4
  • D = log10(carbonate alkalinity), where carbonate alkalinity = TA minus the cyanurate and borate parts at your pH

Check: for pH 7.6, 84 °F, CH 300, TA 90, CYA 60, and TDS 1,000, the table method in an Orenda example gives 0.00 and our formula gives +0.01. We show −0.3 to +0.3 as balanced and up to +0.5 as slightly scaling (APSP range as published by PHTA). Try it in the LSI calculator.

Volume formulas and the above-ground correction

ShapeGallons (feet in, US gallons out)
Rectanglelength × width × average depth × 7.48
Roundπ ÷ 4 × diameter² × average depth × 7.48
Oval, true ellipseπ ÷ 4 × length × width × average depth × 7.48
Oval, above-ground style((length − width) × width + π × width² ÷ 4) × average depth × 7.48
Kidney0.45 × (width A + width B) × length × average depth × 7.48 (common approximation)
Sloped flooraverage depth = (shallow + deep) ÷ 2, or a length-weighted average for pools with a hopper
Hot tubsseats and jets make shape math unreliable: we time the fill with a bucket and hose, or use the maker's capacity

Above-ground pools hold less than their nominal size suggests: walls lean, corners round off, and the fill line sits below the top rail. We collected 35 above-ground pools and inflatable spas with capacities published by Intex, Bestway, and Coleman. We read 33 of them on the manufacturer's own page on 2026-09-29. For the 26 pools with a stated fill level, the manufacturer capacity divided by geometry at the same fill has a median of 0.918 (range 0.823–1.000): 0.943 for the 17 rated at 90% fill and 0.866 for the 9 rated at 80%. (Earlier versions of this page gave 0.933, which is the median of all 33 pools, including the 7 without a stated fill level or a manufacturer-page check.) Inflatable-ring pools cluster at 0.82–0.90, and frame pools at 0.90–1.00. So when you don't pick a model, our calculators multiply geometry by 0.93 for frame pools and 0.87 for inflatable-ring pools and say "about ±7%". These factors are our own statistics, not a standard. The full list is in the above-ground pool gallons chart.

Equipment, water, and cost calculators

These calculators are on the site only, not in the app, and they leave the app's chemistry engine unchanged. They use simple physics and the prices you enter; the example values on each page are not market prices.

Formulas for the site-only calculators
CalculatorFormulaWhere the numbers come from
Bucket testextra loss = pool drop − bucket drop; gallons = water surface (sq ft) × inches × 0.623. "Losing more than evaporation" when the extra drop is larger than your reading accuracy (1/8 inch unless you change it). A bucket that dropped more than the pool means the test went wrong.Test steps: City of Chandler, Arizona. 0.623 = 7.48 gal per cu ft ÷ 12.
Drain and dilutionshare to replace = (now − target) ÷ (now − fill water); gallons = share × pool volume; smaller drains of a set share: rounds = ln((target − fill) ÷ (now − fill)) ÷ ln(1 − share), rounded up.Mass balance: the same formula as our drain calculator.
Pump sizegal/min = gallons ÷ (turnover hours × 60); gallons per hour (GPH) = gal/min × 60. Schedule 40 pipe limits at 6 ft/s suction and 8 ft/s return: 1.5 in 38/51, 2 in 63/84, 2.5 in 90/119, 3 in 138/184 gal/min. Energy-code design flow = gallons ÷ 360 or 36 gal/min, whichever is larger.ICC CodeNotes on ANSI/APSP/ICC-15 in the 2021 ISPSC.
Variable-speed pumpsflow follows speed and power follows speed cubed, so the same turnover at speed s takes 1/s as long and about s² of the energy. Ideal numbers: real savings are lower.Pump affinity laws; ENERGY STAR and PNNL state the half-speed case (about one-eighth).
Filter sizeminimum area (sq ft) = pump gal/min ÷ design rate: cartridge 1.0 (home pools) or 0.375 (public pools), sand 20, DE 2.0 gal/min per sq ft. GPH is divided by 60 first.Cartridge: NSF/ANSI 50 Table 6.4, as quoted by NSF. Sand and DE: Hayward filter ratings and Michigan rule R 325.2153.
Salt cell sizelb of chlorine a day = ppm used per day × gallons × 3.785 L ÷ 1,000 ÷ 453.6 g per lb; hours at 100% = lb needed ÷ cell lb per day × 24; output setting = those hours ÷ pump hours.Unit conversions; cell output from your spec sheet.
Heating (gas vs heat pump, heater cost, hot tub heat-up)BTU = gallons × 8.34 lb × °F rise; therms = BTU ÷ 100,000 ÷ efficiency; heat pump kWh = BTU ÷ 3,412 ÷ COP; hot tub hours = gallons × 8.34 × °F ÷ (kW × 3,412). Heat loss is not counted.USGS (water weight), EIA (3,412 BTU per kWh).
Solar coverwater kept = surface × 0.623 × evaporation (in per week) × share the cover prevents × weeks; heat kept = those gallons × 8.34 lb × 1,048 BTU.DOE Energy Saver: 1,048 BTU per lb of 80 °F water; covers cut top-up water by 30–50%.
Running costchlorine = cost per ppm of 12.5% liquid chlorine at your price × ppm used per day × 30; pump = watts ÷ 1,000 × hours × 30 × $ per kWh; top-up water = gal per week ÷ 7 × 30 ÷ 1,000 × $ per 1,000 gal; per year = per month × months open.Your prices.
CYA buildupeach week, CYA = last week × (1 − share of water replaced) + 7 × ppm chlorine per day × 0.6 (trichlor) or 0.9 (dichlor).Our engine's side effects per 1 ppm of chlorine (molar masses).
Unit converter1 cup = 8 fl oz = 16 tbsp = 48 tsp = 236.6 mL. Weight to volume only with a density: baking soda 4.6 g and dichlor about 5 g per level teaspoon, or your own grams per cup.NIST Handbook 44 (US measures); USDA FoodData Central (baking soda).
Free-form volumearea = length ÷ n × sum of n widths, each measured across the middle of an equal section; gallons = area × average depth × 7.48.Midpoint rule.
Vinegar vs acid5% vinegar = 5 g of acetic acid per 100 mL, about 0.83 equivalents per liter: about 1/12 of the acid in 31.45% muriatic acid. Same pH model as the acid calculator.FDA vinegar definition; PubChem (acetic acid).
Label-based products (algaecide, MPS, phosphate remover, line flush)your amount = label amount × your gallons ÷ label gallons (phosphate remover: also × ppb to remove ÷ the label's ppb). There is no built-in dose.Your product label.
Vacationdays chlorine lasts = (FC when you leave − minimum for your CYA) ÷ ppm used per day; trichlor 90% needed = ppm × liters ÷ 1,000 ÷ 0.9 grams.Our engine's chlorine targets and doses.

Where sources disagree, and what we chose

QuestionSource ASource BOur choice
Free chlorine with stabilizerEPA labels and PHTA: 1–4 ppm, swim at 4 ppm or lessMAHC Annex: the minimum should rise with CYAshow both; keep CYA at 30–50 so the target fits; always "follow the label"
Liquid chlorine 12.5%Taylor: trade percentPHTA's figures: about 3.5% more liquid per ppm (10.6 vs 10.24 fl oz in 10,000 gal)trade percent; the difference is smaller than test error
What to correct firstTaylor: alkalinity before pHCDC priority on sanitizerchlorine first if below minimum, then TA, pH, and calcium
Borax for +10 ppm borates (10,000 gal)PHTA: 7.05 lb (uses 128 oz per gallon of water)stoichiometry: 7.36 lb (a gallon of water weighs about 133.5 oz)7.36 lb
"Oval" factorHayward: L × W × depth × 6.7true ellipse: × 5.875two shapes; 6.7 matches the above-ground style when length is twice the width
Balanced LSIAPSP: −0.3 to +0.5Hayward: 0 ± 0.2balanced −0.3 to +0.3, caution to +0.5
Maximum CYAAPSP: 100 ppmsalt cell makers: up to 80 ppmwarning above 90 ppm; salt pools target 60–80

Safety limits built into every dose

These limits are our choice, not a standard, and they apply on the site and in the app:

  • acid: at most −0.4 pH and −20 ppm TA per step, then retest; target pH never below 7.2;
  • soda ash: at most +0.3 pH per step; baking soda: at most +30 ppm TA per step; calcium chloride: at most +50 ppm per step;
  • stabilizer is never raised above its target, because only draining lowers it;
  • chlorine is never raised above the swim limit on your product label (4 ppm unless you enter your own). The plan shows "wait" when chlorine is above that limit, and "Don't swim yet" when it is below the minimum (or the label limit, if that is lower), above 10 ppm (the MAHC upper limit), or less than 30 minutes after acid;
  • the plan does not calculate a shock level: it scales the shock directions from your product's label, or tells you to follow them;
  • test-strip readings give a dose range, because a strip reads in steps; calcium, stabilizer, and salt from strips are confirmed with a drop test before adding or draining;
  • acids and pH increasers are rounded down, everything else to the nearest step.

Read the pool chemical safety guide before handling acid or chlorine.

67 test cases and how we verify every release

The engine ships with 67 reference cases: input, expected output, and tolerance (0.1% for doses, 0.5% for the pH model, ±0.01 for LSI). Where an independent published value exists, the case lists it. Examples:

CaseOur engineIndependent value
10% liquid chlorine, +1 ppm, 10,000 gal12.80 fl oz12.8 fl oz (Taylor K-1005)
Cal-hypo 65%, +1 ppm, 10,000 gal2.054 oz2.05 oz (Taylor)
Trichlor 90%, +1 ppm, 10,000 gal1.484 oz1.48 oz (Taylor)
Baking soda, +10 ppm TA, 10,000 gal1.401 lb1.40 lb (Taylor)
Muriatic acid 31.45%, −10 ppm TA, 10,000 gal1.603 pt1.60 pt (Taylor)
Calcium chloride 77%, +10 ppm, 10,000 gal1.202 lb1.20 lb (Taylor)
Salt 0 → 3,200 ppm, 10,000 gal267.1 lb267 lb (Hayward)
1 quart of 5.25% bleach in 6,000 gal+2.24 ppmabout 2 ppm (EPA-registered Clorox label, 2011)

Every site build runs all 67 cases in JavaScript (the code your browser runs) plus a separate Python reimplementation, and compares the two on more than a hundred extra inputs. If any case fails, the site is not built. The iPhone app runs the same cases in Swift. Calculator results on the page are prerendered by the same JavaScript, so the number you see without JavaScript is the number the calculator computes.

The site-only calculators in the table above have their own hand-worked checks (84 of them, for example 512 sq ft × 0.75 inch × 0.623 = 239 gallons), and every build runs them too. Not yet covered by reference cases: the older pump run time, heater cost, and chemical cost calculators (simple physics: 1 gallon of water ≈ 8.34 lb, 1 BTU raises 1 lb by 1 °F). The hot tub water-change rule of thumb is not covered either (gallons ÷ 3 ÷ daily soakers, original source not confirmed). These pages say so.

Change log

Engine versionDateChange
0.12026-09-29First version: volume, chlorine targets, dosing for all common product types, pH model, LSI, validation, and display rounding; 67 reference cases.
0.1 + site calculators2026-10-06Site-only equipment, water, and cost calculators (formulas above). The app's engine and its test cases did not change.
0.1 + site calculators2026-10-07Bucket test: a bucket that dropped more than the pool now says the test went wrong. Pump, pump run time, and filter calculators take and show gallons per hour (GPH). No dose changed.
0.1 + site calculators2026-10-11Corrected a reported statistic: the median ratio of rated to geometric capacity for the 26 above-ground pools with a stated fill level is 0.918, not 0.933 (0.933 is the median of all 33 pools). The 0.93 and 0.87 correction factors, all formulas, and all doses are unchanged. Details: capacity study.

Sources

  • CDC, Home pool and hot tub water treatment and testing: cdc.gov
  • CDC, Model Aquatic Health Code 2024, Annex: cdc.gov (PDF)
  • CDC, pool chemical injuries 2008–2017: archive.cdc.gov
  • Taylor Technologies, K-1005 instruction manual and treatment tables: PDF
  • Taylor Technologies, Watergram on water balance: PDF
  • PHTA fact sheet, Sodium hypochlorite: phta.org
  • PHTA fact sheet, Dichlor: phta.org
  • PHTA technical bulletin, Boric acid and sodium borates: phta.org
  • PHTA, Water balance indexes: phta.org
  • OxyChem, Sodium Hypochlorite Handbook (density table): PDF
  • EPA label, Clorox Regular Bleach, Reg. No. 5813-1 (2011): epa.gov (PDF)
  • Hayward, AquaRite manual: PDF; How much salt to add: hayward.com
  • Orenda, pKa and alkalinity buffering: blog.orendatech.com; Understanding labeled chlorine percentages: blog.orendatech.com
  • Wikipedia, Hydrochloric acid (density table): wikipedia.org
  • Leslie's, How to calculate pool volume (kidney approximation): lesliespool.com
  • Manufacturer capacities: intexcorp.com and bestwayusa.com product pages, read 2026-09-29 (links in the gallons chart).
  • City of Chandler, Arizona, Pool care (bucket test): chandleraz.gov
  • ICC CodeNotes, Velocity limits in the 2021 ISPSC (pipe flow limits, APSP-15 design flow): iccsafe.org (PDF)
  • NSF ballot 50i219r1, Cartridge filter flow rate (NSF/ANSI 50 Table 6.4): standards.nsf.org (PDF)
  • Hayward, ProSeries 24 in sand filter and ProGrid DE4820 ratings: hayward.com, hayward.com
  • ENERGY STAR, Pool pumps: energystar.gov; PNNL Building America Solution Center, Variable-speed pool pumps: basc.pnnl.gov
  • U.S. DOE Energy Saver, Swimming pool covers (archived copy, May 2026): energy.gov via web.archive.org
  • EIA, British thermal units: eia.gov; USGS, Water density: usgs.gov
  • NIST Handbook 44 (US customary measures): nist.gov; FDA, CPG Sec. 525.825 Vinegar: fda.gov
  • Secondary: legacy TFP pool calculator (used only to cross-check the pH model): legacy.poolcalculator.com