You really can't use aquarium water to determine your CO2 level by measuring pH and KH. Aquarium water isn't comprised of only carbonate buffers. There are phosphate buffers, other bases and acids that can greatly skew your test results. Usually this measurement indicates higher CO2 levels than is what really present because it is skewed. The pH, KH and CO2 relationship only works when the only buffers are carbonates.
The pH-KH-CO2 Relationship
pH, KH, and CO2 have a fixed relationship as long as carbonate is the only buffer present (no phosphate buffers like pH-UP and- DOWN, Discus Buffer, etc). There are some parts of the country that have high levels of phosphates in their water supply. For those cases, determining CO2 levels will be difficult, as the phosphate will throw off the pH-KH-CO2 relationship, which means the CO2 charts and calculator below won't work. Note that the commercially available CO2 test kits will also be invalidated by the phosphates.
NOTE: If you aren't adding CO2 to your water, and the CO2 level based on the pH and KH indicates more than 5ppm, then it is very likely that some other buffer (such as phosphate) is present in your water. In an inhabited aquarium, the amount of CO2 produced by the fish will not have an effect on CO2 levels in the water. Any excess CO2 created by fish will dissipate into the air, leaving a fairly constant CO2 level of about 3-4ppm. If you test your pH and KH, and without adding any CO2, the chart says you've got 20ppm CO2, don't believe it.
In some case, water coming right from the tap can contain very high or very low levels of CO2. This can result in tap water with a high KH, and low pH. But, in just a few hours, that excess CO2 will dissipate from the water, leaving the normal 3-4ppm, and the pH will rise. Sometimes, the water might come from the tap with extremely little CO2, which can result in tap water with a low KH, and a very high pH. Again, after a few hours, the CO2 level will equalize, and the water will end up with 3-4ppm CO2.
CO2/pH/KH calculator and chart
NOTE:This calculator (and the chart based on this formula) will only work if your water is carbonate buffered. If your water contains high levels of phosphates, it will alter your water properties, and invalidate these CO2 calculations.