Many spirits fans might be under the impression that when raw distillate goes into a barrel, the distiller marks a calendar for when it should come out — maybe in four years, maybe eight. That’s when it’s decanted into a bottle — mellow, delicious, and perfect.

But in reality, there’s so much more to it than that. “I think it’s helpful to remember that the countless chemical processes going on inside a given cask never achieve stasis,” says Dan Crowell, U.S. brand ambassador for Glenmorangie Whisky. “Just because an organic chemical compound is formed in the maturing whisky doesn’t mean it will stay in that form. It is much more likely to degrade, evolve, recombine, or otherwise reorganize itself innumerably over the course of that cask’s maturation period.”

The bromide “life is a journey, not a destination” should be stenciled on every cask of whiskey, brandy, or rum sitting in a rickhouse. The barrel transports the liquor as if it’s on a train, always moving forward, every stop different from the last. Depending on which stop the liquor disembarks, the flavors can change dramatically.

Get the latest in beer, wine, and cocktail culture sent straight to your inbox.

And the first stop, I regret to inform you, can smell like baby vomit and stanky feet. Which is why finding that careful balance, or that sweet spot, in the journey, is of utmost importance to the final product.

A Science Lesson

When liquor goes into a barrel for aging, it’s not just pure alcohol. Any raw distillate is composed of hundreds of compounds, some welcome, some not. Some of these are trace elements from material that was used in the fermentation — whether grain or sugar cane or grapes. Other compounds arise during the fermentation process itself.

“If you want to somewhat simplify it, you get a lot of great aldehydes from the grain, and some lactones,” says Rob Arnold, former master distiller at TX Whiskey and author of “The Terroir of Whiskey.” “The fermentation is driving things like ester production, organic acid production, and long-chain higher alcohols used in alcohol production.”

Of the many chemical compounds that are formed and reformed during the aging process, Arnolds says, the “big ones” are acetyls, esters, alcohols, ketones, lactones, acids, terpenes, sulfides, and phenols. If distillers get those just right, their spirits will be balanced and delectable. Get them wrong, though, and distillers can end up with a bitter, off-balance, or just a confused sort of spirit — something that mumbles or slurs rather than enunciates crisply.

These elements are what create the flavors you enjoy in a good liquor, and they’re ceaselessly changing over time. So what may start out as a rude and uninvited guest can, through the miracle of organic chemistry, evolve into what amounts to olfactory royalty.

Which brings us to butyric acid: just one of the myriad compounds that makes booze taste like booze.

Butyric acid is quite common throughout the natural world. You may know it as one of the elements produced in your gut as you digest food. And if you’re familiar with the smell of vomit, that’s in part thanks to butyric acid. Microbial decay of your skin can also produce the same acid, which contributes to the distinct if unwelcome aroma of sweaty feet and gives rise to the term “toe cheese.” (Trace amounts of butyric acid are also present in parmesan cheese, which gives it that distinct aroma. Please forget that we mentioned this.)

Butyric acid is formed during many of the phases of making of spirits — from processing the grain itself, to fermentation and even distillation, in which the alcohols are largely separated from the other byproducts of fermentation. This isn’t a bad thing. “I’m definitely not seeking butyric acid,” says Ale Ochoa, whiskey scientist at Firestone & Robertson Distilling, which makes TX Whiskey. “But occasionally when it’s at a very low level it can produce some nice flavors.”

The magic of butyric acid comes with time. Let it lounge about in a barrel long enough, and it will gradually interact with the alcohol, creating what’s called an ester.

“Raw acids do not taste good,” says Bryan Davis, a founder of Lost Spirits Distillery in Las Vegas. “When you open your trash bin, you are smelling carboxylic acids produced by bacteria eating your garbage. Yet, in one of nature’s most puzzling and glorious acts of chemistry, when you take those very rotten smelling molecules and chemically bind them to alcohol molecules — poof! — you get the aromas of fruits and flowers.”

In the case of butyric acid, the foulness of the aforementioned baby puke becomes, through the magic of esterification, the golden ambrosia of a succulent and ripe pineapple.

Arnold notes that esterification can continue over time, whereas many other chemical processes level off. In part, that’s because acids can be formed during the degradation of the cellulose in the wood, which then in turn interacts with the alcohol to create even more esters. “Which is why older whiskey can be so amazing,” he says. “You get such a concentration of flavors in old whiskey.”

Ethyl butyrate is only one of hundreds of esters that appear during the liquor-making process. Another is when amyl alcohol (which has a sharp and solvent-y flavor) meets up with acetic acid (which can be formed by bacterial fermentation) to create isoamyl acetate, which has a powerful aroma of green banana and pear. Distillers don’t want this to overpower their liquor, but when nicely balanced it can add sophisticated undertones.

The Art of Distilling

Learning how to create and control the formation of these compounds is at the heart of the art of distilling and aging. While the chemical processes happen naturally, the speed and intensity of the reaction can be manipulated.

”We’re looking at the rate at which chemical reactions happen,” says Maggie Campbell, the estate rum manager at Mount Gay in Barbados. Putting spirits into a cask at a higher proof will slow chemical reactions — “it’s why a bottle of port will last longer than a bottle of Pinot Grigio,” Campbell says — while extracting more oak character from the barrels. Storing a barrel lying down can produce a different result from a barrel standing on end owing to different headspace and rate of chemical interactions with oxygen.

Heat plays a major role as well, with warmer aging conditions naturally speeding up the rate of chemical reaction. (Liquor aged in the Caribbean for four years will have a very different flavor profile from the same liquor aged four years in Scotland.) But it’s not a one-way street: A colder liquid can also hold more dissolved oxygen, which can also affect the process of esterification and resulting flavors.

The liquid in a barrel keeps moving and always changing — although not necessarily always improving. Casks can miss the last stop, and end up in the barren land of the overly tannic and over-oaked, with the aggressive wood extraction overruling the flavors of desirable esters and other chemically resplendent flavors.

Finding that last stop is the ultimate job of cask managers. Fall asleep at the wheel, and the liquor can end up in the territory of the unredeemable. “It’s hard to pinpoint because flavor is just so complex, and the chemistry is complex,“ says Arnold. “And there’s a lot of overlapping chemistries.”

Knowing all about that overlap — and how to start and when to stop it — is a large part of what distinguishes a great distiller from a mediocre one, and separates the top-shelf bottle from the bottom. One is where the gods reside; the other is the land of stanky feet.

This story is a part of VP Pro, our free platform and newsletter for drinks industry professionals, covering wine, beer, liquor, and beyond. Sign up for VP Pro now!