Solve one meal from what is left in your day
Take the protein, carbs and fat still open today, pick four foods and get gram amounts that land inside 5 g. A worked lunch with every number shown.
Work out your own numbers here, then read where every number comes from.
Your day
1770 kcal140 P · 190 C · 50 F
This meal
449 kcalEmpty loadout
Load 2 to 8 foods from your kitchen.
General information, not medical advice. Not for anyone under 18, and not for pregnancy or a medical condition. Talk to a doctor or dietitian first. Read the full disclaimer.
Your loadout
- Slot 1 open

One meal, three numbers, a handful of foods. Give the solver the protein, carbs and fat you have left, and it returns grams for each food that land every macro within 5 g.
This article walks through one lunch from start to finish, with every number on the table.
The setup: what is left
Say you are mid day and the plan for the rest of today leaves this meal 45 g of protein, 60 g of carbs and 15 g of fat. That is the scoreboard. In kcal it is 4 times 45, plus 4 times 60, plus 9 times 15, which is 180 plus 240 plus 135, or 555 kcal.
You do not need to type the kcal. The solver works in grams of protein, carbs and fat and calculates kcal from them afterwards.
The foods for the loadout are four: chicken breast, cooked, jasmine rice, boiled, broccoli, blanched, and olive oil. A protein, a carb, a vegetable and a fat. It is the shape most solved meals take, and it makes a clean first example.
What the foods bring
Every food is a small bundle of macros per 100 g. Using the values in the food list the solver ships with, per 100 g:
- Chicken breast, cooked: 31 g protein, 3.6 g fat, 0 g carbs.
- Jasmine rice, boiled: 2.7 g protein, 0.3 g fat, 28.2 g carbs.
- Broccoli, blanched: 2.4 g protein, 0.4 g fat, 7.2 g carbs.
- Olive oil: 0 g protein, 100 g fat, 0 g carbs.
The reason a meal needs solving is visible here. Chicken is mostly protein, but it carries a little fat. Rice is mostly carbs, but it carries a little protein. Broccoli adds a trace of everything. Add up the pieces by hand and you are doing an equation with three unknowns.
The result
Run through the solver, the meal comes back like this.
- Chicken breast, cooked: 110 g.
- Jasmine rice, boiled: 174.3 g.
- Broccoli, blanched: a standard portion.
- Olive oil: 9.6 g.
Totals: 42.4 g protein, 60 g carbs, 14.7 g fat, 542 kcal.
Set against what was left, protein is 2.6 g under, carbs are on the number and fat is 0.3 g under. All three sit inside the 5 g window, so the banner reads on target.
Check the math by hand
You can verify a solved meal with a pencil. Take protein first. The chicken gives 110 times 0.31, which is 34.1 g. The rice gives 174.3 times 0.027, which is 4.7 g. The broccoli portion gives 3.6 g. Together that is 42.4 g, the figure the totals show.
Carbs come out the same way. Rice gives 174.3 times 0.282, about 49.2 g. The broccoli portion gives 10.8 g. That is 60.0 g with nothing from the chicken or the oil.
Fat is the small one. The chicken gives 3.96 g, the rice 0.5 g, the broccoli 0.6 g and the oil 9.6 g, for 14.7 g in total.
There is a full walkthrough of the kcal side in the article on checking a solved meal against 4, 4 and 9.
Why not just eyeball it
Because each food moves more than one macro. If you nudge the rice up to reach the carb number, the protein rises a little too. If you raise the chicken to close the protein gap, the fat rises with it. A meal with four foods has a number of ways to go slightly wrong, and it takes a few rounds to find a combination that lands all three at once.
The solver does those rounds in one step. You still see the whole thing: the grams, the totals and the gaps. It does not hide a result behind a score.
Where the numbers come from
Food values come from USDA FoodData Central, per 100 g. The service publishes more than one kind of data, from analytically derived Foundation Foods to historic Standard Reference entries, and the data documentation explains each type. Totals are as exact as the entries behind them.
Kcal for the meal come from the three macros with the Atwater general factors, which put protein and carbohydrate at 4 kcal a gram and fat at 9, as set out in the FAO paper on food energy conversion factors.
Try it with your own day
The recipe for a first try is short.
- Work out what is left for the meal. If you have a day target, subtract what you have eaten. The article on macros left versus daily targets shows how.
- Load a protein, a carb, a vegetable and something for fat. Four foods is plenty.
- Read the grams. Note which macro has the largest gap.
- If the display says no exact fit, read the reason line. The article on why a meal cannot close exactly explains the usual causes.
What to expect on the plate
The grams are what you weigh. A food scale and a bowl are enough. Put the bowl on the scale, zero it, add the rice until it reads 174 g, zero again and add the chicken. The household hint beside each row is a rounded helper, not the figure to hit. The article on grams first, cups and pieces second explains the rounding.
Weigh raw unless the row says cooked. Rice that is already boiled is a different food from rice in the packet, and the numbers above are for boiled rice.
The point of the exercise
A solved meal turns a vague target into a short list of weights. Forty five grams of protein left stops being a worry and becomes 110 g of chicken. That is the entire product idea: the post workout meal, the last meal of the day or a lunch in the office, solved to the gram, free, with the working shown.
If you want that for every meal of the day around what you have already logged, the OnMacros hub is where that lives.
Questions people ask
Do I have to use all three macros?
Yes. The solver lands protein, carbs and fat together. If you do not care about one of them, type a number you would be happy with and read the gap it reports.
Why does the meal show 542 kcal when the macros left add up to 555?
Because the meal is allowed to sit within 5 g of each macro. Protein was 2.6 g under and fat 0.3 g under, and those small gaps account for the 13 kcal.
Can I swap the foods and keep the same macros?
Yes. Change a food, keep the three numbers and read the new grams. Each food brings a different mix of macros, so the gram amounts will change.
Sources
- USDA Agricultural Research Service. USDA FoodData Central Accessed October 31, 2026.
- USDA Agricultural Research Service. Data Documentation, USDA FoodData Central Accessed October 31, 2026.
- 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.