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)

  1. 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.
  2. Click Start from a template and put that name in the search box.
  3. 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.

FoodsOats, Chicken, Rice, Eggs
Minimizetotal cost
Subject tocalories ≥ 2000
andprotein ≥ 100g
Servingssolved

Once it is in your sheet

  1. The model arrives with real numbers in it and runs as it stands, so you can press the button first and understand it second.
  2. 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.
  3. 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.