In a planted aquarium, dissolved CO2 is the single biggest lever on plant growth, yet you cannot measure it directly. This calculator infers it from two things you can measure — pH and carbonate hardness — using the carbonate buffer equilibrium, and tells you whether you are in the healthy 20 to 30 ppm band.
How it works
Carbon dioxide dissolves to form carbonic acid, which lowers pH for a given carbonate hardness. The standard aquarium relationship is:
CO2 (ppm) = 3 × KH(dKH) × 10^(7 − pH)
A lower pH at the same KH means more dissolved CO2. Every 1.0 unit drop in pH roughly multiplies CO2 tenfold, which is why a tank degassing overnight drifts its pH upward.
Worked examples
Well-tuned high-light planted tank: KH = 4 dKH, pH = 6.6 CO2 = 3 × 4 × 10^(7 − 6.6) = 12 × 10^0.4 ≈ 30 ppm — right at the upper target. A good starting point for demanding plants.
Moderate planted tank: KH = 5 dKH, pH = 6.8 CO2 = 3 × 5 × 10^(7 − 6.8) = 15 × 10^0.2 ≈ 24 ppm — solidly in the target zone, comfortable for most fish.
Insufficient CO2 (plant growth slow): KH = 5 dKH, pH = 7.2 CO2 = 3 × 5 × 10^(7 − 7.2) = 15 × 10^(−0.2) ≈ 9.5 ppm — below the 15 ppm minimum for meaningful plant growth. Increase injection rate.
Risk zone: KH = 3 dKH, pH = 6.4 CO2 = 3 × 3 × 10^(7 − 6.4) = 9 × 10^0.6 ≈ 36 ppm — above 30 ppm. Watch for fish gasping at the surface; reduce CO2 injection.
The pH-KH-CO2 relationship in practice
The formula describes a triangular relationship: fix any two values and the third is determined. This has several practical implications:
KH acts as a buffer. A higher KH makes pH more resistant to the acidifying effect of CO2 injection. A tank at KH 8 will have a smaller pH drop from the same amount of CO2 injection than a tank at KH 2, because the carbonate ions neutralise the carbonic acid. Tanks with very low KH can experience sudden pH crashes if CO2 is added too quickly.
Day/night CO2 swings. Plants consume CO2 during the photoperiod, which would raise pH. Your injection system replaces it, keeping pH stable. At lights-off, injection stops but plants switch to respiration (producing CO2), and then overnight the CO2 degasses — pH typically rises 0.3 to 0.5 units by morning in a well-planted tank. This daily swing is normal.
Testing timing matters. Test pH in the afternoon, several hours into the photoperiod after CO2 has been running, not first thing in the morning when the tank has been degassing all night. Morning readings will show artificially high pH and suggest insufficient CO2 even if injection is working correctly.
When the formula is unreliable
The formula assumes carbonic acid is the only source of acidity. It breaks down when:
- Peat, driftwood, or blackwater extracts add humic and tannic acids that lower pH independently of CO2. The calculated CO2 will be inflated.
- Phosphate buffers or pH-down chemicals artificially depress pH without reflecting dissolved gas.
- Very high or very low KH (below 2 dKH or above 15 dKH) pushes the calculation outside the range where the simplified formula is accurate.
In soft, blackwater tanks, use a drop checker with a reference solution as your primary CO2 indicator; treat this calculator as a secondary cross-check.