# (DONE) Calorie count

Discussion in 'Feature Requests' started by gelatin, Jan 3, 2013.

1. ### gelatin New Member Joined:
Dec 4, 2012
Messages:
7
0
Trophy Points:
0
#1
I've seen calorie counts offered in a few other calculators. This is usually per 12oz but it should be easy to offer size customization once the base calorie calculation is implemented.

The details of how I would approach the formula is below. All that is needed is the ABV, the volume of liquid, and the FG. This is not an exact science because density is dependent on temperature, but it should get you pretty darn close!

There's a formula here which works similarly and is a ton simpler, and gives lower values in general:
http://www.primetab.com/formulas.html

I've created a spreadsheet to compare the two if you're interested. You can download a copy (originally created in ods).

I would note that if you take the Sc constant below and tweak it to 0.05 / 0.026, our two formulas start to come much closer. This is reasonable, as we can assume there is more other stuff making up the FG than pure carbs and that some of this other stuff is not digestible. I had fun deriving the equations below though!

Suppose you have 12fl oz (355ml) of 5% beer at a FG of 1.008. Here's how you could estimate the total calories as a series of simple equations. An in-depth discussion follows.

V = 355ml
ABV = 0.05
FG = 1.008 g/ml

Note: raw numbers below are reference values
Av (alc volume) = ABV * V
Am (alc mass) = Av * 0.79 g/ml
Ac (alc cals) = Am * 6.9 cal/g
Ac (simplified) = 5.451 * ABV * V

Nv (non-alc volume) = V - Av
Tm (total mass) = V * FG
Nm (non-alc mass) = Tm - Am
Nd (non-alc density) = Nm / Nv
Sc (sugar concentration ratio) = 0.05 / 0.018
Ns (non-alc sugar by mass) = Sc * (Nd - 1)
Nc (non-alc cals) = Ns * Nm * 4 cal/gram
Nc (simplified) =

Calories = Nc + Ac

Calculating the calories from alcohol
5% ABV means 355ml * 0.05 or 17.75ml alcohol
Alcohol's density is 0.79 g/ml, so we have 17.75ml * 0.79 g/ml = 14.02g alcohol
Alcohol has 6.9 calories/gram, so we have 6.9 cal/g * 14.02g ~= 97 calories from alcohol.

Estimating the other calories
We need to figure out the gravity of the liquid were the alcohol not in it.

1.008 gravity of 355ml of liquid means that the liquid is 0.8% heavier than water.
Since 355ml water = 355g, 355g * 1.008 = 357.84g for the total weight of the liquid

If the alcohol were magically removed, we would have 355ml - 17.75ml = 337.25ml of liquid that weighs 357.84g - 14.02g = 343.82g, giving a density of 1.019g/ml.

Now we have a problem because depending on what's dissolved in the liquid, we will have different calibration curves of concentration versus density. This sucks because there's no real way to determine this, but empirically treating it all like it was sugar seems to get us pretty close to real values.

So let's assume that everything is similar to sugar in this regard, giving very roughly 5% sugar by mass per 0.018 additional gravity points (
http://www.tiffin.k12.oh.us/userfiles/9 ... ontent.pdf). x / 0.019 = .05 / 0.018, x / 0.019 = 2.78, or x = 5.28%, meaning that if all the 1.019 gravity points in our non-alcohol solution in fact came from pure sugar, we would have very approximately 343.82g * 0.0528 = 18.15g of sugar at 4cal/gram giving 72 non-alcohol calories.

The total calories is then simply 97 + 72 = 169 calories. This matches pretty well with http://www.simplybeer.com/2009/08/19/ho ... n-my-beer/ considering a FG of 1.008 is on the low end. If I repeat the calculations with a FG of 1.018, I get:

1.018 * 355g = 361.39g - 14.02g = 347.37g / 337.25ml = 1.030g/ml
2.78 * 0.030 = 8.3% sugar by weight, 30g = 120calories + 97 = 213 total calories

