Let's do some quick math assuming you're using a home machine. A 12 ounce pack of high quality coffee beans is around $15. 12 ounces is 340 grams, which means one 12 gram shot of espresso costs $0.56. $15 divided by 340 grams for the price per gram, times 12 grams.