How we build MyFoodAnalysis

Every number on this site comes from the U.S. Department of Agriculture. This page lists everything we do to that data before you see it, so you can check it. The code that does it is open source: github.com/objectgraph/myfoodanalysis-data.

The source

Every number comes from FoodData Central, the U.S. Department of Agriculture's food composition database. We use its full download, release 2026-04-30. USDA publishes a new release about twice a year and we import each one. The data is public domain: free for anyone to use.

USDA's foods come from four sources, and each food page tells you which, with a link to the same food on USDA's own site:

  • Foundation: foods USDA measured in its own laboratories.
  • SR Legacy: USDA's classic nutrition tables, kept up until 2018.
  • Survey: foods the way Americans describe what they ate, from USDA's national eating survey.
  • Branded: packaged products, from the nutrition labels their makers send to USDA.

Which foods we include

  • Only the current version of each food. USDA's download still holds some older versions of foods it has since replaced (74 in this release, such as an older “Broccoli, raw”). We leave those out. If you follow an old link, it takes you to the current food, or tells you the food is gone.
  • One page per packaged product. USDA keeps a new record every time a label changes: about 2 million records for about 442,000 products. We show the most recent label for each barcode; links to older labels go to it.
  • We leave out USDA's records of individual lab samples, which describe one sample rather than a food.

The numbers

  • The numbers are USDA's, unchanged. USDA gives every value per 100 g, and so do we; the table at the bottom of each food page lists every nutrient USDA has for it. For a serving, we scale: a 150 g serving has one and a half times the 100 g amount.
  • Some nutrients are recorded more than once. USDA sometimes stores the same nutrient in two or three ways. When it does, we always use the same one, in this order:
    • Calories: USDA's standard calorie figure. Many of USDA's newest lab-tested foods don't have one; for those we use the calories USDA calculated from that food's own protein, fat and carbohydrate, and failing that, the simple rule of 4 calories per gram of protein and carbohydrate and 9 per gram of fat.
    • Carbohydrates: USDA's usual figure, which is what remains of 100 g after water, protein, fat and minerals are measured; otherwise the carbohydrates added up from the measured sugars, starch and fiber.
    • Sugars: USDA's standard total sugars; otherwise the second total USDA keeps for some foods.
    • Folate: the figure used on nutrition labels (dietary folate equivalents, which counts added folic acid as better absorbed); otherwise total folate.

    The full list, with USDA's nutrient numbers, is in mfadata/nutrients.py.

  • Net carbs are carbohydrates minus fiber (never less than zero). USDA doesn't publish them; we work them out.
  • Nothing shows below zero. Because USDA works out carbohydrates as what is left after everything else is measured, small measuring errors can leave a tiny negative number: for 10 raw meats and fish it is as low as −0.7 g. We show 0 g on the label and in rankings; the full table keeps USDA's exact figure.
  • % Daily Value uses the FDA's Daily Values for adults and children 4 and older, the same ones printed on U.S. food labels.
  • Packaged products come from their labels. USDA turns each label into amounts per 100 g. Labels round their numbers, so they are less exact than USDA's lab measurements. For drinks labelled in millilitres, we count 1 ml as 1 g, as USDA does.

Food names

USDA names foods like a library catalogue: “Cheese, cheddar”, “Fish, salmon, Atlantic, wild, cooked, dry heat”. We name them the way people say them: “Cheddar cheese”, “Wild Atlantic salmon, cooked”. USDA's own name is always shown under ours.

  • An AI model wrote the new names for the foods from USDA's labs, tables and survey (about 13,400 of them). It is Qwen 3.8 (27B), running on our own server through Catalyst. Its instructions: keep every detail that changes the nutrition (raw or cooked and how, skin, fat trim, salt), and never add a brand.
  • Code checks every AI name before we use it: it must still contain the food's word from USDA's name (or a common everyday word for it, such as ketchup for USDA's “catsup”), be shorter than 70 characters, and be a plain phrase. A name that fails keeps USDA's wording. Every name, next to USDA's original, is in mfadata/names.json, free for anyone to reuse.
  • Packaged products keep their label names; names written in all capitals are shown in normal case, with the brand in front.

Servings

Each food opens at one typical serving from USDA's own list of portions: the natural unit if USDA has one (“1 banana”), otherwise a medium or large piece, the serving printed on labels, 3 oz, a cup and so on, and never more than 350 g. Packaged products open at their label serving. You can switch to any of USDA's portions, or to 100 g.

Rankings and the Food Finder

  • The “foods high in…” lists and the Food Finder show everyday foods, not packaged products, so thousands of snack labels don't crowd out the foods most people are looking for.
  • They also leave out dried spices and herbs (nobody eats 100 g of thyme), baby foods and formula, protein powders and isolates, and regional specialties. Those foods still have their own pages.
  • A food that appears in more than one USDA source is listed once.
  • “Per 100 calories” leaves out foods with almost no calories (under 10 per 100 g), where the comparison stops meaning anything.

The same food twice

Sometimes several pages are the same food: one food in two USDA sources, or one product sold in several sizes. We pick one main page (for everyday foods, the one with the most nutrients measured; for products, the most recent label). The others stay online but point search engines to the main page, and search on this site shows only the main page.

We tell search engines about our pages in stages: first the everyday foods and the products of about fifty national brands. Products whose labels list fewer than six nutrients are not offered at all. Every page is still on the site either way.

How we check it

Automated tests run every time we build the database. They compare it with USDA, and with basic nutrition sense:

  • Every current USDA food is here, nothing else is, and every USDA name matches.
  • For 300 foods picked at random, every nutrient value matches USDA's file exactly.
  • For twenty everyday foods, every value matches USDA's own website data. (USDA's website rounds survey foods to one decimal place; the download we use has two.)
  • Every packaged product is its latest label, and its serving matches that label.
  • The calories add up: protein and carbohydrate give about 4 calories per gram and fat 9, and for over 95 % of everyday foods that estimate is within 20 % of USDA's figure. Parts never add up to more than the whole (saturated fat within fat, sugars within carbohydrates). Labels, being rounded, are held to looser limits we have measured.

The tests are in tests/. If a number looks wrong, compare it with USDA using the FDC id at the bottom of the food page, and tell us at info@objectgraph.com.

Check it yourself

How we prepare the data is open source at github.com/objectgraph/myfoodanalysis-data. Download the same USDA release, run our build, and you get the same database this site reads; run the tests, and you see the same checks. The AI-written names are in there too, free to reuse.

MyFoodAnalysis is made by ObjectGraph LLC (about us). It is information, not medical advice.