There's a science to creating barrel-aged spirits.

“The alcohol actually digests the barrel," said Kurt Toenjes, chairman of Montana State University Billings' biological and physical science department. "From the barrel you’re going to get various esters coming out — organic compounds will be extracted from the wood.”

The wood in the barrel contributes its own flavors. At the same time, the charcoal infused in the barrel filters out unwanted tastes. It's a balancing act.

And while some of the finest drinks can be socked away in barrels for years, Toenjes said a drink can be refined in just a few weeks' time. And for a few months now, the professor has been leading classes to age small batches of their own.

Students sample each other's homemade whiskey during a whiskey class held at MSUB on Friday. TAILYR IRVINE, Gazette Staff

The barrel-aged whiskeys and cocktails class grew out of Toenjes' own hobby. He begins with a store-bought liquor — distilling at home is illegal in Montana, he said. From there, he develops recipes for an aged spirit like whiskey or a mixed cocktail, like a Manhattan.

Toenjes began talking with Kevin Nemeth, director of MSUB's extended campus, about a community class on the subject. Last fall, they made it happen with the first two-part class.

In the first class, Toenjes lectures on the history of whiskeys and the science of barrel aging. The participants get some concoctions to try.

“He exposes people to different recipes," Nemeth said. "They get little sips at the start of class while he's explaining how the barrels impact the flavors of the whiskeys and whatever mixes you have in there.”

The participants choose a recipe to fill up a two-liter oak barrel to take home and look after for three weeks. The char-toasted barrels are made for MSUB by an outfit in Texas.

The two-liter size is intentional, Toenjes said. Liquor takes longer to age in a larger barrel because there's a higher volume of liquid. At two liters, three weeks is all that's needed.

And so the aging process begins.

“Also things evaporate," Toenjes said. "And depending on the humidity in the house, it could lose water or alcohol.”

That allows for tweaking the recipe. As some liquid seeps from the barrel, liquor or flavor can be added back in. The whole process, from the spirit selection to the flavor recipe to the aging process, makes for a highly customized drink.

At three weeks, the class reconvenes to sample the final products. Participants end up with 375-milliliter bottles of their stuff.

The cost for the class is $159, and they've been full so far, Nemeth said. The third barrel-aging class ended Friday, but more are planned.

A more advanced class is planned for early May. That will involve alcohol at higher proofs, up to 125, which react more strongly with the barrels. Classes with more common 80 or 90-proof liquors will be scheduled later.

And even after the first class, the barrels have a couple more cycles left in them. It's another variable in the process, because the barrel's previous recipe will help to flavor the next.

Toenjes said it's like a game of pool.

“You gotta plan your leave," he said. "Not only do you have to make this one work, but you also have to plan the next recipe.”

Potential participants can register through MSUB's Extended Campus office