How Solve Macros estimates a plate
Solve Macros turns one photo of a plate into calories, protein, carbs and fat. A vision model names the foods and guesses the grams, and our own code looks each food up in USDA FoodData Central and does the arithmetic.
This page describes every step, so you can check any number on the screen with a calculator.
What the tool does
You frame a plate and press the shutter. The tool reads the photo once, lists the foods it can see, and shows a readout card with calories, protein, carbs and fat. Each food sits in a labeled box over the photo and in a row on the card. You can tap any box or row to change the food, change the grams, or remove the item.
It is an estimate. It starts from a picture, and a picture does not carry weight. Everything that follows is built around that one fact.
Step one: name the foods
A vision model looks at the photo and lists what it can see, such as rice, chicken, broccoli or avocado. It also marks where each food sits in the frame when it can. If it finds nothing to eat, or the shot is too blurry to read, you get a clear message, and that photo does not count against your three for the day.
Naming is the part a camera does well. A grilled chicken breast looks like a grilled chicken breast. The tool then matches each name to a row in the USDA database. When the match looks wrong, the row carries a Check match tag, and you can search for a better food by name.
Step two: guess the grams
The same model eyeballs how much of each food is on the plate. This is the uncertain step. A photo shows area and height, but it cannot show density, and a heap of rice and a tight mound of rice can weigh very different amounts.
Every eyeballed weight carries an Eyeballed tag. When you type a weight, that row carries a Yours tag instead. The tool treats the two kinds differently in the range and in the sure meter, as described below.
Step three: do the math
Here the model steps aside. For each food, the tool takes the USDA values per 100 g and multiplies:
protein = USDA protein per 100 g, times grams, divided by 100
The same multiplication runs for carbs, fat and calories. Take the sample plate. Chicken breast, roasted, lists 31 g of protein and 165 kcal per 100 g. At 140 g, that gives 31 times 140 divided by 100 = 43.4 g of protein, and 165 times 140 divided by 100 = 231 kcal.
Each row is rounded once. Calories round to a whole number and protein, carbs and fat round to 0.1 g. The totals add the rounded rows, so the visible list always sums to the visible total. There is no hidden rounding between the rows and the total.
The sample plate, in full
The sample plate holds white rice 180 g, chicken breast 140 g, broccoli 90 g and avocado 50 g. The rows come to 234, 231, 32 and 80 kcal. The total is 577 kcal, with 51.3 g of protein, 61.6 g of carbs and 13.3 g of fat. Change the rice to 200 g and the total becomes 603 kcal, with the rice row at 260 kcal.
The split bar
The bar under the calorie number shows where the energy comes from. Protein and carbs count 4 kcal per gram and fat counts 9 kcal per gram, which are the Atwater general factors described in FAO Food and Nutrition Paper 77. Protein and carbs round to whole percentages, and fat takes the remainder so the three always add to 100. For the sample plate the split is 36 percent protein, 43 percent carbs and 21 percent fat.
The bar is a display of shares. The calorie total itself comes from the USDA calorie value of each food, not from recomputing the macros. The two can differ a little, because food energy can be calculated by more than one system.
The range
Under the calorie number you see a line such as Likely 432 to 721 kcal if a portion is off by a quarter. It is computed in a fixed way. Each eyeballed weight is scaled to 0.75 of itself for the low end and 1.25 of itself for the high end, and the calories are added. Weights you typed count at their exact value at both ends.
This is a display rule, not a measured accuracy. We do not publish an accuracy percentage for the camera. What the range shows is how much a quarter of error in the portions moves the total.
The sure meter
The meter has three segments. One lights when every weight is eyeballed. A second lights once two or more of the weights are yours. The third never lights, because a photo alone never reaches high confidence. The level is worked out by plain code from how many weights are yours, not left to the model, so the model cannot talk itself into feeling sure.
Where the numbers come from
Food values come from USDA FoodData Central. The sample plate uses values from the SR Legacy data type, whose final release was April 2018. FoodData Central lists values for foods sampled at particular times and places, so a given banana or loaf of bread will differ from the database row. The database is the reference, not a measurement of your plate.
What the tool does not do
It does not weigh your food. It does not see oil that soaked in or sauce under the rice. It does not know how your food was cooked unless the picture shows it. For cooked oil, the tool offers a one tap button that adds a tablespoon of olive oil, 13.5 g and 119 kcal, which you can adjust.
It also does not diagnose, prescribe or set a target. The numbers describe a plate, not what a person should eat.
Privacy, in the same plain terms
Your photo is resized on your device and sent once to the model provider through the Vercel AI Gateway for analysis. OnMacros does not store it. Please keep people out of the frame. The film strip of recent estimates lives in your browser tab and disappears when you close it. Daily photo counts are kept on your device and reset at local midnight. There is no account and no history on our side.
Why we show our working
Dietary measurement is hard even for researchers. The National Cancer Institute explains that self reported intake carries systematic error, which repeat measures cannot average away, and random error, which they can. A single photo is one measurement with both kinds of error in it. We would rather show you the multiplication and let you correct the grams than hide that behind a confident number.
If you want your meals kept in a log and planned against daily targets, that is what OnMacros does. Solve Macros stays a single frame, free, with no sign up.
Questions people ask
Which part of the estimate is a guess?
The grams. A vision model eyeballs the weight of each food from one photo. The food names are usually right, but the weights are the uncertain part, which is why every weight stays editable.
Does the model do the arithmetic?
No. The model only names foods and guesses grams. Our own code looks each food up in USDA FoodData Central and multiplies, so the totals always equal the sum of the rows you can see.
What does the range under the calorie number mean?
It is a display rule, not a measured accuracy. Weights the camera guessed are scaled down by a quarter and up by a quarter, and weights you typed count at their exact value.
Sources
- USDA Agricultural Research Service. USDA FoodData Central Accessed October 31, 2026.
- USDA Agricultural Research Service. FoodData Central data type documentation Accessed October 31, 2026.
- National Cancer Institute, NIH. Types of Measurement Error (Dietary Assessment Primer) Accessed October 31, 2026.