Wiki

How Upgrade Your Meal Works

How the food substitution algorithm suggests healthier ingredient swaps based on protein, calories, fiber, glycemic index, or balanced goals.

Verified against USDA FoodData Central on 15 Feb 2026 Updated 15 February 2026 4 min read
Open calculator
Translated article · View in English

概要

Upgrade Your Meal helps you find healthier ingredient swaps. Add foods to build a meal, then select an optimisation goal — more protein, fewer calories, more fiber, lower glycemic index, or a balanced combination. The calculator suggests alternatives from the same or related food categories, showing exactly what improves and what you trade off.

仕組み

The substitution algorithm follows three principles drawn from nutrition science and food substitution research:

  1. Same-category matching — Substitutes come from the same food group or a closely related one (e.g., grains and legumes, meat and poultry). This ensures the swap is culinarily plausible, following the approach recommended by the NHS and academic food knowledge graph research.

  2. Goal-directed scoring — Each candidate food is scored against the original based on your chosen goal. The highest-scoring alternatives appear first.

  3. Transparent trade-offs — Every suggestion shows both improvements (green badges) and trade-offs (amber badges), so you can make an informed decision.

The scoring formula

Each optimisation goal uses a different scoring function. All nutritional values are compared per 100g.

Score = f(original, candidate, goal)

Where

original= Nutritional values of the food being replaced (per 100g)
candidate= Nutritional values of the suggested replacement (per 100g)
goal= The optimisation objective selected by the user

Goal-specific scoring

GoalFormulaWhat wins
More Protein(candidate.protein / candidate.cal) − (original.protein / original.cal)Higher protein-to-calorie density
Fewer Caloriesoriginal.calories − candidate.caloriesLargest calorie reduction
More Fibercandidate.fiber − original.fiberLargest fiber increase
Lower GIoriginal.GI − candidate.GILargest GI reduction
Balanced0.4 × proteinScore + 0.3 × calorieScore + 0.3 × fiberScoreWeighted improvement across all three

Substitutions are allowed within these category pairings:

CategoryCan substitute with
GrainGrain, Legume
LegumeLegume, Grain
MeatMeat, Poultry
PoultryPoultry, Meat
EggEgg, Dairy
All othersSame category only

計算例

Swap chicken thigh for a lower-calorie alternative

1

Original: Chicken thigh (per 100g)

209 kcal, 25.3g protein, 11.2g fat

= 209 kcal

2

Candidate: Chicken breast (per 100g)

120 kcal, 22.5g protein, 2.6g fat

= 120 kcal

3

Fewer-calories score

209 − 120 = 89

= Score: 89

4

Delta badges

Improvements: −89 kcal, −8.6g fat. Trade-offs: −2.8g protein

= 2 improvements, 1 trade-off

Result

Chicken breast suggested: −89 kcal, −8.6g fat (trade-off: −2.8g protein)

入力値の説明

  • Foods — search and add any food from the 142-item USDA database to build your meal. Each food uses its default serving size.
  • Optimisation goal — choose what you want to improve: more protein, fewer calories, more fiber, lower GI, or a balanced combination of all three.
  • Find upgrades — click on any food in your meal to see up to 5 substitution suggestions from the same or related food category.

出力値の説明

  • Meal totals — live-updating calories, protein, carbs, fat, and fiber totals for your entire meal.
  • Substitution cards — each suggestion shows the food name, its calorie density, green improvement badges, and amber trade-off badges.
  • Click to swap — tapping a suggestion instantly replaces the food in your meal, updating all totals.

前提条件と制限事項

  • Per-100g comparison — all scoring uses nutritional values per 100g, not per serving. A food that looks better per 100g may not be better at typical serving sizes.
  • Category-limited — suggestions only come from the same or related food categories. You won’t see a vegetable suggested to replace a grain, even if it would meet the goal.
  • No taste or texture modelling — the algorithm optimises for nutrition only. A legume may score well as a grain substitute nutritionally but won’t always work in a recipe.
  • GI data is sparse — many foods in the database have no glycemic index value. Foods without GI data are excluded from “lower GI” suggestions.
  • Data quality — all nutritional data comes from USDA FoodData Central (SR Legacy). Some entries may reflect raw vs. cooked state differences.

検証

Test caseGoalOriginalTop suggestionExpected improvementVerified?
Poultry swapfewer-caloriesChicken thigh (209 kcal)Chicken breast (120 kcal)−89 kcal, −8.6g fat
Grain fibermore-fiberWhite rice (1.3g fiber)Barley (+16g fiber)Significant fiber increase
Grain GIlower-giWhite rice (GI 73)Soybeans (GI 18)−55 GI points
Meat proteinmore-proteinGround beef 85/15Chicken ground (+10.4g pro)Better protein density
No alternativesmore-proteinSalmon (only fish)No resultsEmpty list

Sources

food-swap substitution nutrition meal-upgrade protein fiber glycemic-index