Bakery Pricing Calculator: Build One With ChatGPT and a Spreadsheet

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Bakery Pricing Calculator: Build One With ChatGPT and a Spreadsheet.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Bakery Pricing Calculator: Build One With ChatGPT and a Spreadsheet.

To build a bakery pricing calculator, make four spreadsheet tabs: ingredients with pack prices, recipes with quantities, settings for labour and overheads, and products with one row per item and channel. Ask ChatGPT to write the formulas, then check each against your invoices and a stopwatch. The sheet returns cost per item and the margin at retail and wholesale prices.

Ready-made calculators are quicker to start with, and for a handful of recipes they are the better choice; BakeProfit and BakeryCost both have free tiers. A spreadsheet earns its place when you outgrow ten recipes, sell retail and wholesale side by side, time labour per batch, or want to change one supplier price and watch every product move. The price is an afternoon of setup and a habit of checking what ChatGPT writes.

Follow me on Instagram@sagnikteaches

When a ready-made calculator is enough, and when to build your own

For a baker with a handful of recipes, a free calculator is the faster route. BakeProfit offers recipe cost, cake pricing and recipe scaling calculators that need no account, and BakeryCost's page mentions automatic unit conversion, which a spreadsheet will not do for you. Both home pages mention ingredient, labour and overhead costs with a profit margin at the end (BakeryCost's example shows labour as hours times a rate), and both offer a free tier capped at 10 recipes (read October 2026). For a one-off price check, ready-made prompts do the job too; AI prompts for bakers on pricing, captions and replies has them. A sheet is for the questions that come back every month.

Connect on LinkedInSagnik Bhattacharya

Build your own when one of these is true:

Subscribe on YouTube@sagnikteaches
  • You have more than about ten products, or expect to.
  • You sell retail and wholesale and want both margins side by side. I did not see wholesale pricing mentioned on either home page, so test that first if you sell to cafes.
  • Your labour is measured in minutes per batch, and a bigger batch takes proportionally less time per loaf.
  • You want to change one supplier price or one wage and see every product move at once.
  • You want the file to be yours: no recipe cap, no plan to renew, every formula visible.

Four tabs, and the number each one hands to the next

The bakery in this example sells loaves and brownies over the counter, makes decorated celebration cakes to order and supplies loaves to two cafes (every price, recipe and time here is illustrative). Its calculator has four tabs, and Products pulls from the other three.

TabWhat lives thereWhat it hands on
Ingredients (packaging too)Name, pack size in grams, millilitres or "each", pack price, cost per unit, previous pack price and a change flagA cost per gram, per millilitre or per item
RecipesOne row per ingredient per recipe: recipe, ingredient, quantity, costIngredient cost per batch
SettingsHourly wage, on-costs, labour cost per minute, a list of monthly overheads, production hours, overhead per production minute, target marginsLabour and overhead per minute
ProductsOne row per item per channel (retail or wholesale): units per batch, hands-on minutes, packaging, unsold share, extra cost, then cost, price and marginCost per sold item, and the margin at your price

Two definitions carry most of the weight. Hands-on minutes are the minutes someone is working on the batch: mixing, folding, shaping, loading, bagging. Proving and baking time when nobody touches the dough does not count, because it does not use a baker. Overhead (rent, energy, insurance, software, the accountant, counter and admin wages) is spread across those same production minutes, so an item that keeps a baker busy for longer carries more of the rent. On-costs are the employer's costs on top of a wage; ask your accountant for the real percentage, because the 15% used here is a placeholder.

Asking ChatGPT for the skeleton, and the four things it missed

ChatGPT is good at plumbing: column layouts, lookups, SUMIFS. It knows nothing about your bakery, so the prompt supplies the structure and asks for formulas, not opinions. A free account is enough to start (limits change, so check yours), and nothing in the prompt concerns customers. For wider help with ChatGPT inside spreadsheets, see the ChatGPT and Excel guide.

