There are a number of ways to cut the eye-opening power of a cup of joe, but the methods are basically pretty similar. First, processors use water or steam to swell the green beans, then they extract the caffeine using a solvent. Water, ethyl acetate, methylene chloride, or highly pressurized carbon dioxide strip the caffeine away from the beans, which are then steamed to remove any solvent residues and dried.

Do these methods get all the caffeine out?

Not quite, but it strips away quite a bit. According to U.S. law, any decaffeinated coffee must retain less than 2.5% of its caffeine, while in the EU only 0.1% of decaf beans’ dry weight can be caffeine. According to the International Coffee Organization, a cup of decaf has around 3 mg of caffeine in it, while the average 5 oz. cup of drip coffee contains 115 mg.

What happens to all the caffeine that gets stripped from the coffee?

It would be a shame for all that caffeine to go to waste—there are undercaffeinated children in third-world countries, you know—so processors save and sell the jittery gold. Pharmaceutical companies and soft drink makers are the big customers for the extracts; although the kola nut provides a bit of a jolt for your cola, the majority of the caffeine in your soda comes from the addition of caffeine extracted from coffee beans during decaffeination.

This post originally appeared in 2010.