Skip to main content
🎉 New: Recipe extraction with full glycemic load transparency
Educational

How Glyc Calculates Nutrition: The Method Behind the Numbers

The Glyc Team · April 9, 2026

When you extract a recipe in Glyc, the output looks simple: a glycemic load score, a calorie count, a macros breakdown. Behind that output is an AI-powered calculation that reads ingredient text, resolves quantities and units, applies practical adjustments, and runs the glycemic load formula for each ingredient. This article explains how it works.

Step 1: Recipe Extraction

The first job is to turn a recipe into a structured list of ingredients with quantities. Glyc first attempts to read structured recipe data (Schema.org JSON-LD) directly from the page. This is a fast, accurate method used by most major recipe sites. If structured data is not available, AI extracts the title, ingredients, instructions, and serving information from the page content. This handles informal formatting, natural language ingredient lines, and recipes that are not in any particular structure.

Step 2: Ingredient Parsing

Each ingredient line is parsed to separate three things: the quantity, the unit of measurement, and the food item. Mixed fractions, abbreviations with periods (tbsp., c., oz.), and qualifiers like "bone-in" or "divided" are all handled and normalized before calculation begins.

Step 3: AI-Powered Nutrition Calculation

With ingredients parsed, Glyc sends the recipe to AI for nutrition calculation. The AI calculates per-serving values for calories, protein, fat, carbohydrates, fiber, sodium, cholesterol, sugar, and glycemic load for each ingredient in a single pass.

These calculations draw on established nutritional references:

  • USDA FoodData Central — the primary reference for calorie, macronutrient, and micronutrient values. One of the most comprehensive publicly available nutrition databases, used as a knowledge base for the AI calculation.

  • Peer-reviewed glycemic index research — GI values drawn from published nutritional research, used to calculate glycemic load contributions per ingredient.

The AI also applies practical adjustments that a simple lookup would miss:

  • Ingredient-specific cup densities. A cup of flour weighs around 125g. A cup of rolled oats weighs around 90g. Using a single generic conversion would overestimate the weight of dry goods. The calculation uses ingredient-specific density data so dry goods, dense pastes, and liquids are each handled correctly.

  • Bone-in and skin-on deductions. The edible weight of bone-in chicken thighs or whole fish is lower than the listed weight. Correction factors are applied to avoid overcounting.

  • Divided ingredients. When a recipe uses an ingredient in multiple steps and marks it as "divided," a discount is applied to avoid counting the full quantity as used in a single serving.

  • Cooking water absorption. Grains and pasta absorb water during cooking, affecting their final weight and calorie density per serving.

Step 4: Glycemic Load Calculation

The glycemic load formula is applied to each ingredient:

GL contribution = (GI x available carbohydrates in grams) / 100

Available carbohydrates are total carbohydrates minus fiber. The total GL for the recipe is the sum of all ingredient contributions, divided by the number of servings. This gives a per-serving GL that can be compared against standard benchmarks: low (10 or under), medium (11 to 19), high (20 or above).

Ingredients with no meaningful GI value — spices, herbs, oils, salt — contribute 0 to the GL calculation. This is correct: these ingredients contain negligible digestible carbohydrates.

Step 5: Cross-Reference with Source Nutrition Data

Where a recipe page includes official nutrition data (via Schema.org structured data), Glyc captures that alongside the calculated values and cross-references the two. This gives you both the source site stated nutrition and the Glyc independent calculation — useful for spotting discrepancies or verifying results.

Transparency: Show the Math

Every Glyc recipe page includes a Show the Math section that exposes the per-ingredient breakdown: the parsed quantity, the GI value used, and the GL contribution. This exists for two reasons.

First, transparency. If a calculation looks wrong, you can see exactly where the number came from and why. Second, utility. The breakdown tells you which ingredients are driving the GL — which means you can see immediately which swaps would have the most impact.

When an ingredient cannot be reliably calculated, Glyc flags it clearly in the breakdown rather than silently substituting an estimate. An honest gap is more useful than a hidden guess.

Known Limitations

No automated nutrition calculator is perfect. A few known constraints are worth understanding:

  • Preparation method affects nutrition. Boiled potato has a different GL than roasted potato. The calculation uses values that correspond to common preparation methods but cannot always account for every variation.

  • Ingredient interpretation. How the AI parses ingredient names and quantities may not always match exact product specifications. An unusual ingredient or regional variety may not have a precise reference match.

  • Natural variation. GI and nutrition values can vary between food samples, brands, and growing conditions. The calculated values represent useful estimates, not laboratory measurements.

  • Cooking method effects on GI. Al dente pasta has a lower GI than well-cooked pasta. The same ingredient prepared differently can have meaningfully different blood sugar impact.

For most recipes, the calculated GL and nutrition figures are within a reasonable margin of what a registered dietitian would calculate by hand using the same reference data.