I run a small bakery and want a pricing spreadsheet that works in Excel and Google Sheets.
Design four tabs: Ingredients, Recipes, Settings, Products.
Ingredients: name, pack size (g, ml or each), pack price, cost per unit.
Recipes: one row per ingredient per recipe, with a cost looked up from Ingredients (exact match).
Settings: hourly wage, on-costs %, labour cost per minute, monthly overheads, production hours per month,
overhead per production minute, target margins for retail and wholesale.
Products: one row per product per channel, with batch size, hands-on minutes per batch, packaging per unit,
then cost, price and margin.
Give me column letters, headers and the formula for row 2 of every calculated column.
Use XLOOKUP and SUMIFS, not VLOOKUP. List every assumption you made.

The first draft (illustrative) came back with a sensible layout. Its Products formulas, described in words because the cell references hardly matter here, were:

Overhead per unit  = ingredient cost per unit x 20%
All-in cost        = ingredients + labour + overhead + packaging
Suggested price    = all-in cost x (1 + target margin)

Four things were wrong or missing, and each is typical of a first draft.

  1. Overhead as a percentage of ingredient cost. For the loaf below that adds 9 cents. Overhead that follows production minutes comes to $2.50.
  2. Markup passed off as margin. Multiplying cost by 1.30 gives a 30% markup. On a cost of $6.03 that is a price of $7.83, whose margin is 23.1%. Margin is profit divided by price, so the price for a target margin is cost divided by (1 minus the margin).
  3. No unsold allowance. Loaves nobody buys are paid for by the loaves that sell, so cost per item sold is cost per item baked divided by (1 minus the unsold share).
  4. Nowhere for wholesale-only costs. Delivery and invoicing belong on the wholesale rows, not in an overhead pot that retail also carries.

A second prompt fixed all four at once:

Change the Products tab as follows.
1. Overhead per unit = hands-on minutes per batch x overhead per production minute (from Settings) / units per batch.
2. Add two columns: unsold % and extra cost per unit (delivery, on wholesale rows).
3. All-in cost per sold unit = (ingredients + labour + overhead + packaging) / (1 - unsold %) + extra cost.
4. Margin = (price - cost) / price.
5. Price for a target margin = cost / (1 - target), rounded up to the next 5 cents, using the retail
   target on retail rows and the wholesale target on wholesale rows.
Rewrite the formulas for row 2 and tell me which column letters changed.

These are the finished formulas as they sit in the sheet. Compare them with your own column letters before you paste anything, because one shifted column corrupts everything to its right.

INGREDIENTS  A name, B pack size, C unit, D pack price, E cost per unit, F previous pack price, G change
E2  =D2/B2
G2  =IF(F2="","",D2/F2-1)

RECIPES  A recipe, B ingredient, C quantity, D cost
D2  =C2*XLOOKUP(B2,Ingredients!A:A,Ingredients!E:E)

SETTINGS  labels in column A, values in column B
B2 hourly wage        B3 on-costs %        B4 =B2*(1+B3)/60  (labour cost per minute)
B5 monthly overheads (a SUM of the list below the table)      B6 production hours per month
B7 =B5/(B6*60)  (overhead per production minute)
B8 target margin, retail        B9 target margin, wholesale

PRODUCTS  A product, B channel, C recipe, D units per batch, E hands-on minutes per batch,
          F packaging per unit, G unsold %, H extra cost per unit, I ingredients per unit,
          J labour per unit, K overhead per unit, L all-in cost per sold unit, M your price,
          N margin, O price for the target margin
I2  =SUMIFS(Recipes!D:D,Recipes!A:A,C2)/D2
J2  =E2*Settings!$B$4/D2
K2  =E2*Settings!$B$7/D2
L2  =(I2+J2+K2+F2)/(1-G2)+H2
N2  =(M2-L2)/M2
O2  =CEILING(L2/(1-IF(B2="Wholesale",Settings!$B$9,Settings!$B$8)),0.05)

Supplier invoices into the Ingredients tab, with two different checks

Do not ask ChatGPT what flour costs. It does not know your supplier's price, and a plausible figure typed from memory is worse than a blank cell. Prices come from your invoices, and ChatGPT's job is turning invoice lines into rows. Extracting invoice data from PDFs into a table you can check covers PDFs and photos in more depth. Blank out account numbers before pasting anything.

The invoice (illustrative), and the prompt:

