What is the cheapest meal plan that hits your targets?
This is the classic "diet problem": pick servings of each food to hit your nutrition targets for the least money. There are infinitely many combinations; a linear program finds the single cheapest one exactly, in one solve.
Health Intermediate Optimization free
After you install, this is the model to open.
Cheapest Meal Plan (Optimization)
- In your spreadsheet, click the Sortia icon in the strip of icons down the right-hand edge. No strip? Click the arrow at the bottom-right to open it. You can also use Extensions, then Sortia, then Open Sortia.
- Click Start from a template and put that name in the search box.
- Pick the card with that name and click Load this template. It arrives on a new tab with real numbers already in it.
The answer
The optimizer returns the exact cheapest combination:
- Cheapest cost
- $5.48 / day
- Calories
- 2000 met
- Protein
- 100g met
- Solve
- exact (LP)
The linear program guarantees the mathematically cheapest mix that still clears your targets, with no trial and error. Swap in your own foods, prices, and calorie/protein goals; add an "integer" constraint if you want whole servings only. The same method plans diets, refinery blends, and feed mixes.
The model
Choose servings of each food to minimize total cost, while meeting minimum calories and protein. Simplex solves it exactly.
| Foods | Oats, Chicken, Rice, Eggs |
| Minimize | total cost |
| Subject to | calories ≥ 2000 |
| and | protein ≥ 100g |
| Servings | solved |
Once it is in your sheet
- The model arrives with real numbers in it and runs as it stands, so you can press the button first and understand it second.
- Change the numbers to yours. The sheet marks which cells are inputs and which hold formulas, and most labels carry a note explaining the row.
- Press the run button at the bottom of the panel. It is labeled for the tool you are in, and the result lands on its own tab, with a written reading of it beside the figures.
Never used Google Sheets? Start here goes the whole way, in seven steps, and assumes nothing.
Next question
- Your test came back positive. What are the odds it is real?Positive Test, Real Risk
- Eight people, 32 more minutes of sleep. Real, or luck?Does Cutting Caffeine Buy You Sleep?
- What will you weigh six months from now?How Much Weight Will I Lose?
- Pick a rate you can hold. What date does that give?How Long Until I Hit My Goal Weight?
- Where should the next ad dollar go?Split the Ad Budget for Maximum Orders
- How few nurses can cover every hour of your unit?How Many Nurses Does Each Shift Need?
Every model like this one, and the method behind them: Optimization in Google Sheets.