As a general rule of thumb, calories are calculated using the 4/9/4 rule, which assumes the following:
- Proteins = 4 calories per gram
- Fats = 9 calories per gram
- Carbohydrates = 4 calories per gram
That said, it's important to note that this calculation is actually more of an approximation rather than a true rule. The reality of these calculations is much more nuanced, and if you're taking a closer look at the calorie and macro totals, you'll find that the numbers don't always add up using the standard 4/9/4 calculation.
Why don't the calories match the 4/9/4 rule?
The USDA uses two different calculation methods in the same database. According to their documentation, "Most energy values are calculated using the 'Atwater general factors' of 4, 9, and 4 for protein, fat, and carbohydrates, respectively" but they also apply "Atwater specific factors for foods as outlined in the USDA Handbook 74" for certain food categories [1].
These specific factors can vary a bit from the standard 4/9/4:
- Proteins can range from about 3.2 to 4.4 calories per gram depending on the food
- Fats can range from about 8.4 to 9.4 calories per gram
- Carbohydrates can range from about 3.7 to 4.2 calories per gram
So when you see a calorie total listed that varies from the standard macro calculations, it's likely because the USDA has applied food-specific factors to some ingredients in that recipe (you can click through to the individual ingredients to see where the discrepancies are coming from). We display the USDA's calorie values to maintain consistency with food labels and nutritional standards, even though they don't always match the simplified math.
[1] USDA FoodData Central FAQ: https://fdc.nal.usda.gov/faq/
Why is fiber included in the calorie count?
We calculate the total carbs value into the total calories, rather than net carbs, which would exclude fiber from this count. Our current implementation isn't perfect, but we have some justifications for it, as well as a way to customize it when you create an account:
Alignment with User Expectations:
One of the primary reasons we include fiber in the default calorie calculations is to align with standard user expectations and food labeling practices. As we understand it, most nutrition labels in the U.S. base total calorie counts on all carbohydrates, including fiber, without distinguishing between soluble and insoluble types. Many users are accustomed to seeing carbs represented this way, and it ensures consistency for the majority of visitors.
Variability in Fiber Calorie Contributions:
Fiber calories can vary depending on the type of fiber and how it's processed by the body. Soluble fiber typically contributes around 2 calories per gram, while insoluble fiber typically contributes none. Since not all brands reliably distinguish between these types, and food labeling regulations don't require this level of detail, it's not always clear how fiber should factor into the calorie breakdown for a specific product (not to mention the calories per gram from soluble fiber can vary based on gut microbiome).
Customizing Your Experience with Net Carbs:
If you have an account, you can set your preferred carb target to Net carbs on the Generator Settings page. When this option is selected, fiber will automatically be excluded from the carb calculations in all pie charts. This customization ensures that your data reflects your specific preferences and dietary goals. You can see more about where to set this up here: How do I track net carbs instead of total carbs?