Supplier invoice, five lines
Strong white bread flour, 25 kg sack      2 x 24.00   48.00
Wholemeal bread flour, 25 kg sack         1 x 27.00   27.00
Fine sea salt, 25 kg sack                 1 x 20.00   20.00
Unsalted butter, case of 10 x 1 kg        1 x 98.00   98.00
Free-range eggs, tray of 180              1 x 63.00   63.00
Goods total                                          256.00

Turn these lines into rows for my Ingredients tab: ingredient | pack size | unit | pack price.
Use grams for weight, millilitres for liquids and "each" for counted items.
Pack price is the price of ONE pack as I will use it in recipes. If a line is a case of several
packs, say how you treated it. Finish by rebuilding the invoice total from your rows (quantity x pack price).

The draft that came back (illustrative):

IngredientPack sizeUnitPack price
Strong white bread flour25,000g$24.00
Wholemeal bread flour25,000g$27.00
Fine sea salt25,000g$20.00
Unsalted butter1,000g$98.00
Free-range eggs180each$63.00

Beneath it came "Rebuilt total: $256.00, which matches the invoice" and a one-line note that the butter had been treated as a single 1,000 g block. The butter row is wrong all the same. The $98.00 is the price of a case of ten blocks, and the pack size says one block. The total cannot catch that, because it multiplies quantity by price and never asks how big a pack is. The change column did: last month's butter was $9.80 for a 1,000 g pack, so $98.00 against the same pack size reads +900%. Two checks, two jobs. The rebuilt total proves the lines were read correctly; the change flag proves the pack sizes are right. Add conditional formatting that turns any change above 15% red, so a slip like this is hard to miss. The fix is a pack size of 10,000 g at $98.00, which gives $0.0098 a gram, the same as last month.

One more habit: give anything you make in-house its own Ingredients row. A sourdough starter costs the flour that feeds it, so a 1,000 g "pack" priced at $0.48 (500 g of flour at $0.00096 a gram) lets every recipe use "Starter" like any bought ingredient. A filling or glaze made in batches works the same way.

One loaf, from flour to a shelf price

The country loaf is the main example: 12 loaves to a batch, 800 g of dough each, 9,600 g in all. Before the sheet existed, the bakery priced it by feel at $7.50 over the counter and $5.25 to the cafes, which is 30% below retail. The Recipes tab holds this (cost per gram comes from the Ingredients tab):

IngredientGramsCost per gramCost
Strong white bread flour4,000$0.00096$3.84
Wholemeal bread flour1,000$0.00108$1.08
Starter (house-fed)1,000$0.00048$0.48
Fine sea salt100$0.0008$0.08
Water3,500$0$0.00
Batch9,600$5.48

Hands-on time, from a stopwatch on a normal day, is 90 minutes for the batch: 15 mixing, 10 folding, 30 dividing and shaping, 25 loading, scoring and unloading, 10 cooling and bagging. Settings turns that into money. A wage of $18.00 an hour plus 15% on-costs is $20.70, or $0.345 a minute. Overheads come to $5,000 a month: rent $2,100, gas and electricity $720, insurance $140, equipment servicing $120, software, phone and card terminal $110, accountant and licences $150, cleaning and laundry $90, marketing $70 and $1,500 of counter and admin wages. Both bakers together put in 250 hands-on hours a month, or 15,000 minutes, so each production minute carries $5,000 divided by 15,000, which is $0.333 (a flat $20 an hour).

LinePer batch of 12Per loaf
Ingredients$5.48$0.46
Packaging (paper bag and label, $0.12 each)$1.44$0.12
Labour: 90 minutes at $0.345$31.05$2.59
Overhead: 90 minutes at $0.333$30.00$2.50
Cost per loaf baked$67.97$5.66
With 6% unsold: cost per loaf sold$6.03

Per-loaf figures are rounded to the cent for display, so a column can differ from its total by a cent; the sheet keeps full precision. The unsold line says that of every 100 loaves baked, six are not sold, and the 94 that sell have to pay for all 100. That adds $0.36 to each loaf sold. Replace the 6% guess with your own figure once you have a few weeks of counts: what is left at closing, by product and day, divided by what was baked.

