ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Projects
  3. Build a Recipe Cost Calculator in Excel

Build a Recipe Cost Calculator in Excel

By ExcelReady Team·Updated November 3, 2026·7 min read

The short answer

A recipe cost calculator in Excel needs two tables: an ingredient list with each pack's price and size, and the recipe with quantities. Work out the cost per unit (=B2/C2), pull it into the recipe with VLOOKUP, total the batch with SUMPRODUCT, then divide by the servings in G2 and round: =ROUND(SUMPRODUCT(B2:B6,C2:C6)/G2,2).

Key takeaways

  • Price every ingredient per gram, millilitre or item: pack price divided by pack size.
  • VLOOKUP with FALSE pulls each ingredient's unit cost into the recipe, so you update prices in one place.
  • SUMPRODUCT multiplies quantities by unit costs and adds them up in one formula.
  • Round the cost per serving with ROUND(...,2), and lock the servings cell with $ when you fill formulas.
  • Food cost % is cost per serving divided by selling price; selling price is cost divided by your target %.
On this page+
  1. How the calculator is laid out
  2. Step 1: Work out the cost per unit for each ingredient
  3. Step 2: Pull each unit cost into the recipe with VLOOKUP
  4. Step 3: Total the batch cost with SUMPRODUCT
  5. Step 4: Calculate the cost per serving with ROUND
  6. Step 5: Find the food cost percentage and a menu price
  7. Allow for waste and trim
  8. Common recipe costing mistakes
  9. Practise it

A recipe cost calculator in Excel tells you what one batch costs, what each serving costs and what to charge for it. You keep one list of ingredient prices, and every recipe looks its costs up from that list, so when butter gets more expensive you change one cell and every recipe updates. This guide builds one step by step, using a batch of 12 muffins. It's for cooks, café and bakery owners, catering students and anyone applying for a hospitality job that uses Excel.

How the calculator is laid out#

The calculator uses two sheets:

  • Ingredients: one row per ingredient, with what you pay for a pack and how much is in it.
  • Recipe: one row per ingredient in the recipe, with the quantity it uses.

Keeping prices on their own sheet is the key idea. A recipe never contains a typed price; it always looks the price up. That way, one price change flows into every recipe.

Step 1: Work out the cost per unit for each ingredient#

Recipes use grams, millilitres and single items, but you buy packs. So first turn each pack price into a cost per unit. On a sheet called Ingredients:

ABCDE
1IngredientPack pricePack sizeUnitCost per unit
2Flour1.801000g=B2/C2
3Butter3.00250g0.012
4Eggs4.2012each0.35
5Sugar2.501000g0.0025
6Milk1.201000ml0.0012

Type =B2/C2 in E2 and fill it down to E6 (Windows: Ctrl+D; Mac: ⌘D). Flour costs 1.80 for 1,000 g, so each gram costs 0.0018. Don't round these numbers: tiny unit costs need every decimal, or the totals drift.

Always enter pack size in the same unit the recipe uses. If you buy flour by the kilogram but the recipe uses grams, enter 1000, not 1.

Step 2: Pull each unit cost into the recipe with VLOOKUP#

On a sheet called Recipe, list the ingredients and quantities. Then let VLOOKUP fetch each unit cost from the Ingredients sheet:

Excel formula
=VLOOKUP(A2,Ingredients!$A$2:$E$6,5,FALSE)
ABCD
1IngredientQtyCost per unitLine cost
2Flour5000.00180.90
3Butter2500.0123.00
4Eggs30.351.05
5Sugar2000.00250.50
6Milk2500.00120.30

Here's what each part of the VLOOKUP does:

  • A2 is the ingredient to find.
  • Ingredients!$A$2:$E$6 is the price table. The $ signs lock it, so it stays the same as you fill down.
  • 5 returns the fifth column of the table, Cost per unit.
  • FALSE means exact match only. Without it, VLOOKUP can return the wrong ingredient's price.

The ingredient names must match exactly, apart from capitals. "Flour " with a trailing space returns #N/A. The VLOOKUP function reference explains the arguments, and the VLOOKUP lesson lets you practise them.

