Carb Counter Formula
Understand the math behind the carb counter. Each variable explained with a worked example.
Formulas Used
Total Carbs
carbs_g = food_weight_g * carb_pct / 100Calories from Carbs
calories_from_carbs = (food_weight_g * carb_pct / 100) * 4% of 300 g Daily Target
pct_daily_300g = (food_weight_g * carb_pct / 100) / 300 * 100Variables
| Variable | Description | Default |
|---|---|---|
food_weight_g | Food Weight(g) | 200 |
carb_pct | Carb Content | 28 |
How It Works
How to Count Carbs
Formula
Carbs (g) = Food Weight (g) x Carb Percentage / 100
Carb Content of Common Foods (cooked)
Worked Example
Count carbs in 200 g of cooked rice.
food_weight_g = 200carb_pct = 28
- 01Cooked rice carb content: 28 g per 100 g.
- 02Carbs: 200 x 28/100 = 56 g.
- 03Calories from carbs: 56 x 4 = 224 kcal.
Frequently Asked Questions
What is the difference between total carbs and net carbs?
Net carbs = total carbs minus fiber (and sometimes sugar alcohols). Fiber is not digested for energy, so some diets subtract it.
How many carbs per day?
The DRI recommends 45-65% of calories from carbs. On a 2000 kcal diet, that is 225-325 g. Low-carb diets may target under 100 g.
Are all carbs the same?
No. Complex carbs (whole grains, vegetables) digest slowly and provide sustained energy. Simple carbs (sugar, white flour) digest quickly and spike blood sugar.
Ready to run the numbers?
Open Carb Counter