The Science of Coffee Roasting

Anyone can throw raw coffee beans into a popcorn popper, but can you actually roast professional-quality coffee at home?

Published Sept. 18, 2016.

“Sweet chocolate flavors, citrus complexity, and floral characteristics with fruit throughout the middle,” the notes on the bag promise.

When I take a taste, the citrus is there, but it’s more sour than sweet. There’s an overall dullness and a hint of something that reminds me of corn husks. Floral notes are nowhere to be found. It’s not terrible coffee, but it could be much better. The question is how?

I pride myself on making an excellent cup of coffee. I splurge on freshly roasted beans from estimable sources, I’ve fine-tuned my grinding and my water temperatures, and I know how small changes in these variables affect the taste of the brew, which I like black and a little short of piping hot. Now I’m going a step further.

Instead of buying one pound of ultrafragrant beans from my local roaster, I’ve spent only a little more to mail-order five pounds of raw, green coffee beans, and I’m roasting them myself. The descriptors on the bag serve more as a hopeful direction-finder than a guarantee of what’s inside. Home roasting is much more affordable per pound (green beans run $5 to $7, less in large quantities, with minimal loss of quality). But more importantly, it gives you control. Brewing has its ins and outs, but the real power is in the hands of the roaster. It’s in the act of roasting that the flavors in the cup are shaped, and the promise of the green bean is fulfilled. I want that.

At George Howell Coffee Roastery, in Acton, Massachusetts, 300,000 pounds of coffee are roasted every year. “It’s both an art and a science,” says COO Rebecca Fitzgerald. Cook’s Illustrated photographer Kevin White recently visited the roastery to take a closer look.

Roasting at Home: The Basics

Until it’s roasted, green coffee has little of the appealing character of the stuff we drink. Certainly there’s no chocolate or fruit to be discerned in the bag I’m working with. I stick my nose over the bag and inhale. There’s a haunting piney, winy smell. It’s nothing like brewed coffee.

By carefully planning how much heat the bean gets during the various phases of roasting, an experienced coffee roaster can manipulate how the final cup will taste, accentuating particular characteristics, muting others, and even developing the mouthfeel and body of the beverage. A novice, on the other hand, can turn a fine green coffee into an acrid, charred mess; a pale and sour brew; or, with practice, a drinkable but unexciting cup. To roast beans to just the right degree of doneness requires attention to smell, appearance, sound—but this is just the beginning. Getting much beyond that takes finesse. I’ve been working on this project for a while.

I weigh out a fresh 5-ounce dose of green beans—a small juice glass full—and get my roasting machine, the FreshRoast SR700, ready.