Step 3: Total the batch cost with SUMPRODUCT#

Each line cost is quantity × cost per unit: =B2*C2 in D2, filled down. Add the column with SUM and you have the batch cost.

SUMPRODUCT does both in one formula, with no helper column:

Excel formula
=SUMPRODUCT(B2:B6,C2:C6)

It multiplies each quantity by its unit cost and adds the results: 0.90 + 3.00 + 1.05 + 0.50 + 0.30 = 5.75. The two ranges must be the same size, or you get #VALUE!. The SUMPRODUCT function reference shows other uses, such as weighted averages.

Step 4: Calculate the cost per serving with ROUND#

Keep the summary in a small block to the right of the recipe: labels in column F, values in column G. Put the number of servings in G2, and in G3 divide the batch cost by it:

Excel formula
=ROUND(SUMPRODUCT(B2:B6,C2:C6)/G2,2)

With 12 muffins, 5.75 / 12 = 0.47916..., and ROUND to 2 decimal places gives 0.48. ROUND changes the stored value, not just how it looks, so totals built on it add up to the cents you see. The ROUND function reference and the guide to ROUND, ROUNDUP and ROUNDDOWN explain when to round up instead.

If you build several recipes side by side and copy the summary formulas, write fixed cells such as the servings with $ signs, like $G$2, so they don't shift. The absolute references lesson practises exactly this.

Step 5: Find the food cost percentage and a menu price#

Food cost percentage is the share of the selling price that goes on ingredients:

Excel formula
=G3/G4

If the cost per serving in G3 is 0.48 and the selling price in G4 is 2.50, the result is 0.192. Format it as a percentage to show 19.2%.

To go the other way and set a price from a target food cost, divide the cost by the target. With a 30% target:

Excel formula
=ROUND(G3/30%,2)

The result is 1.60. Your target percentage is a business decision; 30% here is only an example. Food cost leaves out labour, rent and packaging, so check your full margin too. The guides to the profit margin formula and the markup formula show the difference between the two.

Allow for waste and trim#

Some ingredients lose weight before you use them: peel, bones, trimmings. The share you can actually use is called the yield. Add a Yield column to the Ingredients sheet and divide by it:

Excel formula
=B2/C2/F2

If carrots cost 1.00 per 1,000 g and only 80% is usable after peeling (F2 = 80%), each usable gram costs 0.001 / 0.8 = 0.00125, not 0.001. Skipping yield makes recipes look cheaper than they are.

Common recipe costing mistakes#

  1. Mixing units. A pack size in kilograms with a recipe quantity in grams makes costs 1,000 times too big. Pick one unit per ingredient.
  2. Typing prices into the recipe. They go stale. Always look prices up from the Ingredients sheet.
  3. Leaving out FALSE in VLOOKUP. An approximate match on an unsorted list returns the wrong price without any error.
  4. Rounding the unit costs. Round only the final money results, such as cost per serving and menu price.
  5. Forgetting small items. Salt, oil and baking powder are cheap per recipe but add up across a menu. List them anyway.

For price lists with discounts and bulk prices, see price lists and discounts in Excel. For the other spreadsheets used in kitchens and hotels, read about Excel skills for hospitality jobs.

Practise it#

The calculator rests on three skills: an exact-match lookup, rounding and locked references. Practise VLOOKUP in a live spreadsheet, then practise ROUND, ROUNDUP and ROUNDDOWN. Each formula is checked instantly. Then try the exercise on this page to cost a muffin from scratch.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

This muffin batch makes the number of servings in D2. In D4, calculate the cost per serving: use SUMPRODUCT to multiply quantities (B2:B6) by cost per unit (C2:C6), divide by D2, and round to 2 decimal places with ROUND.

fx
ABCDE
1
Ingredient
Qty
Cost per unit
Servings
2
Flour (g)
500
0.0018
12
3
Butter (g)
250
0.012
Cost per serving
4
Eggs (each)
3
0.35
5
Sugar (g)
200
0.0025
6
Milk (ml)
250
0.0012
7
8
9

Tip: SUMPRODUCT(B2:B6,C2:C6) gives the batch cost. Divide it by D2, then wrap everything in ROUND(...,2).

