About

Macrosolver is a website designed to aid meal planning for fitness enthusiasts to find out how much of each ingredient they should eat/use in recipies. While most tools concentrate on calorie/food tracking, Macrosolver allows you to select foods you want to eat and calculate the exact quantities required to hit your target macros.

Whether trying to lose fat or increase muscle, meal planning for fitness goals is an optimisation problem. You want to minimise the total calories consumed for a given set of ingredients while hitting a target amount of carbs, fat and protein. Treating meal planning as a linear optimisation problem allows you to lose weight while maintaining as much muscle as possible or bulk while gaining as little fat as possible.

Using our meal calculator tool, you can create recipes and meal plans or experiment with different foods and quantities to calculate meals matching your target macros and budget.

How it works, how much should I eat?

A user wants to consume 1705 calories daily, split over five meals with 25g carbs, 13g fat and 32g of protein per meal. Macrosolver tries to calculate the optimal quantity of ingredients to match the provided target as closely as possible.

Set your target macros

In the “Target macros” section, set carbs to 25, fat to 13 and protein to 32.

Target macros

Add your ingredients

In the fridge, you have some chicken, rice, green beans and broccoli. Add these ingredients to your meal using the food search bar, selecting the item, and then clicking “add to meal”.

Food search

Calculate the results

When all the items are added to the meal, click “Calculate”

Calculate food

Then view the results.

Calculate food

There’s an error “Infeasible: The problem contains contradictory constraints. No solution exists.”

What does this mean?

If we look at our target macros, we have a target fat content of 13g. Looking at our ingredients, they are all low on fat! The error message tells us that hitting our target macros with the selected ingredients is impossible.

Adjust quantities and ingredients

It is impossible to calculate a meal to hit our target macros with broccoli, beans, chicken and rice, as we also want to hit 13g of fat.

Let’s add olive oil to the meal for some fat content and try re-calculating.

Calculate food After adding some fat (olive oil) to the meal, we can successfully calculate how much of each food we need to closest reach our target macros.

Looking at the meal, 972g of broccoli doesn’t look too enjoyable in a single serving!

Let’s set the minimum and maximum value for the green beans and broccoli to 50g, so we have 50g of each for a total of 100g of greens.

Calculate food

The result looks much better now!

Based on our target macros, we now have the most optimal quantities to eat for the given ingredients and min/max values to closest match our target macros.

Now you know how to use the tool, go ahead and add additional ingredients, change the quantities and create your own custom meals.

Macrosolver calculates ingredients quantities to closest reach your your carbs, fat and protein target.

Food data

The food data used on the free version of Macrosolver is from the “Australian Food Composition Database”. The Australian Food Composition Database​ is a reference database that contains data on the nutrient content of Australian foods. It is referred to as a reference database because it contains mostly analysed data. Only a small proportion of data in the database come from other sources such as recipe calculations, food labels, imputing from similar foods or by borrowing from other countries. The Australian Food Composition Database is licensed by Food Standards Australia New Zealand (FSANZ) under a licence based on a Creative Commons Attribution-ShareAlike 3.0 Australia licence.