Generally speaking, cocktails and mathematics are not a winning combination—except for barkeeps, who have to make sure they’re not pouring out their profits. Serious Eats reports that a cocktail’s ”pour cost”—the cost of all its ingredients—is typically about one fifth of the price a patron pays for the drink.

So working at a 20% pour cost, a $13 Sucker Punch (real name) of Appleton Special Gold Rum, Malibu coconut rum, fresh orange juice, guava, and pineapple juice at Manhattan’s Kingston Hall would have cost the proprietors about $2.60 in ingredients. Similarly calculated, the components of a £16.50 (US$28) “Last Word” cocktail of Sipsmith gin, maraschino, green chartreuse, and lime would cost London’s Artesian bar about $5.60. But of course, that doesn’t factor in the atmosphere, the luxury of leaving one’s dirty glass behind, or this bartender’s shaking technique, which is altogether priceless.

If you like mixing your own cocktails—or, like we here at Quartz, are fans of a Friday in-office happy hour—use this handy calculator to see how much money you’re saving by making your own. Cheers to Oregon bar manager and author Jeffrey Morgenthaler for first providing us with the inspiration to make this. If you don’t find your favorite tipple in our calculator, simply enter your own ingredients in Morgenthaler’s original spreadsheet version.

And as for our Quartz Thai-quila cocktail, senior editor Gideon Lichfield tells us the key is to make a special simple syrup by steeping the peppers in the sugar and water while it’s still hot. Do try this at home.