The Chemistry of Coffee and Caffeine

By Published On: April 18, 2017Last Updated: September 18, 2022

Coffee and chemistry go hand-in-hand! We can discuss many aspects of coffee chemistry, from the roasting process to extraction and the burning question we ask ourselves as we pour ourselves yet another cup: ‘how much caffeine will kill you?’ We’ll touch on some of these in this article on the chemistry of coffee and caffeine.

Coffee Beans Begin as Fruits

Coffee beans are actually not beans, but the seed of the coffee fruit (surprise!). After being picked from the coffee tree, the fruit is processed so that the flesh is stripped off and only the seed remains. These ‘green’ seeds are then cleaned and dried to produce green coffee beans, which are shipped and ready for roasting.

It is important to note that these green coffee beans contain a whole host of volatile compounds, some of which can taste bitter and unpleasant. These compounds are released upon steeping (soaking in hot water), hence we don’t make coffee out of green coffee beans!

coffee beans unroasted

The Roasting Process

In the next stage of coffee production, the unpleasant-tasting volatile compounds are neutralized by roasting the raw green coffee beans. Roasting also produces the characteristic color and aroma of freshly roasted coffee beans by the creation of Maillard reaction products (MRPs), key molecules also found in baked products.

The higher the temperature at which coffee beans are roasted, the oilier and darker in color they get. This is due to oxidation reactions occurring within the chemicals inside the bean, which are slowly expelled and broken down.

coffee beans

Caffeine is a stable molecule due to its aromaticity (ten π electrons within its 5,6 ring core). We can extract caffeine from beans by passing soaked coffee beans through activated charcoal. This caffeine extract is used in soft drinks and caffeine tablets, while the now caffeine-less beans sold as ‘decaffeinated’ beans.

Caffeine: The Main Molecule

Chemical Stability

As mentioned earlier, caffeine being stable means it is difficult to break down. However, roasting the beans results in some caffeine decomposition. This means that very dark beans tend to have a lower caffeine content compared to lighter roasts.

However, the majority of other chemicals present in coffee—that give the aroma and taste characteristic of the bean—are broken down much quicker. This is the reason why absurdly dark roasts lose much of their aroma.

You might be wondering why dark roasts even exist since they have less caffeine and aroma than lighter roasts. Well, most regular coffee drinkers make their coffee using soluble forms or through a drip system; systems that produce coffee under low pressures. If the coffee bean roast is too light, these methods aren’t capable of extracting enough aroma and chemicals for a decent cup of coffee. This is the reason why espresso machines and devices like the Aeropress exist! They utilize high pressures so that caffeine and aromatic chemicals can be extracted from even the lightest of roasted beans.

Lethal Dose of Caffeine

Okay, we’ll finally get to the part all of you have been waiting for; how much caffeine will kill you? Caffeine enters the bloodstream quickly and is an antagonist of the adenosine receptor in the brain, causing constriction of blood vessels and increasing blood pressure by blocking the effects of adenosine (vasodilation)2.

The body quickly recognizes that caffeine is a foreign chemical and begins the process of removing it. First, it is metabolized in the liver by cytochrome P450 enzymes into 3 metabolites, each with further physiological effects. These metabolites are then processed further before finally being excreted.

caffeine metabolites paraxanthine theobromine theophylline

The lethal dose of caffeine is 3 to 10 grams3—depending on an individual’s age, gender, metabolism, etc.—which equates to drinking around 30 shots of single espresso (~100 mg caffeine) in one sitting.

Ventricular arrhythmia, in which the heart no longer contracts properly, the tissues no longer receive blood, and the patient dies, is the most common cause of caffeine-related sudden death.

Death by coffee? (Source)

Alright, I’m out of coffee. Time to make myself a perfectly brewed espresso.


  1. Illy, A., & Viani, R. (2005). Espresso coffee: the science of quality. Academic Press.
  2. Daniels, J. W., Molé, P. A., Shaffrath, J. D., & Stebbins, C. L. (1998). Effects of caffeine on blood pressure, heart rate, and forearm blood flow during dynamic leg exercise. Journal of Applied Physiology, 85(1), 154-159.
  3. Sepkowitz, K. A. (2013). Energy drinks and caffeine-related adverse effects. Jama, 309(3), 243-244.

About the Author

sean author
Sean Lim

Sean is a consultant for clients in the pharmaceutical industry and is an associate lecturer at La Trobe University, where unfortunate undergrads are subject to his ramblings on chemistry and pharmacology.

You Might Also Like…

Go to Top