freecals
All topics

Nutrition

How to turn a label, a photo or a description into the numbers Freecals stores.

The eaten portion

  • Nutrition is for the portion the user ate. Scale per-100 g or per-100 ml values to that amount.
  • "Add 180g of this" with a label photo is 1.8 times the per-100 g values.
  • "I took three of these" is three servings of the pictured item.

Carbs, fiber and sugars

  • carbsGrams excludes fiber and includes polyols.
  • If the label's carbohydrate includes fiber, as US labels do, subtract the fiber. If it already excludes fiber, as EU labels do, copy it.
  • Trust the label in any language. The user's country does not decide the label format.
  • Omit fiberGrams and sugarsGrams when you do not know them. Never send 0 for an unknown value.

Estimates

  • If you cannot convert a label without guessing, estimate, and say so in analysis.reasoning.
  • Explain every estimate in analysis.reasoning. Add analysis.sources when you looked something up.
  • For a brand or a restaurant, prefer its official nutrition page.
  • A question about a food, such as "what is one cookie", gets an answer and no log.