How the calculators work
Every calculator on this site runs the same small library of pure functions, and the reference tables on each page are generated from those same functions when the site is built, so the table and the calculator always agree. Inputs are US units; metric values are converted with the constants below.
The volume, water-chemistry and cost-range functions are covered by an automated test suite that checks each formula against hand-calculated reference values, including the worked examples on this page. If you find a result that does not match the math documented here, please tell us through the contact page.
Units and conversion constants
These are the exact constants in the code. Results on the site are rounded for display.
| Constant | Value | Used for |
|---|---|---|
| US gallons per cubic foot | 7.480519 | All volume results |
| Liters per US gallon | 3.785411784 | Metric output; all chemistry (ppm = mg/L) |
| Grams per ounce (weight) | 28.349523 | Dry product doses |
| mL per US fluid ounce | 29.5735296 | Liquid product doses |
| Pounds per gallon of water | 8.34 | Salt and salt-cell math |
The 7.48 gallons per cubic foot and 8.34 pounds per gallon figures match the USGS water conversion factors. One cubic meter is 1,000 liters, or about 264.2 US gallons.
Pool volume formulas
Volume is surface area times average depth times 7.480519. For sloped floors, average depth is the midpoint of the shallow and deep ends.
average depth = (shallow + deep) ÷ 2
rectangle = L × W × avg depth × 7.480519
round = (π ÷ 4) × D² × avg depth × 7.480519 (≈ D² × avg depth × 5.875)
oval = (π ÷ 4) × L × W × avg depth × 7.480519 (ellipse area)
kidney = 0.45 × (A + B) × L × avg depth × 7.480519
fill time (h) = gallons ÷ GPM ÷ 60
For kidney pools, A and B are the widths of the two lobes and L is the overall length. The 0.45 factor is an approximation of freeform area, so treat kidney results as estimates.
Worked example. A 16 × 32 ft rectangle with a 3.5 ft shallow end and 7.5 ft deep end has an average depth of 5.5 ft: 32 × 16 × 5.5 × 7.480519 = 21,065 gallons. A 24 ft round pool at 4 ft: 0.7854 × 576 × 4 × 7.480519 = 13,536 gallons.
Chlorine dose math
Chlorine doses are calculated from the mass of available chlorine needed, because 1 ppm in water equals 1 mg per liter.
grams of available chlorine = ppm × liters ÷ 1,000
liquid (trade %): mL = grams ÷ (trade % ÷ 100) → fl oz = mL ÷ 29.5735
dry (% available): grams = grams ÷ (strength % ÷ 100) → oz = grams ÷ 28.3495
Trade percent on liquid chlorine is weight per volume (grams of available chlorine per 100 mL), which is why it divides directly into milliliters. Raising 10,000 gallons by 1 ppm needs 37.85 g of available chlorine: 12.8 fl oz of 10% liquid, 21.3 fl oz of 6% bleach, 2.05 oz of 65% cal-hypo, 2.38 oz of 56% dichlor or 1.48 oz of 90% trichlor.
Side effects of stabilized and calcium chlorine. The calculators also report what each product adds to the water, from molecular weights (Cl2 70.906, cyanuric acid 129.07, CaCO3 100.09):
| Product | Adds per 1 ppm FC | Formula |
|---|---|---|
| Trichlor | 0.61 ppm CYA | 129.07 ÷ (3 × 70.906) |
| Dichlor | 0.91 ppm CYA | 129.07 ÷ (2 × 70.906) |
| Cal-hypo | 0.71 ppm calcium hardness | (1 ÷ 70.906 ÷ 2) × 100.09 |
| Liquid chlorine | Nothing | — |
Free chlorine and CYA guideline levels
Recommended free chlorine (FC) levels are expressed as a share of cyanuric acid (CYA), following the FC/CYA relationship popularized by the Trouble Free Pool Chlorine/CYA chart.
minimum FC = max(1, 0.075 × CYA)
target FC = max(2, 0.115 × CYA) (tables show target to target + 2)
shock FC = max(10, 0.40 × CYA)
Suggested CYA is 30–50 ppm for chlorine pools and 60–80 ppm for saltwater pools. At CYA 40, that gives a minimum of 3 ppm, a target of about 4.6–6.6 ppm and a shock level of 16 ppm.
pH: the carbonate and cyanurate buffer model
Acid and soda ash doses come from a closed-system buffer model that accounts for carbonate alkalinity, cyanurate alkalinity and water itself. The constants are effective values for typical pool water (around 1,000 ppm dissolved solids).
| Constant | Value |
|---|---|
| Carbonic acid pK1 | 6.3 |
| Bicarbonate pK2 | 10.2 |
| Water pKw | 14.0 |
| Cyanuric acid pKa | 6.88 |
| Equivalent weight of CaCO3 | 50.04 |
The steps:
[H+] = 10^(−pH)
α1 = 1 ÷ (1 + [H+]/K1 + K2/[H+]); α2 = α1 × K2 ÷ [H+]
carbonate factor = α1 + 2·α2
water alkalinity = Kw/[H+] − [H+] (eq/L)
cyanurate alk = (CYA ÷ 129.07 ÷ 1000) × 1 ÷ (1 + 10^(6.88 − pH)) (eq/L)
carbonate alk (ppm) = max(1, TA − cyanurate alk × 1000 × 50.04)
total carbonate CT = (carbonate alk ÷ 50.04 ÷ 1000 − water alk) ÷ carbonate factor
alk(pH) = CT × carbonate factor(pH) + water alk(pH) + cyanurate alk(pH)
acid (eq) = [alk(start pH) − alk(target pH)] × liters
acid density (g/mL) ≈ 1 + 0.005 × acid % (close fit for 10–35% HCl)
acid (mol/mL) = density × (acid % ÷ 100) ÷ 36.46
acid (fl oz) = acid eq ÷ mol per mL ÷ 29.5735
soda ash (mol/L) = [CT·S2 + water alk(target) + cyanurate alk(target) − alk(start)] ÷ (2 − S2)
where S2 = carbonate factor at the target pH
soda ash (oz) = mol/L × liters × 105.99 ÷ 28.3495
Soda ash adds both carbonate and two equivalents of alkalinity per mole, which is why it appears on both sides of its equation. It raises TA by 2 × mol ÷ liters × 1000 × 50.04 ppm.
Worked example. Lowering 10,000 gallons from pH 7.8 to 7.5 with TA 80 ppm and CYA 40 ppm takes about 8.8 fl oz of 31.45% muriatic acid.
Limitations. The model treats the pool as a closed system, so it ignores carbon dioxide escaping during the dose, and it ignores borates and other buffers, which increase acid demand. Treat the result as a starting estimate: add about half, circulate for 30 minutes, retest, then adjust.
Alkalinity, calcium, stabilizer and salt
These balancers use straight stoichiometry from molecular weights (NaHCO3 84.007, CaCl2 110.98, CaCO3 100.09, HCl 36.46).
baking soda (lb) = (ΔTA ÷ 50.04) × liters × 84.007 ÷ 1000 ÷ 453.59
calcium chloride (lb) = (ΔCH ÷ 100.09) × liters × 110.98 ÷ 1000 ÷ (purity % ÷ 100) ÷ 453.59
stabilizer (oz) = ΔCYA × liters ÷ 1000 ÷ 28.3495 (assumes 100% cyanuric acid)
acid to lower TA = (ΔTA ÷ 50.04 ÷ 1000) × liters eq, converted with the acid formula above
salt (lb) = Δppm × gallons × 8.34 ÷ 1,000,000
salt cell (lb Cl2/day) = daily FC loss × gallons × 8.34 ÷ 1,000,000
Per 10,000 gallons, these give 1.40 lb of baking soda per 10 ppm TA, 1.20 lb of 77% calcium chloride (0.98 lb at 94%) per 10 ppm CH, 13.4 oz of stabilizer per 10 ppm CYA, 25.6 fl oz of 31.45% acid per 10 ppm of TA removed, and 267 lb of salt to go from 0 to 3,200 ppm. A 20,000-gallon pool losing 3 ppm a day needs a cell that makes about 0.5 lb of chlorine per day.
Dilution: lowering levels by replacing water
Calcium, CYA and salt can only be lowered by replacing water. When your fill water contains some of the same substance, the share to replace is:
share to replace = (current − target) ÷ (current − fill water level)
With fill water at zero this becomes 1 − target ÷ current. If the fill water is already at or above the target, dilution cannot reach it and the calculator says so. Example: calcium at 500 ppm, target 300, fill water 100 → (500 − 300) ÷ (500 − 100) = 50%.
Saturation index (LSI)
The saturation index is the Langelier-style formula pool operators use, with the alkalinity factor based on carbonate alkalinity after the cyanurate correction above.
SI = pH + TF + CF + AF − C
CF = log10(calcium hardness) − 0.4
AF = log10(carbonate alkalinity)
C = 12.1 (12.2 for saltwater pools)
| Water temp (°F) | 32 | 37 | 46 | 53 | 60 | 66 | 76 | 84 | 94 | 105 |
|---|---|---|---|---|---|---|---|---|---|---|
| TF | 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
Between rows, TF is interpolated linearly; below 32°F it is 0.0 and above 105°F it is 0.9. We label −0.3 to +0.3 as balanced; negative water tends to etch plaster and corrode metal, positive water tends to scale. Taylor Technologies’ guide to the Langelier Saturation Index is slightly more tolerant: it treats 0 as balanced, needs no adjustment within ±0.5, and warns that above +0.5 can cause cloudiness and scaling while below −0.3 can corrode concrete or metal surfaces.
Worked example. pH 7.5, 82°F, calcium 300 ppm, TA 90 ppm, CYA 40 ppm. TF = 0.675; CF = log10(300) − 0.4 = 2.077; carbonate alkalinity = 77.5 ppm, so AF = 1.889. SI = 7.5 + 0.675 + 2.077 + 1.889 − 12.1 = +0.04, balanced.
Pool cost ranges
Cost ranges are compiled from named national cost guides, each fetched and read on October 5, 2026. For each pool type and add-on, the range runs from the lowest low to the highest high across the sources, so it covers every published figure rather than averaging them away.
basic = low + (high − low) × [0, 1/3]
typical = low + (high − low) × [1/3, 2/3]
premium = low + (high − low) × [2/3, 1]
total = level range + each selected add-on range + deck sq ft × ($25 to $50)
The project level places your estimate in the lower, middle or upper third of the published range. For a concrete pool ($50,000–$120,000), typical is $73,333–$96,667, shown rounded to the nearest $100.
The yearly upkeep calculator uses your inputs only: pump kWh = watts ÷ 1,000 × hours per day × months × 30.4, plus chemicals × months, service × months and your repair reserve. Published upkeep ranges are shown alongside for comparison. These are budgeting estimates, not quotes.
How we keep this page current
When a formula or constant changes in the code, we update this page, the reference tables regenerate from the new code, and we change the date shown at the top of the page. Cost figures are re-checked against their sources when we refresh the cost pages, and each cost page names its sources so you can read them yourself.