Practise this in a lesson

LessonVLOOKUP exact matchPull product names and prices from a catalog with VLOOKUP, and lock the table so the formula fills down cleanly.LessonROUND, ROUNDUP and ROUNDDOWNControl decimals properly, which isn't the same as formatting.LessonRelative vs absolute references ($)Lock a cell with $ so it doesn't move when you copy a formula, one of the most-tested Excel skills.Function guideVLOOKUPLearn VLOOKUP with clear examples, the 4 most common mistakes, and a live practice exercise you can try in your browser.Function guideROUNDRound to decimals, whole numbers or the nearest thousand with Excel's ROUND. Learn when formatting isn't enough, then practice live.Function guideSUMPRODUCTMultiply columns and add the results in one step with SUMPRODUCT. Totals, weighted averages, conditions, and a live exercise to try.

Frequently asked questions

How do I calculate the cost of a recipe in Excel?

+

List each ingredient's cost per unit (pack price divided by pack size), multiply it by the quantity the recipe uses, and add the results. =SUMPRODUCT(B2:B6,C2:C6) does the multiplying and adding in one step.

How do I calculate cost per serving in Excel?

+

Divide the total batch cost by the number of servings, and round to cents: =ROUND(total/servings,2). For a 5.75 batch that makes 12 muffins, that's 0.48 each.

How do I calculate food cost percentage in Excel?

+

Divide the cost per serving by the selling price and format the cell as a percentage. A 0.48 muffin sold for 2.50 has a food cost of 0.48/2.50, which is 19.2%.

How do I set a menu price from a target food cost?

+

Divide the cost per serving by your target percentage. With a 0.48 cost and a 30% target, =0.48/30% gives a price of 1.60. Round it to a sensible menu price afterwards.

How do I include waste or trim in recipe costing?

+

Divide the cost per unit by the yield, the share you can actually use. If only 80% of a vegetable is usable after peeling, =cost_per_gram/80% gives the true cost of each usable gram.

Sources

  • VLOOKUP function - Microsoft Support
  • SUMPRODUCT function - Microsoft Support
  • ROUND function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How the calculator is laid out
  2. Step 1: Work out the cost per unit for each ingredient
  3. Step 2: Pull each unit cost into the recipe with VLOOKUP
  4. Step 3: Total the batch cost with SUMPRODUCT
  5. Step 4: Calculate the cost per serving with ROUND
  6. Step 5: Find the food cost percentage and a menu price
  7. Allow for waste and trim
  8. Common recipe costing mistakes
  9. Practise it

Keep reading

Math· 5 min read

Profit Margin and Markup Formulas in Excel

Profit margin is profit divided by the selling price: =(C2-B2)/C2, where B2 is the cost and C2 is the price. Markup is profit divided by the cost: =(C2-B2)/B2. Format both cells as percentages. A product that costs 60 and sells for 80 has a 25% margin but a 33.3% markup, because the same profit is divided by different numbers.

Math· 6 min read

Markup Formula in Excel and How It Differs From Margin

The markup formula in Excel is =(Price-Cost)/Cost, formatted as a percentage. For a cost in B2 and a price in C2, type =(C2-B2)/B2. To set a price from a markup rate in E1, use =B2*(1+$E$1). Markup divides profit by cost; margin divides profit by price, so a 50% markup is only a 33.3% margin.

Projects· 6 min read

Price List With Discounts and Tax in Excel

A price list in Excel needs three formulas per product. Sale price is =ROUND(B2*(1-C2),2), the list price less its discount. Tax is =ROUND(D2*$I$1,2), with the tax rate in one cell locked with $. Final price is sale price plus tax. Keep the rates in their own cells so one change updates every row.

More on projects

  • How to Build a Rent Roll in Excel for Rental Properties
  • Build a Risk Register in Excel With Risk Scores
  • Build a Simple Sales Dashboard in Excel
  • Build a Simple Sales Forecast in Excel
  • Build a Sales Pipeline Tracker in Excel
  • Build a Simple Sales Report in Excel
All projects articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free