Barcode scanning is more accurate for packaged food, because it reads the nutrition label, and labels are usually close: lab tests of 24 popular snacks found real calories a median of 4.3% above the label. AI photo recognition covers everything without a barcode, like fresh food, home cooking and restaurant plates. It is quick, but less precise: in the Nutrition5k study, calorie estimates made straight from a photo were off by about 26% on average, mostly because of portion size.
You don't have to pick one. Scan what has a barcode, photograph what doesn't, and fix the portion before you save.
Key takeaways
- Packaged food: scan the barcode. It is the closest thing to the real number, as long as you check the serving size.
- Everything else: use a photo. It beats skipping the log, and it beats a rough guess from memory.
- Portion size drives photo error. The same AI was off by about 9.5% when it knew the food's weight and 26% when it had to judge it from the image.
- Both can be wrong. Barcode databases can hold outdated or user-added entries, and photos miss hidden oil and sauces.
- Use both in one app so you don't have to switch tools mid-meal.
Barcode scanning vs AI photo at a glance
| Barcode scanning | AI photo recognition | |
|---|---|---|
| Works on | Packaged foods with a UPC or EAN code | Any food you can photograph |
| Where the numbers come from | The product's nutrition label, via the app's database | An estimate of what the food is and how much is there |
| Biggest source of error | Wrong database entry or a portion that differs from the serving size | Portion size, hidden oil, sauces and mixed dishes |
| Measured accuracy | Snack labels a median 4.3% under true calories (Jumpertz, 2013) | About 26% average calorie error from a single photo (Nutrition5k, 2021) |
| Best for | Yogurt, bars, cereal, frozen meals, drinks | Home cooking, fresh food, restaurant plates |
| Fails when | There's no barcode or the product isn't in the database | The food is hidden, blended or stacked |
How accurate is barcode scanning?
A barcode scan is only as good as two things: the label itself and the database entry the app pulls.
The label
US rules leave labels some room. Under FDA regulations, a food is misbranded if its calories, sugars, fat or sodium come in more than 20% above the declared value. Nutrients like protein and fiber must reach at least 80% of what the label says. In other words, the rule mainly guards against labels that understate calories.
In practice labels land close. When NIH researchers ran 24 popular snack foods through a bomb calorimeter, servings weighed a median of 1.2% more than listed, and calories came out a median of 4.3% (6.8 calories) above the label. For a 200-calorie bar, 4.3% is about 9 calories.
The database entry
Most apps match the barcode to their own food database, and many databases include entries added by users. That's where errors creep in:
- The entry is for an older recipe of the product.
- The serving size is wrong, or set to the whole package.
- The barcode matches a different size of the same product.
The fix takes five seconds: compare the calories and serving size on screen with the package in your hand. If the food has a label but no barcode match, our guide to calculating calories from nutrition labels shows how to enter it by hand.
The portion
A barcode tells you what's in one serving, not how much you ate. If you pour cereal or scoop peanut butter, weigh it once to see how your usual portion compares with the label's serving.
How accurate is AI photo recognition?
Photo logging has two jobs: name the food and estimate how much is there. Naming is the easier part. Portion size is where the error comes from.
The clearest numbers come from Nutrition5k, a Google research dataset of 5,006 cafeteria plates whose ingredients were weighed. Its baseline results:
| What the model knew | Average calorie error |
|---|---|
| The food's weight (only had to work out calories per gram) | 9.5% |
| Photo plus depth data from a 3D camera | 16.5% to 18.8% |
| A single regular photo | 26.1% |
People aren't better at this. In the same study, people without nutrition training misjudged the weight of food on simple plates by 53% on average, and trained nutritionists by 41%.
A photo can't see the tablespoon of olive oil in a stir-fry (119 calories, USDA), the butter in mashed potatoes or the dressing soaked into a salad. That's why reviewing the estimate matters as much as taking the photo. For the full picture, read how AI food recognition works and how AI handles portion size estimation.
Which method to use for each kind of food
| Food | Best method | Why |
|---|---|---|
| Packaged snacks, bars, yogurt, cereal | Barcode | The label is the most accurate number you'll get |
| Frozen and ready meals | Barcode | Same, and you usually eat the whole package |
| Fresh fruit and vegetables | Photo, or weigh | No barcode; low calorie, so small errors matter less |
| Home-cooked meals | Photo, then add the oil and sauces | You know what went in, so correct what the photo can't see |
| Chain restaurants | The chain's published nutrition, or a photo | US chains with 20 or more locations must post calories |
| Independent restaurants | Photo | No label; check the portion and sauces |
| Coffee drinks and smoothies | Barcode if bottled, otherwise a typed description | Milk, syrup and size are hard to see in a photo |
Restaurant menus are not perfect either. In a JAMA study of 269 restaurant foods, stated calories were accurate on average, but 19% of items had at least 100 calories more than listed. More on eating out in how to track restaurant meals with AI.
A simple routine that uses both
- Breakfast at home: scan the yogurt and the granola, and weigh the granola once so you know your usual pour.
- Lunch out: take one photo from directly above the plate, then adjust the portion and add the dressing.
- Snack: scan the bar, or photograph the apple.
- Dinner at home: photograph the plated meal, then add the cooking oil you used.
It takes a minute or two a day. If you keep it up, that consistency is worth more than chasing a perfect number for every bite. Our tips for better AI food photos cover the camera side, and how accurate is AI calorie counting goes deeper on the research.
How Nutrify handles both
We make Nutrify, so here's how it works there. The same camera scans barcodes and takes food photos, and you can also log by telling Siri, typing a short description or tapping a saved meal. After a photo, you can edit the food, the portion and each ingredient before you save. Shop Mode lets you scan a product in the store to see whether it fits your diet before you buy it. Nutrify has a 7-day free trial, then a paid subscription.
Sources
- US Code of Federal Regulations, 21 CFR 101.9(g), nutrition labeling compliance.
- Jumpertz R, et al. Food label accuracy of common snack foods. Obesity. 2013;21:164-9.
- Thames Q, et al. Nutrition5k: towards automatic nutritional understanding of generic food. CVPR 2021.
- US Food and Drug Administration, Menu labeling requirements. Checked October 26, 2026.
- Urban LE, et al. Accuracy of stated energy contents of restaurant foods. JAMA. 2011;306:287-93.
- USDA FoodData Central, olive oil, FDC 171413.
- Apple App Store, Nutrify - AI Calorie Tracker: logging methods, Shop Mode and subscription terms. Checked October 26, 2026.