The FreshRoast SR700 ($259 on is in essence a fancy version of the hot-air popcorn popper in which I scorched my earliest roasting experiments. The FreshRoast works by blowing air through a glass chamber of beans from below, levitating them mesmerizingly. I drop in my beans, fire up the machine, and set the airflow (high) and the temperature (medium). Over several minutes, the coffee beans darken in color from yellow to tan to browner and browner, start to smell toasty and enticing, and eventually, bean by bean, give off a popping sound. I make a couple of adjustments to the settings as the roasting proceeds, lowering the airflow when the beans get less dense and increasing the heat gently. As the frequency of the pops dwindles, I hit the button that triggers the cooling cycle, ending the roast with cool air blowing through the browned beans.

A screen on top of the machine catches the flaky chaff that blows off, but the main improvement the FreshRoast provides over a popcorn popper is control. A USB connection to my laptop allows the temperature and airflow to be adjusted in increments, and whole sequences of changes can be saved as repeatable programs.

And the biggest lesson I’ve learned thus far? Sequences of changes are key to roasting coffee.

The raw, green beans wait for roasting at George Howell Coffee Roastery.

On a basic level, roasting a coffee bean is like roasting a turkey. Like a bird, the bean starts off cool and gets hot; like a bird, heating the bean causes a set of physical and chemical changes.

In coffee roasting, though, there are a lot of things going on that never happen in a turkey. If a turkey’s white meat and dark meat hit the temperatures you want them to, and along the way the skin gets crisp and golden, congratulations: you’ve successfully roasted a turkey. It doesn’t make that much difference what happens between its starting and finishing temperatures.

Two identical batches of coffee beans, however, roasted in the same machine, on the same day, to the same final temperature and color, can smell and taste radically different.

The contrast lies in the journey the coffee beans take from the beginning of the roast to the end. Is there a lot of heat at first that then tapers off? Is it slow, steady heat? Maybe the temperature got a boost toward the end, pushing the roast over the finish line.

That nuanced trajectory, which skillful roasters shape with a carefully planned series of adjustments throughout the process, is called the roast profile.

Countless chemical reactions happen during coffee roasting, and they happen at different moments, at different rates, and to different extents, depending on the specific evolution of the temperature of the bean over the roasting time. As a result, different flavors are created (or destroyed), and those differences are evident in the cup of coffee we drink.

In my next roast of the same beans, I go a little longer and make them a little darker. Now I definitely taste the promised chocolatiness, and the body is heartier, but it still tastes flat and like cardboard to me. By roasting longer, I’ve made it richer but lost some of the earlier acidic brightness that comes with a lighter roast. Worst of all, the cup of coffee has very little aroma at all. It lies flat in the cup. Maybe I should tuck the FreshRoast discreetly back in its cabinet and leave roasting to the pros.

The Probat is one of two machines used to roast coffee at George Howell Roastery.

Coffee Bean Science

When you roast green coffee beans, their color, not surprisingly, begins to change.

The bean, which starts off anywhere from steel gray to pea green, fades first, as its green chlorophyll breaks down. Then, as the Maillard reaction kicks in, the bean starts to turn yellow, then tan, then deeper and deeper brown.

The Maillard reaction, which develops flavor as well as color, is responsible for the delicious hue of very many of our favorite brown foods, from grilled steak to crusty bread to dark, malty beer. Amino acids and sugars in the coffee interact in a complicated cascade of reactions, producing hundreds of flavor compounds and compounds called melanoidins, which give coffee its brown color.

As the beans continue to get hotter, caramelization happens as well. While the Maillard reaction happens between sugars and amino acids, caramelization involves sugar alone. The main sugar present in green coffee is sucrose, which doesn’t partake in the Maillard reaction. Instead, the sucrose caramelizes, breaking down and yielding additional brown compounds.

If roasting continues further, the brown color will edge toward black, as sugars and cellulose begin to break down into carbon.

Color is not all that changes. As coffee roasts, it loses mass. The darker a coffee is roasted, the more it loses: water exits the bean in the form of vapor, and so do carbon dioxide, free nitrogen, and volatile compounds. A batch will typically lose 10 to 20 percent of its starting mass during roasting. At the same time, each bean can double in volume, due to the puffing when the vapor escapes.

Coffee roaster Matthew Hassell leans in to the Probat roaster to listen for the first crack, or the moment when the beans first fracture and puff as steam escapes, with a sound similar to popcorn popping. Even though he’s tracking the temperature and rate of rise using software, there’s no replacement for the sound of that crack.

Learning From the Experts

After the most recent dispiriting cup, the one that smelled like plain hot water, I figured it’s time to get some expert perspective.

Sweetleaf in New York, where I drink a lot of excellent coffee, has a sure yet delicate touch with roasting, so I invited myself to watch Rich Nieto, the owner, preparing to make espresso. He dumps 20 kilograms of green coffee beans into the heated belly of his Joper roaster, a Smart car–size machine from Portugal with a napped black metal finish that makes it look like a goth Thomas the Tank Engine.

Where my home machine uses a flow of hot air, the Joper, like most commercial roasting machines, is built around a rotating drum, sort of like a clothes dryer, that tumbles the beans above a powerful gas burner. While it does, our eyes stay on the screen of the laptop hooked to the Joper, where a temperature graph is slowly etched from left to right. The beans’ temperature rockets upward, 200°F (93°C), 250°F (121°C), slowing gracefully as it passes 300°F (149°C). Nieto dances back and forth between the screen and the roaster, making small, choreographed adjustments to the temperature and airflow to help the coffee beans follow a precise path along the graph.

Most modern roasters use software that translates the thermometer readings from within the machine into real-time curves that clearly illustrate the course of a roast. The typical curve, plotting temperature on the vertical axis and time from left to right, looks like a gracefully ascending checkmark: ✓. First, the temperature inside the roaster drops sharply: that’s when the beans went in. Then it climbs in a rise that slowly and smoothly rounds out, until the beans hit their target temperature and the roasting is over.

The screen also tracks other data; Nieto in particular keeps a very close eye on a line that calculates the rate at which the temperature is rising. The heat should keep increasing throughout the roast—I make a mental note for my home roasting—but, he emphasizes, the rate of the rise should go steadily down. I start to wonder if I should stick to turkey roasting.

These beans, destined for the blend of coffees that Sweetleaf uses for its espresso, are Colombian, and Nieto is roasting a dozen batches of them today. “Colombians take a lot of heat nicely,” says Nieto. “But with too much heat up front, it’ll taste tight, like a wine that needs to breathe. Too long a roast, it tastes flat.”

Right around 386°F (197°C), the steady purr of tumbling beans gives way to a sound like popping corn. Much like popcorn does, the coffee beans are fracturing and puffing as steam forces its way out of them. The tiny glass porthole in the Joper shows that they’ve roasted from pale green, through tan, to what now looks like a highly drinkable light brown. But Nieto has eyes primarily for the curves on the screen. A few minutes later, the beans are still making occasional popping sounds when he opens a hatch in the front of the drum and they flood fragrantly out into an air-cooled tray.

Those popping sounds are important. Coffee provides a pair of audible milestones during roasting, when the beans release energy, called first crack and second crack in the trade. As I experienced at Sweetleaf, first crack typically happens around 385° or 390°F (196°C or 199°C), and sounds very much like corn quietly popping. It occurs when the tough, woody cellulose of the bean can no longer withstand the increasing pressure of the hot water vapor inside, and it bursts out. The bean doesn’t explode like popcorn, but it puffs from within, becoming less dense, more porous, and more brittle. If those physical changes didn’t happen, grinding coffee and extracting flavor from it would barely be possible, given the gravel-like density of unpuffed beans.

At Sweetleaf, the roast is stopped not too long after first crack, around 405°F (207°C); Nina Glikshtern at Ninth Street Espresso in Manhattan continues just a little longer, until 418°F (214°C). At home, I’m mostly following suit. But those roasters who continue longer (to around 440°F), in pursuit of a darker roast, are rewarded with second crack, which is “like bacon sizzling in a pan,” says Gabe Cicale of Monkey Joe in Kingston, New York. Cicale’s description is corroborated by the light, rapid crackle of deep-brown, gently smoking beans falling into the cooling tray of his Diedrich roasting machine.

Second crack is when the cellulose itself starts to weaken and break apart under the influence of sustained heat. Carbon dioxide pushes out from the fractured cell walls, and so do oils, which will glisten and bead on the surface of darker-roasted coffee beans.

Using the Cropster software, which is popular for companies that roast, Hassell tracks both the temperature and the rate of rise as he roasts. The final color and temperature of the coffee beans are less important than the path they took to get there when it comes to creating the perfect cup of coffee.

Even with an extended stay in a 500°F (260°C) oven, a turkey won’t rise above 212°F (100°C), except on the very surface, because the abundant moisture inside it keeps the temperature low. That’s a good thing, unless you want turkey jerky. But in a little coffee bean, what little water is inside the bean evaporates and makes its exit, so most of the roasting takes place at temperatures above the boiling point of water, in the 200°Fs to 300°Fs (93°C to 149°C) .

The things that happen at these temperatures—caramelization, the Maillard reaction, Strecker reactions, pyrolysis—are essential to coffee’s flavor.

“Green coffee starts with 500 or 600 flavor chemicals, and roasted coffee probably has 1,000,” Scott Rao tells me. “But in the process you create millions and destroy millions.”

Rao is a jet-setting coffee consultant, author of professionals’ vade mecums, including The Coffee Roaster’s Companion, and friend and mentor to Rich Nieto.

A couple of mornings after roasting, I visit Nieto again, to evaluate the roasts we did. Rao happens to be in town, and we all meet up at Sweetleaf, where roaster Germán is preparing a blind cupping of dozens of different roasts. We bend over a table on which identical cups of hot coffee are laid out in a long line, giving each one deep sniffs, then, as they cool, tasting them with spoons. The differences from cup to cup are subtle—as intended, since Nieto has a particular flavor profile in mind that he’s trying to achieve in every cup. I pick up apricot, a tea-ishness, a faint tartness in the lightest roasts.

Rao works his way down the line of brews in lightning-quick succession. In between loud, aerated slurps, he offers quick notes: “These two are awesome . . . Good juiciness . . . A little more flatness on this one . . . There’s scope to roast this lighter.”

After the cupping, Rao runs me through some of the ups and downs of a properly planned and executed roast trajectory. As he describes a particular bugaboo of his—a defect called baked flavor—it starts to dawn on me that this may be the very thing that’s preventing me from getting the sweet cup I want. When a coffee spends too long in the roaster without enough heat, its sweetness and fragrance ebb away. Rao’s book on roasting discusses this phenomenon in detail: “If the ROR (rate of rise) is constant or horizontal, even for just 1 minute, it will also destroy sweetness and create ‘flat’ flavors reminiscent of paper, cardboard, dry cereal, or straw.” This sounds very much like the dull, corn husk–flavored beverage I’ve been contending with. Kenneth Davids, in his helpful book Home Coffee Roasting, calls this maltreated coffee: “The taste in the cup is flat and without aroma.”

As roasting progresses and coffee beans get darker and darker, the nature of the resulting cup evolves. Early in the roast, the flavors that predominate are characteristic of the bean itself: floral flavors highlighted by bright acidity. With longer roasting, that starts to give way to sets of flavors that come from the roasting reactions: caramel, darker fruit flavors with less acidity; then more bitter, spicy, chocolaty flavors, until finally the coffee tastes harsh and burnt.

How all the flavors develop during the roast is, of course, complicated. The Maillard and caramelization reactions produce vast families of flavors, only some of which are the toasty, nutty, malty ones we commonly associate with these reactions. The longer these reactions continue during the roast, the more of their end products that are in the cup.

Acidity in coffee comes partially from acids generated by the Maillard reaction, mostly acetic acid (the acid in vinegar). These increase, then decrease, as roasting continues. Other acids are naturally present in the bean: these include citric (the acid in lemons), malic (the acid in apples), lactic (the acid in yogurt), and most predominantly, a family called chlorogenic acids. During roasting, all these acids convert into many more different acids, a complex balance of which gives the final cup a lot of its character. Of all the compounds in coffee, writes Joseph Rivera, who was director of science and technology at the Specialty Coffee Association of America, “by far the most important when dealing with cup profile are the organic acids.”

Although caffeine is bitter, it’s not the main ingredient that gives bitterness to coffee. An alkaloid called trigonelline makes lighter roasts bitter, but it degrades during longer roasting; meanwhile, chlorogenic acids break apart into a number of bitter by-products that create the majority of the bitterness in dark roasts.

The sugars that abound in ripe coffee beans break down during the roast, but other sugars are formed, making a cup of coffee with real sweetness an elusive, sought-after goal. Cooling the beans after the roast as rapidly as possible is a major factor that helps convey sweetness to the final beverage.

Sugars, dissolved minerals, bitter and astringent compounds, and most acids contribute primarily to the taste of coffee but not to its aroma. Aroma is the province of 1,000 or more volatile compounds that emerge during roasting, the development of which is the most elaborate and least fully understood aspect of the process. A modern coffee shop menu is laden with aroma descriptors: peach, jasmine, tobacco, walnut, tangerine. All these impressions proceed from the aroma compounds. “There are several times more going on in coffee than there is in a glass of wine,” Rao says.

When the beans are done, Hassell releases them from the roaster, and lets them cool down.

Bringing It All Home

I’m determined to make it happen at home. I return to the FreshRoast, armed with the hypothesis about long baking and also with some new technology. I’ve wired in a pair of thermocouples to monitor the second-by-second temperature of the air inside the roaster and in the heart of what’s technically called the “bean pile.” On my laptop, I’m running Artisan software, an open-source equivalent of what Nieto uses to watch his temperature curves and his rate of rise.

Being able to see the curves helps—a lot. Now, for each batch I taste, I can review what happened during roasting and spot what might have gone wrong—or right.

To prevent baking, as I learned, the line that shows the rate of rise of the beans’ temperature should descend steadily: That is, I want the heat to keep increasing all the way through the roast, but increase more and more slowly. To achieve that means giving the beans a bigger wallop of heat right at the beginning—I start preheating the machine before dropping the beans in, instead of putting them into a cold machine—and I very carefully ease the heat down as the roast progresses. I go through a dozen roasts in this manner.

Keeping the rate of rise steady is not as simple as Nieto makes it look. In particular, the line has a definite proclivity to tick up as first crack ensues. That makes sense, since at that point, many of the chemical reactions happening inside the bean are exothermic—releasing heat—so in effect the beans are roasting themselves. To compensate, I have to predict when that’s about to happen and turn down the heat a little bit beforehand. On the occasions when I get it right, I can taste the sweetness.

Friends who try my coffee agree it’s getting better. I’m learning to spot when the tartness fades, when the fragrance develops, how to build more fruity character, when it shades into too much bitterness. I have yet to produce a gloriously sweet and juicy cup, but the elements are falling into place. Maybe the next roast will be the one.

Paul's Tips for Perfecting Your Home Cup

The crucial principle when trying to perfect a process like making coffee is to carefully track what you do each time, so you can reproduce it exactly and keep elements from fluctuating unnecessarily while you deliberately change one variable at a time. If you just eyeball how much ground coffee goes into each brew, your road to perfection is going to be a lot steeper.

To that end, invest in equipment that lets you measure as many factors as possible. For brewing coffee, that includes:

A digital scale. Weigh out your ground coffee exactly. You can weigh your water too—if you get used to it, that can be more convenient than a measuring cup. A milliliter of cold water weighs exactly a gram. Some scales, like the Acaia, are designed specifically for coffee brewing. (EDITOR’S NOTE: If you want a general purpose digital scale, the test kitchen recommends OXO.)

A digital thermometer. A couple of degrees of difference in the water that you use for brewing can make dramatic changes to the final brew. Lower temperatures tend to accentuate sour tastes in coffee, and higher temperatures accentuate bitter tastes. The sweet spot is typically around 194-204°F. Some electric kettles, by Pino or Bonavita, will hold water at a temperature of your choice. (EDITOR’S NOTE: The test kitchen recommends this one, from Zojirushi.)

A digital timer. Manual brewing methods benefit from as much precision as you can give at every stage of the process. (EDITOR’S NOTE: America’s Test Kitchen’s winning kitchen timer is an OXO.)

As you start to become even more of an obsessive, I mean connoisseur, you’ll want kits to test the pH and hardness of the water you’re using. And, going even further, there is the coffee refractometer.

This handheld device, a mainstay at serious cafes but not too often seen at home, shines light through a droplet of brewed coffee and measures the angle of refraction as it passes through. Using this info, you can calculate the exact strength of a brew, measured in the Total Dissolved Solids present in the liquid. Being able to precisely measure the strength of each cup is the ultimate tool for fine-tuning, and then getting right every time, your coffee. The coffee refractometer made by VST is designed to be used with that company’s software, which can analyze, calculate, and scale up or down coffee formulas for any purpose.

If your brewing is all you want it to be, and you want to plunge back into the unknown and drink a lot of bad coffee while you patiently strive for a new level of excellence, you might enjoy roasting.

The FreshRoast SR700 is good for us diligent measurers because of its ability to hook to a laptop. At another price tier, so are the Hottop models. But even a $50 stovetop pot with a hand-cranked agitator—designed for popcorn but ideal for coffee, especially since it can hold much more than the FreshRoast—can become a scientific cook’s tool, with a little added technology.

Having a thermocouple thermometer that connects to a computer is a handy device for many kitchen tasks—it lets you watch and log temperatures on your computer. There’s a wide variety on the market: some have a single probe, some accommodate an octopus of probes to monitor the temperatures of many things at once. Some connect via USB, some are wireless.

A page on the Artisan software site lists a number that are explicitly compatible, although that’s not an exhaustive list.

Insert a thermocouple probe so its tip rests among the beans in the roaster, be that the Whirley-Pop or the FreshRoast. A second probe monitoring the air temperature is optional but helpful.

Install Artisan and set it to work with your thermocouple, and you can watch and record every moment of every roast you do, notating when first crack happened, what the beans weighed going in and coming out, and of course watching the rate of rise.

Most important, taste everything, a day or two after roasting, and correlate the variables that changed in each batch with how it tastes. You can use the official cupping protocol of the Specialty Coffee Association of America or an approach better suited to your home and habits, but the road to amazing coffee is the same: measure, record, notate, taste, practice, repeat.

Photography by Kevin White.


This is a members' feature.