LucaComing soon

Barcode data vs photo estimates: which to trust

By · Published · General information, not medical advice

For packaged food, scan the barcode. It leads to the manufacturer's nutrition declaration, which is produced under labeling rules, while a photo can only guess from appearance. Label data still has limits: values are rounded, regulators accept some tolerance, and open, volunteer-built food databases can contain errors. Check the entry against the pack and log the amount you ate.

A photo estimate and a barcode scan answer different questions. The photo asks “what does this look like?”. The barcode asks “which product is this?”. For anything that comes in a package, the second question has a much better answer, because the manufacturer has already declared what is inside.

Why a label beats a visual guess

A photo sees a surface. It cannot tell a full-fat yogurt from a low-fat one, a sweetened cereal from a plain one, or a protein bar from a chocolate bar with similar wrapping removed. The differences that matter are in the recipe, and the recipe is invisible. The limits of photos are covered in how photo calorie estimation works.

A nutrition label is a declaration made under rules. In the EU, the European Commission explains that Regulation (EU) No 1169/2011 requires the vast majority of pre-packed foods to carry a nutrition declaration with the energy value and the amounts of fat, saturates, carbohydrate, sugars, protein and salt. In the US, the Nutrition Facts label is governed by 21 CFR 101.9.

Photo estimate Barcode and label
Identifies Foods by appearance The specific product
Nutrition values come from Typical values for similar foods The manufacturer’s declaration
Sees the recipe No Yes, as declared
Knows how much you ate Estimates it No, you enter it
Works for Home-cooked and plated meals Packaged food

The last two rows matter. A barcode knows nothing about your portion, and it does not exist for a homemade stew.

What is an open food database?

A barcode is only a number. Something has to connect it to a label. Luca uses an open, volunteer-built food database for that.

The project describes itself as a database of food products with ingredients, allergens, nutrition facts and other information found on product labels, made by a non-profit association of volunteers. Contributors use an app or their camera to scan barcodes and upload pictures of products and their labels. Its terms of use say that product information is collected in a collaborative way, and that users of the website can add, complete or correct product data.

The license

The project’s data page states that the database is available under the Open Database License (ODbL). In the license’s own summary, you are free to share, create from and adapt the database, as long as you attribute it, share adapted versions under the same license, and keep it open.

Data can contain errors

Open, crowd-sourced data is powerful and imperfect. The project is direct about it. Its terms state that the information and data are provided as-is, and that it makes no promise of their accuracy, completeness or comprehensiveness.

In practice, the errors you may meet are ordinary ones:

  • A typo made when someone copied the label.
  • An old entry for a product whose recipe or pack size has since changed.
  • Values entered per serving in a field meant for per 100 g, or the reverse.
  • A missing product, or one with some fields empty.

So check the entry against the pack. It takes a glance: do the calories and the serving size on screen match the label in your hand? If not, trust the pack and edit the entry.

How close is a label to the real value?

Label values are the most direct data you will get for packaged food. They are still not laboratory measurements of your particular pack.

Rounding

Under 21 CFR 101.9, US labels express calories per serving to the nearest 5-calorie increment up to and including 50 calories, and to the nearest 10-calorie increment above 50. Amounts under 5 calories may be expressed as zero. Total carbohydrate and protein are expressed to the nearest gram.

The European Commission’s 2012 guidance suggests rounding energy to the nearest 1 kJ or kcal, and fat, carbohydrate and protein to the nearest 1 g at 10 g or more per 100 g.

Tolerances

Foods vary. The same Commission guidance explains that foods cannot always contain the levels of energy and nutrients printed on the label, “due to natural variations and variations from production and during storage”.

Rule What it says
US, 21 CFR 101.9(g)(5) A food is deemed misbranded if a nutrient such as calories, total sugars, total fat, saturated fat, cholesterol or sodium measures more than 20% above the declared value
US, 21 CFR 101.9(g)(4)(ii) Naturally occurring protein, total carbohydrate and fiber must be at least 80% of the declared value
EU guidance, fat Under 10 g per 100 g: plus or minus 1.5 g. From 10 to 40 g: plus or minus 20%. Over 40 g: plus or minus 8 g
EU guidance, carbohydrate, sugars, protein, fiber Under 10 g per 100 g: plus or minus 2 g. From 10 to 40 g: plus or minus 20%. Over 40 g: plus or minus 8 g

Two notes on the EU rows. The document is guidance for the authorities that check labels, and it states that it has no formal legal status. Its tolerances also include measurement uncertainty.

None of this is a reason to distrust labels. It is a reason not to chase single calories. A label is a close, regulated description of a product, and that is far more than a camera can offer.

Serving size vs per 100 g

The most common barcode mistake has nothing to do with the database. It is logging the wrong amount.

  • US labels are per serving. The FDA notes that the serving size is not a recommendation of how much to eat or drink, and that one package may contain more than one serving. Some packages show two columns, per serving and per package.
  • EU and UK labels are per 100 g or 100 ml. The European Commission says all the information must be expressed per 100 g or per 100 ml, and may also be given per portion. The NHS adds that the manufacturer’s idea of a portion may be different from yours.

Per 100 g is handy for comparing two products. Per serving is handy when you eat one serving. For everything in between, you need the weight you ate. Check the pack weight, estimate the share you had, and log that. How to estimate portions has references that help.

When to use which

  • Packaged, with a barcode: scan it, check it against the pack, enter your amount.
  • Home-cooked or plated: photograph it or describe it, then adjust the estimate.
  • A mix, such as cereal with milk and fruit: scan the packaged parts and estimate the fresh parts.

How Luca does it

Luca is an AI calorie tracker for iPhone, coming to the App Store. You can log by scanning a barcode, by photo, by voice or by typing a description. Barcode and manual entry are unlimited on the free plan. See logging packaged food by barcode and features.

This article is general information, not medical or dietary advice.

Frequently asked questions

Is barcode scanning better than a photo for calories?

For packaged food, yes. A barcode identifies the product, so the numbers come from its nutrition label instead of from how the food looks. A photo cannot read a recipe. You still need to enter how much you ate, because the label describes one serving or 100 g, not your portion.

What is an open food database?

The one Luca's barcode lookups use is a free, open database of food products run by a non-profit association of volunteers. Contributors scan barcodes and upload pictures of products and their labels. The database is published under the Open Database License, which lets anyone use it with attribution.

Can barcode nutrition data be wrong?

Yes. The open database behind Luca's barcode lookups says its data is provided as-is, with no promise that it is correct or complete. Entries are typed or photographed by volunteers, and recipes change. Compare the calories and serving size on screen with the pack in your hand, and correct the entry if they differ.

How close are label calories to the real value?

They are rounded and carry a tolerance. US rules express calories to the nearest 5 or 10, and treat a food as misbranded if measured calories exceed the declared value by more than 20 percent. European Commission guidance sets tolerances of about plus or minus 20 percent for mid-range amounts of fat, carbohydrate and protein.

Snap it. Luca counts.

An estimate of calories, protein, carbs and fat from a photo, and every number is yours to correct.

Coming to the App Store