function calculateChlorine() {
var volume = parseFloat(document.getElementById('poolVolume').value);
var current = parseFloat(document.getElementById('currentCl').value);
var target = parseFloat(document.getElementById('targetCl').value);
var type = document.getElementById('chlorineType').value;
var resultDiv = document.getElementById('poolResult');
var output = document.getElementById('dosageOutput');
var unitNote = document.getElementById('unitNote');
if (isNaN(volume) || isNaN(current) || isNaN(target) || volume <= 0) {
alert("Please enter valid numbers for all fields.");
return;
}
var delta = target – current;
if (delta <= 0) {
output.innerHTML = "0 oz";
unitNote.innerHTML = "Your current chlorine level is already at or above the target.";
resultDiv.style.display = "block";
return;
}
var amount = 0;
var unit = "ounces";
var description = "";
// Standard factors: Amount required to raise 10,000 gallons by 1ppm
switch (type) {
case 'liquid12':
amount = delta * (volume / 10000) * 10.7;
unit = "fl oz";
description = "(Measured by volume)";
break;
case 'liquid10':
amount = delta * (volume / 10000) * 12.8;
unit = "fl oz";
description = "(Measured by volume)";
break;
case 'calHypo65':
amount = delta * (volume / 10000) * 2;
unit = "oz";
description = "(Measured by weight)";
break;
case 'dichlor56':
amount = delta * (volume / 10000) * 2.4;
unit = "oz";
description = "(Measured by weight)";
break;
case 'trichlor90':
amount = delta * (volume / 10000) * 1.5;
unit = "oz";
description = "(Measured by weight)";
break;
}
output.innerHTML = amount.toFixed(1) + " " + unit;
unitNote.innerHTML = "To increase Free Chlorine by " + delta.toFixed(1) + " ppm in a " + volume.toLocaleString() + " gallon pool. " + description;
resultDiv.style.display = "block";
}
How to Use the Pool Chlorine Calculator
Maintaining the correct chemical balance in your swimming pool is essential for swimmer safety and water clarity. This calculator helps you determine the precise amount of chlorine needed to reach your target Free Chlorine (FC) levels without over-treating your water.
Step-by-Step Instructions
Step 1: Enter your pool volume in gallons. If you aren't sure, most rectangular pools are Length x Width x Average Depth x 7.5.
Step 2: Select your chlorine source. Liquid bleach, Calcium Hypochlorite (Cal-Hypo), and stabilized chlorines like Dichlor or Trichlor all have different concentrations.
Step 3: Use a reliable test kit (like a DPD or FAS-DPD test) to measure your current Free Chlorine level in ppm (parts per million).
Step 4: Enter your target chlorine level. For most residential pools, 2.0 to 4.0 ppm is the ideal range.
Understanding Chlorine Types
The type of chlorine you choose impacts more than just the dosage. It affects your pool's pH and Cyanuric Acid (CYA) levels:
Type
Strength
Effect
Liquid Chlorine
10% – 12.5%
Salt-based, no CYA added. Best for daily maintenance.
Cal-Hypo
65% – 73%
Granular. Adds calcium to the water.
Trichlor
90%
Slow-dissolve tablets. Adds CYA and lowers pH.
Dichlor
56%
Fast-dissolve granules. Adds significant CYA.
Why Accuracy Matters
Adding too much chlorine can lead to skin and eye irritation, and it can even bleach swimsuits and liners. Conversely, low chlorine levels allow algae to bloom and bacteria to thrive. Using this calculator ensures you keep your water sanitized while protecting your equipment and the comfort of your guests.
Pro Tip: Always add chemicals to water, never water to chemicals. For liquid chlorine, pour it slowly in front of a return jet while the pump is running to ensure proper distribution.