Skip to main content
Solve Meals

How Solve Meals solves a meal

Solve Meals takes the protein, carbs and fat you have left for one meal and the foods you want to eat, then returns a gram amount for each food. A meal is on target when all three macros land within 5 g of what you asked for.

That is the whole job. The rest of this page says what goes in, what comes out, where the numbers come from and what the display tells you when a meal does not close.

What goes in

Two things go in. The first is your macros left: grams of protein, grams of carbs and grams of fat for this one meal. You can type them, drag the sliders or nudge them in small steps. The second is your loadout, the short list of foods you actually have or actually want.

Nothing else is needed. There is no account, no calorie goal to guess and no day plan to build first. The meal is the unit. If you want to work out the macros left for the meal from a day target, the article on macros left versus daily targets walks through the subtraction.

What comes out

Each food in the loadout comes back with a gram amount, shown large, like the number on a scale. Beside it sits a rounded household hint where one makes sense, such as about 2½ eggs, so the portion is easy to picture. The grams are the exact figure. The hint is a rounded helper.

Under the foods you see the totals: protein, carbs, fat and kcal for the meal, each set against what you asked for. Every macro shows its gap, with a plus when the meal is over and a minus when it is under.

The display then says one of two things.

  • On target. All three macros are within 5 g of your numbers.
  • No exact fit. At least one macro misses by more than 5 g. The display names the macro, says by how much and explains why in plain words.

Where the food numbers come from

Food values come from USDA FoodData Central. Values are per 100 g and the entry you pick is the entry that is used. FoodData Central publishes several data types, among them analytical Foundation Foods and the older Standard Reference Legacy set, and describes where each type gets its values in its data documentation.

The same service notes that nutrient values are a snapshot in time. They describe particular foods sampled at particular times and places and analyzed with the methods of that time, so two entries for the same food can differ a little. Treat any total as a close estimate that is as good as the entry behind it.

Raw or cooked matters because the entries differ. Weigh raw unless the row says cooked. The article on what the scale reads shows how big that difference can be with dry oats against boiled rice.

How kcal is worked out

The kcal for the meal comes from the three macros with the Atwater general factors: 4 kcal per gram of protein, 9 kcal per gram of fat and 4 kcal per gram of carbohydrate. These are the factors described in the FAO technical workshop report on food energy conversion factors. Because the factors are fixed, you can check any solved meal yourself in one line. The article on checking a solved meal against 4, 4 and 9 does exactly that.

Real food energy is more varied than three round numbers. The report itself describes several systems of factors in use, and the general system is the simplest. Solve Meals uses the simple one so that the kcal figure always agrees with the macros shown beside it.

The rules a visitor can rely on

These are the rules that decide what you see.

  • Every food you load stays in the meal. The solver does not quietly remove a food to make the numbers work. If a food pushes a macro over, the display says so.
  • Vegetables and fruit are given a standard portion by default so a handful of greens does not distort the meal. Each of those rows carries a tag. Fixed means the portion stays put. Switch the row to solved and the amount joins the rest of the meal.
  • You can lock a food at a gram amount you choose. A locked food stays exactly there and the other foods solve around it.
  • The result for the same inputs is always the same. Reload the page, type the same numbers and you get the same grams.
  • The numbers you type for your targets are taken as given. The solver does not judge them.

For the difference between fixed and solved rows, see fixed foods and solved foods.

When the meal does not close

Some food sets cannot reach all three macros. A loadout with no fat source cannot add fat. A loadout of fish and greens cannot add much carbohydrate. A fat heavy cut of meat can overshoot fat before protein is reached.

When that happens the display turns neutral and gives a short reason line. It says which macro misses, by how much and why. It then offers one food that would fix the gap, and that food is checked before it is shown, so the suggestion lands on target when you add it. The article on reading the reason line shows real examples.

What the solver does not do

It does not prescribe a diet or a body weight. It does not check your targets and it does not judge them. It does not plan a whole day from a pantry list. It solves one meal against the macros you say are left, and it is built to be honest when a meal cannot close.

If you want every meal of the day solved around what you have already logged, that is what OnMacros does. The OnMacros hub explains it. Solve Meals itself stays a single meal tool.

Limits worth knowing

The grams you get are only as exact as the food data and your scale. A food label can differ from a database entry. A cooked weight depends on how long something cooked. If your scale reads a food in a different state from the entry, the macros shift with it.

Treat the output the way you would treat a measured recipe. It tells you where to aim. Landing within a gram or two of the figure is a good result, and the 5 g window is there to say so out loud.

Questions people ask

What does the solver need from me to start?

Three numbers, the grams of protein, carbs and fat you have left for the meal, and the foods you want in it. Everything else is worked out from those.

Where do the food numbers come from?

From USDA FoodData Central, per 100 g, using the entry that matches the food you picked. Targets you type are yours and are not checked.

What does on target mean here?

Protein, carbs and fat each land within 5 g of what you asked for. A meal that misses one of them is shown as off target, with the reason.

Sources

  1. USDA Agricultural Research Service. Data Documentation, USDA FoodData Central Accessed October 31, 2026.
  2. Food and Agriculture Organization of the United Nations. Food energy: methods of analysis and conversion factors, chapter 3 (FAO Food and Nutrition Paper 77) Accessed October 31, 2026.
  3. USDA Agricultural Research Service. Frequently Asked Questions, USDA FoodData Central Accessed October 31, 2026.