About this tool
The Planted Tank CO2 / KH-pH Calculator is a free, in-browser tool that estimates the dissolved carbon dioxide in a planted aquarium from two easy measurements: carbonate hardness (KH) and pH. It uses the classic aquarium relationship CO2 (ppm) = 3.0 × KH (dKH) × 10^(7.00 − pH), the same equation behind the printed KH/pH/CO2 charts hobbyists tape to their tanks. Enter KH in dKH (or ppm CaCO3, converted at 1 dKH = 17.86 ppm) and your current pH, and it returns the estimated CO2 plus a status band. Everything runs locally in your browser, so nothing you enter is uploaded.
The status bands follow common planted-tank guidance: below 15 ppm is low for demanding plants, 20–30 ppm is the optimal injected-CO2 target, 30–40 ppm is high and warrants watching your fish for surface gasping, and above 40 ppm is dangerous. If you enter a target CO2, the tool solves for the pH you must reach: required pH = 7.00 − log10(target ÷ (3.0 × KH)), and reports the pH drop needed from your current reading, which is what your CO2 injection rate ultimately controls.
As a worked example, a tank at KH 4 dKH and pH 6.8 has CO2 = 3.0 × 4 × 10^(7.0 − 6.8) = 12 × 10^0.2 ≈ 19.0 ppm. To reach 30 ppm at the same KH, required pH = 7.00 − log10(30 ÷ 12) ≈ 6.60, a drop of about 0.20 pH units. Important caveat: this method assumes carbonate is the only buffer. Phosphate buffers, tannins, or commercial pH-down products break the relationship, so confirm the reading with a drop checker before pushing CO2 higher.