The math

The math behind MealMath

Most meal planners rely on templates and generic advice. MealMath computes the mathematically optimal answer for your specific situation.

Real grocery data

We maintain a database of thousands of products from major grocery stores — real prices, real nutrition labels, updated regularly. No generic food databases with estimated values.

Mathematical optimization

Given your macro targets and your food list, MealMath computes the single cheapest combination that satisfies every constraint simultaneously. This isn't a heuristic or a "pretty good" guess — it's the provably optimal answer.

Hard constraints, not suggestions

When you set 150g protein as a target, MealMath guarantees the plan hits 150g. Not 148g. Not "close." Every constraint is satisfied exactly, or the system tells you it's impossible and explains why.

Adaptive replanning

Log a meal that wasn't in the plan? MealMath instantly recomputes the rest of your day to compensate. Had a high-calorie lunch? Dinner adjusts automatically to keep you on target.

Learns your metabolism

Track your weight over time and MealMath estimates your actual energy expenditure — not from a formula, but from your real data. Your calorie targets adapt as your body changes.

Runs on your device

The optimizer runs locally on your phone in under a second. No waiting for a server. No internet required for replanning. Your data stays on your device.

Comparison

MealMath vs. typical nutrition apps

FeatureTypical appMealMath
Meal planning approachManual or template-basedComputed from your constraints
Cost optimizationNoneProvably cheapest plan
Macro accuracy"Try to hit your targets"Guaranteed exact satisfaction
When you go off-planYou figure it outAuto-rebalances your day
Food databaseGeneric USDA estimatesReal store prices + labels
Calorie targetsStatic formulaAdapts to your actual data

Try it yourself

The best way to understand MealMath is to use it.

Download for iOS