Scanning a barcode is the fastest way to log a yogurt, a bag of crisps or a box of cereal. One beep and the calories are in your diary. But where does that number come from, and can you trust it? Studies have looked at both the databases behind barcode scanners and the labels they copy, and the answer is reassuring, with one big catch.

The short answer: a barcode scanner is the most accurate way to log packaged food, because it copies the values printed on the pack instead of estimating them. In a test of seven diet apps, 79% of the calorie values found by scanning were within 5% of the label. The real weak spot is the portion: if you log the suggested serving but pour twice as much, the scan can’t know.

How does a barcode scanner calorie app work?

A barcode scanner reads the product number on the pack and looks it up in a food database, which returns the nutrition values the manufacturer printed on the label. You then tell the app how much you ate, and it does the maths.

The barcode itself contains no nutrition data. It’s only an ID number (usually 13 digits in Europe and 12 in North America). Everything depends on the database it points to, and databases are built in three ways:

  • Manufacturer data, sent directly by brands or by data services.
  • Crowdsourced entries, added by users who type in the label or upload a photo of it.
  • A mix of both, which is what most large apps use.

A well known example is Open Food Facts, a non profit, open database where more than 100,000 contributors have added more than 4 million products from 150 countries. Its terms are honest about the trade off: the data is entered by contributors, can contain errors, and photos of the label are uploaded precisely so anyone can check and correct it. BananaCal looks up scanned barcodes in Open Food Facts.

How accurate are barcode scanner apps?

For calories, very accurate. Studies that compared app databases with the real label or with a national food table found energy values close to the reference, while some nutrients were much less reliable.

Study What was tested Main result
Maringer et al., 2019 100 Dutch supermarket products scanned with 7 diet apps Energy shown for 99% of products found; on average 79% within 5% of the label. Products recognized: from 5% to 96% depending on the app. Other nutrients varied greatly.
Evenepoel et al., 2020 50 people logging 4 days twice in one app, compared with the Belgian food table After removing extreme values (2.8% of entries), energy correlated at r = 0.96; carbs, fat and protein at 0.90. Sodium and cholesterol were weak.

Two lessons stand out. First, calories are the most reliable number in a scan, because every label must show them. Second, whether the product is found at all depends on the app’s database: a scan that returns nothing, or the wrong product, is a bigger problem than a value that’s off by a few percent. The Evenepoel study also shows why a quick sanity check matters: a few absurd entries were enough to distort the totals until they were cleaned.

How accurate is the label itself?

A scan can only be as accurate as the label, and labels are allowed a margin. Natural variation between batches makes perfect labels impossible, so regulators set tolerances.

  • United States: under 21 CFR 101.9, a food is misbranded if its calories, sugars, total or saturated fat or sodium are more than 20% above the label. There’s no penalty for having fewer calories than stated.
  • European Union: the European Commission’s 2012 guidance allows carbohydrate, sugars, protein, fiber and fat a tolerance of ±20% when the food contains 10 to 40 g per 100 g, ±2 g (±1.5 g for fat) below 10 g and ±8 g above 40 g. It also says declared values should be averages across batches, not set at either end of the range.

In practice, labels land much closer than these limits. When NIH researchers measured 24 popular US snack foods, the real metabolizable calories were 4.3% higher than the label (a median of 6.8 kcal per serving), well within the legal margin. On a 200 kcal snack, that’s under 10 kcal.

The biggest error: the portion, not the database

The scan gives you the right values per 100 g. The number in your diary is only right if the amount you log matches what you ate, and people are bad at this.

In a UK study, 169 adults were asked to pour themselves a bowl of breakfast cereal. For every type of cereal, the poured amount was larger than the serving on the pack. Granola was the extreme: the label suggested 45 g, the median pour was 95 g, about twice as much.

Worked example: a scanned bowl of granola

The granola in that study had 2,155 kJ, or about 515 kcal, per 100 g. Here’s what happens if you scan it and accept the suggested serving:

What you log Weight Calories
The pack’s serving 45 g (1.6 oz) about 232 kcal
What people actually poured (median) 95 g (3.4 oz) about 489 kcal
Gap in one bowl 50 g about 257 kcal

That gap of about 257 kcal comes from one breakfast. It’s roughly 50 times bigger than the 4.3% label error measured on snacks. If the scan is accurate and you still don’t see the results you expect, the portion is the first thing to check. Weigh the bowl once or twice, or use our guide to measuring portions without a scale.

Why does a scanned product show the wrong calories?

When a scan is clearly off, the cause is almost always one of a few common database mistakes. You can spot each one in seconds by comparing the screen with the pack.

  1. Kilojoules entered as kilocalories. EU labels show both. If a cereal shows 1,500 “kcal” per 100 g, someone typed the kJ figure. The kJ number is about four times the kcal number.
  2. Prepared vs as sold. Some labels give values for the product made up with milk or water. Pasta, rice, soup powders and hot chocolate are typical cases: check whether the entry matches the dry product you weighed.
  3. Per serving vs per 100 g. A crowdsourced entry may store a 30 g serving as if it were 100 g. The calories per 100 g will then look strangely low.
  4. Old recipe, same barcode. Brands reformulate products without always changing the code. If the pack in your hand differs from the screen, trust the pack.
  5. A different country version. The same brand can sell different recipes in different countries.
  6. Multipacks. The barcode on the outer box may describe the whole pack, not one bar or one can.

A quick plausibility check also helps. Energy roughly equals protein × 4 + carbohydrate × 4 + fat × 9 (plus fiber × 2 on EU labels). If the total on screen is far from that sum, the entry has an error.

Barcode, photo or search: which should you use?

Use the barcode for anything in a package, a photo for meals without a label, and search for loose foods. Each method is strongest where the others are weak.

Food Best method Why
Yogurt, cereal, snacks, drinks Barcode Copies the manufacturer’s label
Home cooked meals, restaurant plates Photo, then adjust No label exists; correct portions and oil afterwards
Fruit, vegetables, bread from the bakery Food search No barcode; pick an entry that matches raw or cooked

Photo estimates are useful but less precise, especially for portions and hidden fats: our review of how accurate AI calorie counting is explains why. Our guide to reading nutrition labels helps you check what the scan copied. If you’re still choosing an app, see how popular apps compared in studies in our guide to the best calorie counting app.

In BananaCal you can scan a barcode, set the grams you actually ate instead of the suggested serving, and edit the meal after saving if you weigh it later.

How to get the most out of a barcode scanner

  • Scan, then change the amount. Never accept the default serving without a look.
  • Weigh new products once. After that, you’ll know what your usual bowl or handful weighs.
  • Check calories per 100 g against the pack the first time you scan a product.
  • Watch for kJ, prepared values and old recipes when a number looks odd.
  • Log at the moment you eat. Scanning takes seconds; remembering in the evening doesn’t work as well. Our guide on how to count calories has more tips.
  • Know your target. The calorie calculator gives you a daily number to log against.

Logging consistently matters more than perfect numbers. A scanned label within a few percent, plus an honest portion, is about as good as calorie counting gets outside a lab.