Against $6.03, the old counter price of $7.50 gives a margin of 19.7%, or $1.47 a loaf. At $8.50 the margin is 29.1% ($2.47), and at $9.00 it is 33.0%. With a 30% retail target in Settings, the sheet suggests $8.65. The owner moves to $8.50, a price customers will recognise, and accepts 29.1%. Neither 15% nor 30% is a rule; the target is whatever pays the owner a living after every wage, and only the owner can say what that is.

Retail and wholesale margins on the same loaf

Wholesale rows differ in three inputs. The unsold share drops to 1%, because standing orders are baked to a count with a couple of spares. The extra cost per unit is delivery: a 60-minute round at the loaded labour rate of $20.70, plus $6 of fuel, carrying 36 loaves, comes to $26.70 divided by 36, or $0.74 a loaf. And the price is whatever the cafe will pay. On 12-loaf batches the all-in cost of a wholesale loaf is $6.46.

The cafes want about 30% off the new retail price: $5.95. On the current method each loaf sold at that price loses $0.51. The sheet can test the levers before anyone agrees to anything, and the easiest is batch size. A trial day times a 24-loaf batch at 140 minutes of hands-on work, against 180 minutes for two batches of 12, which brings labour down to $2.01 a loaf and overhead to $1.94, and the wholesale cost to $5.32.

Wholesale priceBelow the $8.50 retail priceMargin, 12-loaf batchesMargin, 24-loaf batches
$5.25 (the old price)38%-23.1%-1.4%
$5.9530%-8.6%10.6%
$6.2526%-3.4%14.9%
$6.5024%0.6%18.1%
$7.0018%7.7%24.0%

At the old price of $5.25, every cafe loaf lost $1.21 on 12-loaf batches, and the bigger batch only brings it to roughly break-even. A price 30% below retail works only with the bigger batch, and even then leaves 10.6%. With a 15% wholesale target in Settings, the sheet's own suggestion is $7.65 on 12-loaf batches and $6.30 on 24-loaf batches. The owner offers $6.25 on a standing order of at least 18 loaves a drop, baked in 24-loaf batches, which earns 14.9%. Whether the ovens and the bakers can really turn out 24 at a time is a production question the sheet cannot answer, and how standing orders work for wholesale covers the customer side.

The lookup that fails quietly

Many drafts, and plenty of examples online, use VLOOKUP. Microsoft's own page says that if you leave out its last argument, VLOOKUP defaults to an approximate match, and that when the first column is not sorted "the return value might be something you don't expect". In a pricing sheet that looks like this: the recipe line says "Bread flour", the Ingredients tab says "Strong white bread flour", and instead of an error you get a plausible price borrowed from some other row. Nothing turns red, and every cost built on it is wrong.

XLOOKUP defaults to an exact match, and returns #N/A when it finds nothing unless you give it a fallback; Microsoft's page says so, and Google's help page for Sheets lists the same defaults. A loud error beats a quiet wrong price. XLOOKUP exists in Excel for Microsoft 365, Excel 2021 and 2024, and in Google Sheets; Microsoft's page says it is not available in Excel 2016 or 2019. On those versions, ask ChatGPT for INDEX and MATCH, where the final 0 means an exact match, and check any VLOOKUP it offers for a closing FALSE:

=INDEX(Ingredients!E:E,MATCH(B2,Ingredients!A:A,0))

Make the errors easy to find and hard to cause. Put a dropdown in the Recipes ingredient column that lists only the names on the Ingredients tab (the data validation menu in either program), so a typo cannot be entered. Put one check cell at the top of Products with the formula below, which should read 0:

=SUMPRODUCT(--ISERROR(Recipes!D2:D500))

SUMIFS fails quietly in its own way. A recipe name with a trailing space matches nothing, and instead of an error it returns 0, so the product shows no ingredient cost and a wonderful margin. Treat any product whose ingredients per unit is $0.00, or whose margin looks too good, as a name that did not match.

Cups to grams: the slip that nearly doubles the flour

Old family recipes and some supplier sheets are in cups, and the sheet needs grams. A model can quietly convert every cup at the same weight, which produces a believable error, because a cup is a volume and ingredients differ. King Arthur Baking's ingredient weight chart lists a cup of all-purpose flour at 120 g, bread flour 120 g, whole wheat flour 113 g, granulated sugar 198 g and water 227 g.

