How the calculator adds up your caffeine
Each item uses the caffeine content per 100 grams listed in the USDA's FoodData Central database, multiplied by a standard serving weight. Brewed coffee lists 40 mg per 100 g, so an 8 fl oz (237 g) cup comes to about 95 mg. An espresso shot is about 64 mg, black tea about 47 mg, green tea about 28 mg, a 12 oz cola about 33 mg and a small energy drink about 75 mg. The full table, with USDA IDs, is shown under the calculator.
Real drinks vary a lot. The FDA notes a 12 oz coffee can hold anywhere from 113 to 247 mg and energy drinks from 41 to 246 mg, so use the "Other caffeine" box for anything with a label, such as pre-workout powders, caffeine pills or large coffee-shop sizes.