How to calculate nutrition facts from a recipe
You do not need a laboratory to produce a defensible Nutrition Facts panel from a recipe. You need weights instead of cups, a nutrient database that matches what you actually put in the bowl, and one division that most people do at the wrong moment.
Step 1 — weigh, do not measure
Every nutrient value you will look up is expressed per 100 grams of food. If your recipe is written in cups and tablespoons, you have to convert, and the conversion is where the first big error enters.
A cup is not a unit of mass. A cup of all-purpose flour is roughly 125 g. A cup of granulated sugar is about 200 g. A cup of honey is about 339 g. A cup of water is 237 g. Using a single "1 cup = 240 g" conversion for everything will put your label out by tens of percent on the flour and sugar — the two ingredients that dominate the panel.
Two practical rules:
- Put the bowl on a scale and tare between ingredients. It is faster than scooping and it eliminates the whole class of error.
- If you must use volume, use the ingredient-specific gram weights from the same database you take your nutrient values from, so that the weight and the nutrients are consistent with each other.
Step 2 — find the right database row
The USDA FoodData Central Standard Reference Legacy release is public domain and covers raw ingredients rather than branded packaged goods — which is exactly the right shape for recipe calculation. It is what commercial label software draws on too.
The trap is that the same food appears several times in different states, and the nutrient values differ substantially:
- Raw versus cooked. Cooked rice has roughly a quarter of the calories per 100 g that dry rice does, because it has absorbed water. If your recipe says "2 cups cooked rice" and you look up dry rice, you will overstate calories by a factor of about four.
- With or without salt. There are separate rows for "with salt added" and "without salt added", and they differ on sodium. Pick the one that describes your ingredient.
- Sweetened or unsweetened. Dried cranberries are a different food from fresh cranberries, and a very different food from dried sweetened cranberries.
- Data completeness. Some rows have thin coverage: no potassium, no vitamin D, no fiber. A missing value is read as zero, which understates the panel rather than flagging itself. Prefer a well-covered row where one exists, and treat thin rows as a warning sign.
Step 3 — scale and sum
For each ingredient, each nutrient scales linearly:
Take rolled oats in our granola example: 250 g of oats, so a factor of 2.5 against the per-100 g values.
| Nutrient | Per 100 g | × 2.5 (batch) | ÷ 10 servings |
|---|---|---|---|
| Calories | 379 kcal | 947.50 | 94.75 kcal |
| Total fat | 6.52 g | 16.30 | 1.63 g |
| Saturated fat | 1.11 g | 2.78 | 0.28 g |
| Sodium | 6 mg | 15.00 | 1.50 mg |
| Total carbohydrate | 67.70 g | 169.25 | 16.93 g |
| Dietary fiber | 10.10 g | 25.25 | 2.53 g |
| Total Sugars | 0.99 g | 2.48 | 0.25 g |
| Protein | 13.15 g | 32.88 | 3.29 g |
Those are oats alone. Repeat for every ingredient and add down each column: that gives the batch total, and the batch total divided by servings gives the per-serving figure that goes onto the panel.
Step 4 — divide by the servings the batch yields
This is the single most common place a recipe-derived label goes wrong, so it deserves its own step.
Nutrients do not evaporate with the water. When you bake a granola, a cookie or a loaf, the batch loses water mass and keeps essentially all of its nutrient mass. If you calculate the batch total correctly, then divide by a servings count you estimated from raw weight, but you actually portion the finished product by weight, every nutrient per serving comes out too low. The water left; the calories did not.
The order of operations that works:
- Calculate the batch total from the raw ingredients.
- Weigh the finished, cooled product.
- Decide the serving size as a weight (for example 40 g) or as a piece count, then measure what that actually weighs.
- Number of servings = finished batch weight ÷ serving size weight.
- Batch total ÷ number of servings = per serving.
In our granola example the arithmetic is clean because nothing evaporated: 500 g of ingredients, 10 servings of 50 g. With a baked or reduced product it will not be clean, and that is the point at which you must weigh the output rather than assume.
There is also a rule about the serving size string itself: it has to be stated in a household measure plus, for many products, the metric equivalent — for example "1/2 cup (50g)". The reference amounts customarily consumed by product category are in 21 CFR 101.12, not in this guide, and they are the part of labeling most likely to need a specialist's eye.
Step 5 — round last
Rounding is mechanical once you have the per-serving figure, but it has to happen at the end. 21 CFR 101.9(c)(1)(i) requires calories to be computed from the actual, unrounded grams of fat, carbohydrate and protein; round the inputs early and the error propagates through the whole panel.
| Nutrient | Per serving, calculated | As printed | Rule applied |
|---|---|---|---|
| Calories | 202.5 | 200 | Above 50 → nearest 10 |
| Total fat | 7.07 g | 7 g | At or above 5 g → nearest 1 g |
| Sodium | 4.37 mg | 0 mg | Below 5 mg → expressed as zero |
| Total carbohydrate | 31.91 g | 32 g | Nearest 1 g |
| Dietary fiber | 3.47 g | 3.5 g | Below 5 g → nearest 0.5 g |
| Total Sugars | 13.57 g | 14 g | Nearest 1 g |
| Added Sugars | 10.45 g | Includes 10g · 20% | Nearest 1 g; %DV nearest whole percent |
| Protein | 4.74 g | 4.5 g | Below 5 g → nearest 0.5 g |
| Calcium | 36.14 mg | 36 mg · 2% | %DV in 2/5/10 bands for minerals |
| Iron | 1.42 mg | 1.4 mg · 8% | %DV in 2/5/10 bands for minerals |
| Potassium | 174.44 mg | 170 mg · 4% | Above 140 mg → nearest 10 mg |
The full rule set, with citations, is in FDA rounding rules for nutrition labels. Note the protein row: 4.74 g prints as 4.5 g, not 5 g, because the half-gram increment applies below 5 g.
The seven sources of error
| # | Error | What it does to your label |
|---|---|---|
| 1 | Volumes converted with one generic grams-per-cup figure | Over- or understates the ingredients that dominate the panel, often by 20–60% on flour and sugar |
| 2 | Raw data used for a cooked ingredient | Overstates calories per 100 g by up to 4× on grains and pasta |
| 3 | Dividing by raw servings instead of finished weight | Understates every nutrient per serving when the product loses water |
| 4 | Thin database rows read as zeros | Silently understates fiber, potassium, calcium and iron |
| 5 | Rounding inputs before computing calories | Compounds error through the panel |
| 6 | Treating "1 serving" as "1 unit" | A serving has to match the reference amount for the product category, not the size you happen to sell |
| 7 | Ignoring yield loss in a reduced or strained product | Understates concentration — jams, sauces and reductions are the worst offenders |
Is calculating from a database legitimate?
Yes, and the regulation says so explicitly rather than by implication.
- 21 CFR 101.9(g)(8) provides that compliance with the analytical requirements "may be provided by use of an FDA approved database that has been computed following FDA guideline procedures". The referenced guidance is the FDA Nutrition Labeling Manual, A Guide for Developing and Using Data Bases.
- 21 CFR 101.9(g)(10) requires you to keep written records that "verify the declared amount of that nutrient on the Nutrition Facts label", and lists exactly what counts: "analyses of databases, recipes, formulations, information from recipes or formulations, or batch records".
So the obligation is not "have the food tested". The obligation is: the declared value must be defensible, and you must be able to show your work. A saved recipe, a documented per-100 g source and a recorded batch weight are the evidence. Which is precisely why keeping the calculation in a form you can reprint months later matters more than getting it done quickly.
When you do need a laboratory
Database calculation is the right tool for a recipe built from commodity ingredients. It is the wrong tool when the food is not well described by its ingredients. Situations that call for analysis:
- A nutrient content claim. Saying "excellent source of fiber" or "low sodium" raises the accuracy bar and is measured against the finished food.
- Fermentation, curing or extended ageing — anything where microorganisms consume or transform the nutrients you declared.
- Fortified or supplemented products, where the added vitamin or mineral has to be at least equal to the declared value as an added (Class I) nutrient.
- A proprietary ingredient you cannot break down, such as a purchased base, blend or pre-mix. Ask the supplier for a specification sheet first — that is often enough, and it is far cheaper than analysis.
- Any product going into a large retail run, where the cost of being wrong dwarfs the cost of the test.
If a claim is on the table, or the food changes composition in the process, treat the calculated label as a draft and get it verified.
Do steps 1 to 5 automatically
Search an ingredient, enter the grams, and the batch total, per-serving figures and the rounded panel update as you type — using the same USDA data and the same rounding rules described here.
Build my label — free Pro · $19 once