A recipe asks for 3 cups of flour and 1.5 cups of sugar. Convert both at the weight of a cup of water and you get 681 g of flour and about 340 g of sugar. At the chart's weights it is 360 g of flour and 297 g of sugar. The flour line is 89% too high and the sugar about 15% too high, and every price built on them inherits the error. The ingredient cost is small in dollars, but the habit is what matters, because the same slip hides in any recipe nobody weighed.

Two rules prevent it. Ask for a table that shows the grams per cup the model assumed for each ingredient, then compare it with a published chart or your own scale; weigh a cup of the flour you actually use, once. And convert in one place only, when you copy a recipe into the Recipes tab, keeping the cups in the source recipe and grams in the sheet. This is one place the ready-made calculators win: BakeryCost's page mentions automatic unit conversion, and in a spreadsheet the conversion is your job. King Arthur's own advice on the same page is to weigh ingredients on a digital scale.

A celebration cake and a tray of brownies: why one multiplier fails

Some owners price at a flat multiple of ingredient cost, three times for example. The sheet shows why no single multiple works. Two more products go in, each with its own recipe and timings.

The celebration cake serves 12: a three-layer vanilla sponge with buttercream, using 850 g of butter, 450 g of caster sugar, eight eggs, 450 g of plain flour, 15 g of baking powder, 15 ml of vanilla, 800 g of icing sugar and 150 g of jam, which costs $16.48. Hands-on time is 165 minutes: 40 baking, 35 filling and crumb-coating, 75 decorating, 15 cleaning and boxing. Labour comes to $56.93 and overhead to $55.00. The box and board cost $3.80, and nothing goes unsold because every cake is made to order. All-in cost: $132.20. Three times the ingredients is $49.43, which does not even cover the labour. At a 25% margin the sheet suggests $176.30, and at $175 the margin is 24.5%.

The brownie tray makes 24: 250 g of butter, 300 g of dark chocolate, 350 g of caster sugar, five eggs, 120 g of plain flour, 40 g of cocoa and 5 g of salt cost $8.01 a tray, or $0.33 a brownie. Hands-on time is 45 minutes, which is $0.65 of labour and $0.63 of overhead per brownie, plus $0.10 of packaging, with 5% unsold. All-in: $1.80 each, and at $2.75 the margin is 34.7%.

ItemIngredientsAll-in costMultiple needed to break evenThree times ingredients
Country loaf, retail$0.46$6.0313.2$1.37
Brownie, one of 24$0.33$1.805.4$1.00
Celebration cake, serves 12$16.48$132.208.0$49.43

Ingredients are about 8% of the loaf's all-in cost, 12% of the cake's and 18% of the brownie's, so a multiple tuned on one product misprices the others, and at these labour and overhead rates three times ingredients loses money on all three. For wedding cakes, where tiers, delivery and set-up come on top, pricing wedding cakes with a quote sheet built with AI extends the same idea.

Flour up 20%, butter up 18%, wages up $1: what actually moves

The point of the sheet is that a question like "what if butter goes up?" takes a minute. Change one pack price in Ingredients, or the wage in Settings, and read the margin column on Products. Here are three changes against the prices set above (loaf $8.50, cake $175, brownie $2.75):

ItemMargin nowFlour +20%Butter +18%Wage +$1 an hour
Country loaf, retail29.1%28.0%29.1%27.3%
Celebration cake24.5%24.4%23.6%22.6%
Brownie34.7%34.7%34.0%33.3%

A $1 rise in the hourly wage, about 6%, hurts every product more than a 20% rise in flour, because labour and overhead make up most of each cost. Butter matters only to the cake and the brownie, and only slightly. The instinct "flour is up, so raise the bread" is not what the sheet says; it says look at the wage line and the cake. Two limits: the wage change here is production pay only, so counter and admin wages in the overhead list need their own update, and the sheet assumes the same minutes per batch, so a change that alters how long the work takes is outside what it can see.

ChatGPT is useful on the output side. Paste the table above and ask for three plain sentences that a cafe could read in a price-change letter, then check every figure against the sheet before anything is sent. It is not useful for the calculation itself, which is the sheet's job.

Checking the sheet against last month's invoices

