Kaunto

· By Kaunto

How Food Databases Work (and Why Two Apps Disagree About a Banana)

Every calorie app reads from a handful of databases: USDA, national tables, crowd-sourced barcodes, manufacturer labels. Here is where each number comes from and why they differ.

Almost every calorie-tracking app gets its numbers from the same few places: a government reference database such as USDA FoodData Central, a crowd-sourced barcode database such as Open Food Facts, and nutrition labels typed in by manufacturers or users. Two apps disagree about a banana because they pulled different rows: a raw banana is 89 kcal per 100 g in USDA’s reference table, an overripe one is 85, a “medium” banana is anywhere from 100 to 120 kcal depending on whose medium it is, and a user-submitted entry can be anything at all. The number is rarely wrong; the entry is just a different food, weight or source than you assumed.

The four kinds of food entry

Entry typeWhere it comes fromWhat it is good atWhere it goes wrong
Reference (generic)Government lab analyses: USDA FoodData Central, UK CoFID, EU national tablesWhole foods, cooked and raw, consistent methodOnly exists for foods someone has analysed; no brands
Branded (label)The manufacturer’s nutrition panel, often via a barcode databasePackaged products, exact recipeLabel tolerances of up to 20 %; reformulations lag
Survey (dish)Dietary-survey databases such as USDA’s FNDDS“Lasagna, homemade”, “chicken curry”: composite dishesAn average recipe, not yours
User-submittedTyped in by another app userCoverage of anythingNo verification; serving sizes invented

A good app labels which kind you are looking at. If it does not, the giveaways are: a brand name means label data; “raw”, “cooked, roasted” or “with skin” phrasing means reference data; a dish name with no brand means a survey entry or a user’s guess.

What USDA FoodData Central actually contains

FoodData Central is the reference most English-language apps build on, and it is itself four datasets:

DatasetRows (approx.)MethodExample
Foundation Foods~400Recent lab analysis with sample counts and variabilityEgg, whole, raw
SR Legacy~7,800The historic Standard Reference table, last updated 2018Bananas, raw
FNDDS (Survey)~5,400Recipes built from the above for dietary surveys“Pizza, cheese, from restaurant”
Branded~400,000+Labels submitted by manufacturersAny barcode product

The first two are public domain and are what the foods reference on this site uses. Each row carries an FDC ID, so a number can be traced to its source row, and the household measures (“1 cup, chopped”, “1 large”) are USDA’s own weighings rather than someone’s estimate.

Six reasons the same food shows different numbers

  1. Raw versus cooked. Chicken breast, raw is 120 kcal per 100 g; roasted it is 165, because a quarter of the water has left. Both are correct. Logging a cooked weight against a raw entry under-counts by about a quarter.
  2. Per 100 g versus per serving. Reference data is per 100 g; labels are per serving, and servings are chosen by the manufacturer. “1 banana” ranges from 100 g to 150 g across databases.
  3. Calorie calculation method. Most databases compute calories from macros with the Atwater factors (4, 4, 9 kcal per gram). Some use food-specific factors, some count fibre at 2 kcal/g and some at 0, and the US and EU treat fibre differently. That alone can move a high-fibre food by 5–10 %.
  4. Label tolerance. A manufacturer’s label is allowed a margin (in the US, calories can be up to 20 % above the stated figure), and the product may have been reformulated since the database copied it. More in why label calories can be 20 % off.
  5. Variety and ripeness. Apples with skin and without differ; so do varieties, seasons and countries of origin. Reference tables publish an average.
  6. Rounding and unit conversion. Labels round to the nearest 5 or 10 kcal; a “cup” is 240 ml in the US and 250 ml in Australia; ounces get confused with fluid ounces.

What this means for logging

None of these differences is large enough to matter on any single meal, and all of them wash out over a week if you are consistent. The practical rules:

  • Prefer reference entries for whole foods (fruit, vegetables, meat, eggs, grains) and label entries for packaged products. Use user-submitted rows only when nothing else exists, and check the per-100 g figure against a reference before trusting it.
  • Match the state of the food to the entry. Weigh raw and log raw, or weigh cooked and log cooked. Do not mix.
  • Weigh, do not estimate, when the food is calorie-dense. A “handful” of almonds is 20–40 g, which is 115–230 kcal. A “cup” of spinach is 7 kcal either way.
  • Pick one entry per food and keep using it. The consistency matters more than which of two defensible numbers you chose, because what you act on is the trend.

Frequently asked questions

Which food database is the most accurate? For whole foods, a government reference database such as USDA FoodData Central: the values come from lab analysis with a documented method. For packaged foods, the manufacturer’s current label, because the recipe is theirs. Neither is “exact”; both are within a few percent for most foods, which is closer than anyone’s portion estimate.

Why does the same food have different calories in different apps? They are showing different rows: raw versus cooked, per 100 g versus per serving, a different source database, a different calorie-calculation method, or a user-submitted entry. Check the per-100 g figure and the state (raw or cooked) and the difference usually explains itself.

Are user-submitted food entries reliable? Sometimes. They are unverified, so the serving weight is the usual problem rather than the per-100 g number. If an entry has no per-100 g value or a serving weight that looks round and invented, find a reference entry instead.

What is an FDC ID? The identifier USDA FoodData Central gives every food row. If an app or a website shows it, you can look the row up at fdc.nal.usda.gov and see the lab method, sample count and every nutrient measured.

Does Open Food Facts have accurate calories? Open Food Facts copies the manufacturer’s label as photographed by contributors, so it is as accurate as the label and the transcription. It is excellent for coverage of packaged products and less reliable for the serving size field, which is often missing or estimated.

Next: how accurate calorie counting really is, or set targets with the macro calculator.