Carbonate hardness (KH) is the buffering capacity that keeps aquarium pH stable. When KH drops, pH can swing dramatically — a single overnight CO2 buildup without enough buffer can crash pH low enough to stress or kill fish. This calculator tells you exactly how much sodium bicarbonate (plain baking soda) or commercial buffer to add to raise KH from where it is now to your target.
How it works
The dose is based on a well-established hobby rule: approximately 1 gram of pure sodium bicarbonate per US gallon raises alkalinity by about 1.4 dKH. Rearranged for any volume and any KH gap:
gap (dKH) = target KH − current KH
grams NaHCO3 = (gap / 1.4) × (volume in US gallons)
Volumes entered in litres are converted at 3.785 litres per US gallon first. If your test kit reads in ppm CaCO3, divide by 17.86 to get dKH before entering.
What KH actually does in an aquarium
KH (carbonate hardness, also called alkalinity or total alkalinity) measures the concentration of carbonate and bicarbonate ions in the water. These ions act as a chemical buffer, neutralising acids that build up naturally from fish respiration, bacterial activity, CO2 injection in planted tanks, and coral calcification in reef systems.
Without sufficient KH, any acid-producing process can push pH below the safe range for fish and invertebrates. A KH below about 3 dKH is considered dangerously low in most freshwater setups; reef tanks typically target 7–11 dKH to support coral growth. KH decreases over time in established tanks, so a one-off correction is rarely enough — regular testing and maintenance dosing keep it stable.
Worked example
A 200 litre reef tank at 6 dKH where you want 8 dKH has a 2 dKH gap. Converting 200 L to approximately 52.8 US gallons:
(2 / 1.4) × 52.8 ≈ 75 g of sodium bicarbonate
Split this across two days (roughly 37 g each day) and retest with a kit between doses to avoid raising KH too quickly.
Dosing safely
- Dissolve before adding. Mix the calculated dose in a cup of tank water first, then pour it slowly near a powerhead or return pump. This prevents localised pH spikes from concentrated powder.
- Raise no faster than about 1 dKH per day in a stocked system. Rapid swings stress fish and corals even if the final target value is correct.
- Retest before each dose. Stick to one test kit per parameter and test at the same time of day — KH can vary naturally with lighting and CO2 cycles.
- Commercial buffers vs baking soda. Commercial KH-up products may blend in sodium carbonate (Na2CO3), which raises KH more abruptly and also raises pH more strongly than bicarbonate alone. Read the label and enter the product’s stated grams-per-dKH rating to get the right dose from this calculator.