Certainly on the high end for a 5% beer, a bit past the high end of the linked chart, but when was the last time you saw a 5% beer at a real 1.018 FG that wasn't a stuck fermentation?

2. ### LarryBrewer Active Member Joined:
Jun 27, 2012
Messages:
1,728
9
Trophy Points:
38
Location:
Portland, Oregon
#2
Re: Calorie count

Thanks for the detailed write up.

This could be plugged into several spots on the site:
1) Stand alone calculator
2) Add-on to existing ABV calculator
3) Recipe Editor, more dialog
4) Brew Stats section for a Brew session, where it could calculate the actual calories based on the recorded values for the batch.

Any preference?

3. ### gelatin New Member Joined:
Dec 4, 2012
Messages:
7
0
Trophy Points:
0
#3
Re: Calorie count

I'd like to see it in the recipe editor personally.

4. ### kblankenship11 Member Joined:
Jul 9, 2012
Messages:
37
0
Trophy Points:
6
Location:
Rochester, NY
#4
Re: Calorie count

Wow this is pretty awesome, I'd like to see it!

5. ### Kaiser Member Joined:
Oct 4, 2012
Messages:
111
0
Trophy Points:
16
#5
Re: Calorie count

Gelatin,

Your approach to calculating the calorie count looks solid. All that's needed for this function is OG and FG, the rest could be calculated. It's generally easier to calculate ABW since you simply take the real attenuation, determine fermeted extract and divide this by two. But that doesn't change the approach of determining calories from alcohol and residual extract separate from each other.

As you noted, the sticking point is determining the caloric content of the residual extract since not all of it is digestible. If there is actual (not estimated) nutritional information available of a wide range of beers available it could be taken from that data. Even if these numbers are estimated one could derive the generally accepted digestibility of residual beer extract.

Since this is OG and attenuation dependent it could be calculated by whatever function calculates the other beer properties (ABV, etc.)

Kai

6. ### LarryBrewer Active Member Joined:
Jun 27, 2012
Messages:
1,728
9
Trophy Points:
38
Location:
Portland, Oregon
#6
Re: Calorie count

Took a closer look, but it turns out the primtab site is currently down with an error message.

Sounds like we just need to grab an equation and plug it in. I would think standardizing to 355ml / 12 oz is the way to go.

7. ### Kaiser Member Joined:
Oct 4, 2012
Messages:
111
0
Trophy Points:
16
#7
8. ### cearum Member Joined:
Jul 11, 2012
Messages:
102
1
Trophy Points:
16
Location:
Metro Detroit, MI
#8
Re: Calorie count

I would also like to give my vote for this. Some additions.

Here is another source commonly used by a few other calculators out there:

http://hbd.org/ensmingr/

Also, having a carb count would be useful, but no not necessary. I'm on a low carb diet and beer is my one indulgence. The included link above should have all the information you need for calories and carbs.

9. ### LarryBrewer Active Member Joined:
Jun 27, 2012
Messages:
1,728
9
Trophy Points:
38
Location:
Portland, Oregon
#9
Re: (NEXT RELEASE) Calorie count

Calorie count will show up under the more dialog in the recipe editor in the next release. It will also be part of the stand alone ABV calculator.

The equations on this page appeared to be the best cited, easiest to implement, and matched with the link that Kaiser posted: http://hbd.org/ensmingr/

Gelatin - thank you for posting your spreadsheet and the links, I think you will find the calorie equation in the link above will give acceptable results.

10. ### LarryBrewer Active Member Joined:
Jun 27, 2012
Messages:
1,728
9
Trophy Points:
38
Location:
Portland, Oregon
#10
This live. The calorie count now shows up under the More... dialog in the recipe editor (on the left right above the abv equations), it shows up in the stand alone ABV calculator, it also shows up in the brew session feature after the fermentation complete log is added.