Three tests before you trust a price from it. First, hand-check one product on a calculator, line by line, overhead included. Second, compare the overhead total in Settings with your accountant's monthly figure for fixed costs. Third, back-test: multiply last month's output by the sheet's ingredient cost per unit and compare the result with the month's ingredient invoices, adjusted for stock.

Say the sheet predicts $2,310 of ingredients for last month's output and the invoices total $2,590, which is 12% more. Four causes are worth chasing: recipes missing from the sheet (test batches, staff bakes), waste beyond the unsold allowance, a pack price that moved without being updated (the change column should have flagged it), and heavy-handed portions, such as an extra 20 g of butter in each cake. A gap above about 5% is worth an hour.

ChatGPT can audit the formulas too, if you give it only the formulas and not the figures:

Here are the formulas from row 2 of each tab of my bakery pricing sheet. Do not rewrite them.
List: (1) any formula that would give a wrong answer without showing an error; (2) any assumption
the formulas make that I have not stated; (3) three test cases I should run by hand.
Do not calculate the answers; I will do that myself.

[paste the formulas]

Asking it not to calculate keeps the arithmetic where it belongs. The audit is worth running for the quiet failures described above, such as an approximate match or a blank cell treated as zero, and each one it names is a cell to test.

A 15-minute monthly routine to keep prices current

Once the sheet exists, a monthly pass should take about 15 minutes (my estimate; the first few will take longer).

  1. Paste the month's invoices into the invoice prompt, check the rebuilt total, then read the change column for anything above 15%.
  2. Update Settings if rent, insurance, energy or a wage has changed, and look at the check cell on Products.
  3. Re-time one batch each quarter, a different product each time, because hands-on minutes drift as people get faster or the menu changes.
  4. Save a dated copy of the file before you change any selling price, so you can see later what you knew when.
  5. Sort Products by margin. Whatever sits below target is a decision: raise the price, cut the minutes, change the recipe or drop the item.
  6. Protect the formula cells so that only inputs can be typed over, and keep the column map and the rules above in a ChatGPT Project, which holds instructions and files together, so each new question starts from the same context (Projects are available on the free plan too, with a lower file limit; check the current limits).

Festive menus are where the sheet earns most, because they combine new recipes, a deadline and a small window to get prices right. The order flow around them is in a bakery pre-order form for Christmas and Easter, and the sheet above is where the prices on that form should come from.

Questions bakers ask before building the sheet

Do I need a paid ChatGPT plan to build this?

Not to start. The work is asking for formulas, checking them and pasting invoice lines, and a free account handles that in ordinary chat. Free-plan limits and features change often, so check what yours allows today. Your pack prices and recipes are commercially sensitive, so look at the model-training switch in privacy settings and blank out account numbers on invoices before pasting.

Should my own wages be in the labour cost?

Yes, at a realistic hourly rate. If the owner's time is left out, the sheet shows a profit that is really unpaid work, and the margin vanishes the day someone else takes over the baking. Use one hourly figure for everyone who bakes, add the on-costs your accountant gives you, and keep counter and admin wages in overheads.

Excel or Google Sheets?

Either works. XLOOKUP, SUMIFS and CEILING run in Google Sheets and in Excel for Microsoft 365, 2021 and 2024. Excel 2016 and 2019 have no XLOOKUP, so ask ChatGPT for INDEX and MATCH with an exact match instead. Pick whichever the people who update prices already use, because a sheet nobody opens goes stale.

How often should I update the prices?

Whenever an invoice arrives with a changed pack price, which for most bakeries means a monthly pass. The change column flags anything above 15%. Re-time one batch each quarter, and redo the overhead list whenever rent, insurance or a wage changes. A stale sheet misleads because it still looks precise.

Further reads

Sources: BakeProfit and BakeryCost home pages; Microsoft Support pages for XLOOKUP and VLOOKUP; Google Docs Editors Help page for XLOOKUP; King Arthur Baking ingredient weight chart (all read October 2026). Every price, recipe, time and margin in the examples is illustrative.

Want your bakery's prices checked against real costs?

On a 1:1 call we'll walk through how you price today, set up the cost sheet with your own invoices and times, and decide which ChatGPT steps are worth keeping in your routine.

Book a 1:1 call with me