Aquarium · Planted tank & shrimp
CO2/pH/KH calculator
Planted tanks run injected CO2 to help plants grow, and the standard way to estimate how much is actually dissolved is indirect: measure pH and KH, then run them through a formula, since a direct CO2 test isn't something most hobbyists can do at home. That indirect math has a well-known temperature blind spot most calculators ignore. This one runs both the classic formula and a temperature-corrected version side by side so you can see how much that gap actually matters for your tank.
Temperature-compensated estimate
18.9 ppm
Typical planted-tank range
- Neither formula knows about tannins, humic acids from aquasoil, or other acids in your water. Those lower pH without adding CO2, which makes both formulas overestimate your real CO2 level. A drop checker or direct CO2 test is the only way to confirm the actual number.
Why shrimp need extra caution with CO2
CO2 injection isn't steady all day. It builds while the gas is running during the photoperiod and falls off once it's shut off at lights-out, so pH tracks that curve and swings lower during the day and higher overnight even though your KH hasn't changed. Fish generally tolerate this daily rhythm fine.
Shrimp are less forgiving of it. Shrimp and Snail Breeder's guidance on CO2 in shrimp tanks puts the danger threshold around 30 mg/L (ppm) of CO2, with 15 to 20 ppm as the safer working range for a shrimp tank, and specifically warns that shrimp tolerate gradual pH change but can be shocked or killed by a sudden swing in a short window. If your setup runs a solenoid on a timer, ramp CO2 on an hour or two before lights-on and taper it off before lights-out rather than switching it on and off abruptly, so the pH drift happens gradually instead of as a sharp step change.
Keep in mind this calculator gives you one snapshot in time. The same tank will read a different CO2 ppm at 2pm with the gas running full tilt than it will at 6am before the solenoid kicks on. If you keep shrimp, test at the point in the day when CO2 is highest (usually right before lights-out) so you know your worst case, not just your average.
What to actually buy
NilocG Aquatics Glass CO2 Drop Checker with 4dKH Solution
pH and KH can only estimate CO2 indirectly, and tannins or aquasoil can throw that estimate off. A drop checker with 4dKH solution shows you the real CO2 level in the water through a color change, which is the standard way planted-tank keepers cross-check a calculator like this one.
View on AmazonAs an Amazon Associate, ToolBrook earns from qualifying purchases.
Embed this calculator
Paste this on your own site. It includes a small credit link back to ToolBrook.
<iframe src="https://toolbrook.com/embed/aquarium/co2-ph-kh-calculator" width="100%" height="480" style="border:1px solid #D7DCD2;border-radius:12px;" title="ToolBrook calculator"></iframe>
How this is calculated
This tool runs two formulas side by side instead of picking one, because they can give meaningfully different answers and most competing calculators only show you one number without saying which formula it is.
The classic formula, used on planted-tank forums since the 1990s and published in The Krib's CO2/KH/pH chart, is CO2 (ppm) = 3 x KH x 10^(7 - pH). The "7" in that formula isn't arbitrary. It's the first dissociation constant (pKa) of carbonic acid, about 6.35 at 25°C (77°F), plus a fixed 0.65 conversion offset for the units used for KH and CO2. This formula assumes your water is at or near 25°C.
The temperature-compensated version swaps in the actual pKa for your water temperature instead of assuming 25°C. Carbonic acid's pKa isn't fixed. It rises as water cools, roughly 6.38 at 20°C and 6.58 near freezing, using the equation Harned and Davis published in 1943 and that Millero and Roy reconfirmed in 1997 for zero-salinity fresh water: pK1 = 3404.71/T + 0.032786T - 14.8435, where T is in kelvin. In a typical planted tank kept between 74 and 82°F, the two formulas land within a percent or two of each other. In a cooler tank, a cold-water shrimp setup, or a chiller-run tank, the gap gets wide enough to matter.
Both formulas share the same blind spot: they assume dissolved CO2 is the only thing pulling your pH down from what your KH alone would produce. Driftwood tannins, humic acids from aquasoil, and other organic acids also lower pH without adding any CO2, which makes both numbers here run high in tanks with a lot of wood or fresh aquasoil. A drop checker with 4dKH indicator solution reads the actual CO2 level in the water, not just what pH and KH imply, and is worth using alongside this calculator rather than instead of it.
Sources
Frequently asked questions
Which formula should I actually trust, the classic one or the temperature-compensated one?
In a typical planted tank kept between 74 and 82°F, they land close enough that it doesn't matter much which one you read. Below that range, in a chiller-run tank, or in cold-water and shrimp setups, use the temperature-compensated number, since the classic formula's fixed pKa assumption starts drifting from reality as water cools.
My drop checker and this calculator disagree, which one is right?
Trust the drop checker for the actual CO2 level. Both formulas here are indirect estimates built on the assumption that CO2 is the only thing lowering your pH below what KH alone would produce, and driftwood tannins or fresh aquasoil both add organic acids that break that assumption. A drop checker with 4dKH solution measures a real color-change reaction to CO2 specifically, which is why it can read differently from the math.
Why does my pH swing during the day even though I haven't changed anything?
That's CO2 injection working as intended, not a problem. pH tracks CO2 level in real time, so it drops while the gas is running during the photoperiod and climbs back up once it shuts off at lights-out, even though your KH hasn't moved. This is a normal daily rhythm most fish tolerate fine.
Is this calculator safe to use for a shrimp tank?
Use it, but read the shrimp-specific guidance below the calculator first. Shrimp are more sensitive to CO2 and to fast pH swings than most fish, and the single pH/KH reading this tool gives you is only a snapshot, not your tank's daily high.