To make that craft beer you love, breweries generate a lot of food waste. For every five-gallon batch of beer (or a third of a keg), they expend nearly 30 pounds of leftover grains.

Regrained, a new San Francisco-based company that makes granola bars from recycled beer grains, is putting that waste to good use.

Beer has four main ingredients: water, yeast, hops, and grains. When brewers make beer, they extract sugar from the grains (like barley and wheat, for example) by soaking them in hot water. The sugary liquid is then drained, and yeast converts the sugar into alcohol. But the original grains are usually thrown out — and that’s where Regrained comes in.

The company goes to breweries and collects the wet grains. The team then dehydrates them, adds flax and quinoa, and gets them to stick together by mixing in honey and syrup made from tapioca and brown rice.

In December 2015, Regrained raised $30,670 on Barnraiser, a crowdfunding tool for food entrepreneurs. Co-founder Dan Kurzrock tells Tech Insider that the company used the money to develop and improve its two granola bar flavours: Honey Almond IPA and Chocolate Coffee Stout.

Neither bar tastes like the beer it’s named after, but each one does take on similar characteristics. The IPA bar is sweet and spicy with a hint of cinnamon. The stout bar, which Kurzrock says features ground coffee beans, has a chocolatey overtone with a slightly smokey aftertaste.

Selling for $2.50 each in specialty food stores around California, on Amazon, and on Regrained’s site, the bars (which don’t contain any alcohol) look like traditional granola. But when I took a bite, I could tell they weren’t made from normal oats, mainly because they were so chewy.

Overall, though, both are tasty — I prefer the stout bar since it has hunks of chocolate.

To make the bars, the Regrained team collects grains from three craft breweries in San Francisco: 21st Amendment, Magnolia, and Triple Voodoo. Other ingredients, like almonds and puffed quinoa, come from local California farmers, Kurzrock says.

The specific grains that the breweries use to make their stouts and IPAs will sometimes end up in the IPA and Stout-flavored bars, but not always, Kurzrock says. It depends on what type of beer the breweries are making when Regrained picks up the waste.

Kurzrock says that in order to make a six-pack of beer, a brewery uses about a pound of grains. Six billion gallons of beer are brewed annually in the US, which means roughly 36 billion pounds of grain get wasted each year.

Used beer grains aren’t always thrown out, however — some US breweries pay farmers to take them to use in compost and, eventually, fertiliser. But over the past few years, more American craft breweries have moved to city centres to be close to consumers, which makes it more difficult and expensive for farmers to collect the grains, Kurzrock says.

For example, about 30 micro-breweries now reside in San Francisco (or as much as 120 if you count the outer Bay regions). The grains, in turn, often end up in landfills.