ServingCalc
Food/Beverage Formulation & Nutrition Labeling

How to Calculate Nutrition Facts From Your Recipe: Step-by-Step

A practitioner-level guide to calculating nutrition per serving from a recipe using the USDA FoodData Central database, with FDA rounding rules and real examples.

The Database Analysis Method

Database analysis is the method most nutrition labeling software uses — and it is the method you can do yourself with the right data. The process: look up each ingredient in a nutrient database, calculate the nutrient contribution of each ingredient based on its quantity in your recipe, sum nutrients across all ingredients, divide by the number of servings, and apply FDA rounding rules.

The USDA FoodData Central database is the gold standard nutrient data source for this method. It is free, publicly available, and updated regularly. The database contains nutrient profiles for over 300,000 food items across multiple data types: SR Legacy (standard reference foods like raw butter, flour, sugar), Foundation (enhanced analytical data), Survey/FNDDS (foods as consumed), and Branded Foods (commercial products with label-declared values).

FDA explicitly permits database analysis as a labeling method per 21 CFR 101.9. The regulation does not require lab testing — it requires that declared nutrient values be accurate within specified compliance thresholds.

Step 1: List Your Ingredients With Weights

Start with your recipe in weight measurements. If your recipe uses volume measurements (cups, tablespoons), convert to grams using USDA weight equivalents. For example, 1 cup of all-purpose flour weighs approximately 125g according to the USDA.

Why weight, not volume? Nutrient data in the USDA database is expressed per 100g. To calculate the nutrient contribution of each ingredient, you need its weight in grams.

Example recipe — Chocolate Chip Cookies (yields 24 cookies):

  • All-purpose flour: 280g (2 1/4 cups)
  • Butter, salted: 226g (1 cup / 2 sticks)
  • Granulated sugar: 150g (3/4 cup)
  • Brown sugar, packed: 165g (3/4 cup)
  • Eggs: 100g (2 large)
  • Vanilla extract: 10g (2 tsp)
  • Baking soda: 6g (1 tsp)
  • Salt: 6g (1 tsp)
  • Chocolate chips, semisweet: 340g (2 cups)

Total recipe weight: 1,283g

Step 2: Look Up Each Ingredient in USDA FoodData Central

For each ingredient, find the matching entry in the USDA FoodData Central database at fdc.nal.usda.gov. Record the nutrient values per 100g for all mandatory nutrients.

For our butter example (FDC ID 173410, Butter, salted):

  • Calories: 717 kcal per 100g
  • Total Fat: 81.11g per 100g
  • Saturated Fat: 51.37g per 100g
  • Trans Fat: 3.28g per 100g
  • Cholesterol: 215mg per 100g
  • Sodium: 643mg per 100g
  • Total Carbohydrate: 0.06g per 100g
  • Protein: 0.85g per 100g

Repeat for every ingredient. This is the tedious part that software automates — looking up 9 ingredients across 15+ nutrients means 135+ individual data lookups.

Step 3: Calculate Nutrient Contributions Per Ingredient

For each ingredient, calculate its nutrient contribution based on quantity:

nutrient_contribution = (nutrient_per_100g * ingredient_weight_g) / 100

For 226g of butter:

  • Calories: (717 * 226) / 100 = 1,620 kcal
  • Total Fat: (81.11 * 226) / 100 = 183.3g
  • Saturated Fat: (51.37 * 226) / 100 = 116.1g
  • Sodium: (643 * 226) / 100 = 1,453mg

Repeat for every ingredient and every nutrient. Then sum across all ingredients to get the total recipe nutrition.

For our cookie recipe, total recipe nutrition (all ingredients summed):

  • Calories: approximately 5,280 kcal
  • Total Fat: approximately 252g
  • Sodium: approximately 2,890mg
  • Total Carbohydrate: approximately 690g

Step 4: Divide by Servings and Apply FDA Rounding

Determine your serving size using the RACC table (cookies = 30g RACC). Our recipe yields 1,283g total, and at roughly 53g per cookie (1,283g / 24 cookies), the serving is 1 cookie (53g).

Divide total recipe nutrients by 24 servings:

  • Calories: 5,280 / 24 = 220 kcal (raw) -> 220 kcal (rounded to nearest 10)
  • Total Fat: 252 / 24 = 10.5g (raw) -> 10g (rounded to nearest 1g, since >5g)
  • Saturated Fat: 116.1 / 24 = 6.5g (raw) -> 7g (rounded to nearest 1g)
  • Sodium: 2,890 / 24 = 120mg (raw) -> 120mg (rounded to nearest 5mg)
  • Total Carb: 690 / 24 = 28.8g (raw) -> 29g (rounded to nearest 1g)

Calculate %DV using current Daily Values:

  • Total Fat: 10g / 78g DV = 12.8% -> 13% (rounded to nearest 1%)
  • Sodium: 120mg / 2,300mg DV = 5.2% -> 5% (rounded to nearest 1%)

This is the calculation that ServingCalc performs automatically for every recipe you enter — including the nutrient-specific rounding rules that spreadsheets consistently get wrong.

Try Food/Beverage Formulation & Nutrition Labeling

Free during beta. Join the waitlist for early access.