Coffee Shop Pricing: Cost per Cup and Margins Worked Out With AI

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Coffee Shop Pricing: Cost per Cup and Margins Worked Out With AI.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Coffee Shop Pricing: Cost per Cup and Margins Worked Out With AI.

Cost each drink from grams, millilitres and packaging plus a waste allowance, then divide that cost by one minus your target margin to get a floor price. Have AI build and audit the table, round up to a menu price, and set the target from rent, wages and wanted profit, not a rule of thumb.

Coffee shop pricing is mostly arithmetic, and AI is good at arithmetic, formulas and what-if tests. It is poor at everything only you can measure: your invoices, your pump sizes, your regulars' tolerance for a price rise. So the owner supplies measured inputs and the assistant builds and audits the table. What no sum can predict is how customers react, so a price change should be tested before it is rolled out.

Follow me on Instagram@sagnikteaches

Unit costs: turn invoice lines into cost per gram and millilitre

Everything starts with what you actually pay. Take the invoice lines for the main ingredients and convert each into a cost per gram or per millilitre. A prompt can do it, as long as it is told to ask when a pack size is unclear, instead of guessing.

Connect on LinkedInSagnik Bhattacharya
Convert these supplier invoice lines into a cost per gram or per millilitre. Show the arithmetic.
If a pack size or unit is unclear, ask me instead of assuming.
- Coffee beans, house blend, 1 kg bag, $20.00
- Whole milk, crate of 6 x 2 L, $14.40
- Oat milk, case of 12 x 1 L, $26.40
- Vanilla syrup, 750 ml bottle, $9.00
Also list what I need to measure myself.
Illustrative output
Beans: $20.00 / 1,000 g = $0.020 per g
Whole milk: crate = 12 L; $14.40 / 12,000 ml = $0.0012 per ml
Oat milk: case = 12 L; $26.40 / 12,000 ml = $0.0022 per ml
Vanilla syrup: $9.00 / 750 ml = $0.012 per ml
Measure yourself: ml delivered per pump (cost per pump = 0.012 x your figure),
grams per shot as weighed, milk lost per jug, cup and lid weights or prices.

The last line is the useful one. An assistant will happily assume that a pump delivers 10 ml, and pump sizes vary by brand and model. This example uses 10 ml, which makes a pump cost 12 cents; weigh a few pumps of your own syrup before you rely on it. The same discipline applies to the milk crate. A supplier's "crate" can hold different volumes, and a wrong pack size shifts every milk-based drink on the menu. If your invoices are creeping up, catching supplier price creep on hospitality invoices shows how to spot it, and starting a coffee shop's AI use with supplier prices covers the wider habit.

Subscribe on YouTube@sagnikteaches

Recipe cards for five drinks

The five drinks below cover the cost patterns most menus contain: a milk-free shot, a small milk drink, a large milk drink, a flavoured hot drink and a flavoured cold drink. Weigh and measure your own versions; the quantities here are examples. Packaging is the cup, lid and sleeve for each size, valued at what your supplier charges.

DrinkBeansWhole milkSyrupCup set
Double espresso18 gnonenoneespresso cup and lid, $0.12
Flat white18 g150 mlnonesmall, about 240 ml, $0.25
Latte18 g250 mlnonemedium, about 350 ml, $0.30
Vanilla latte18 g250 ml2 pumpsmedium, $0.30
Iced vanilla latte18 g200 ml3 pumps, plus ice at $0.04cold cup, about 480 ml, $0.30

Add a waste allowance to the ingredients, not the packaging: milk left in the jug, a shot pulled and tipped away, a remake. Five percent, rounded up to the next cent, is the example here. It is a guess until you have a waste log, and the restaurant recipe costing spreadsheet is a good model if you want a fuller template with yield and trim columns.

Cost per cup, component by component

Hand the assistant the unit costs, the recipe table and the waste rule, and ask for formulas as well as results.

Build a cost-per-cup table for five drinks. Columns: beans, milk, syrup, ice, waste, packaging, total.
Unit costs: beans $0.020/g; whole milk $0.0012/ml; syrup $0.012/ml, 10 ml per pump; ice $0.04 per cold cup.
Waste = 5% of ingredient cost (not packaging), rounded up to the next cent.
Recipes and packaging: [paste the recipe table].
Give the Google Sheets formula for each column, assuming unit costs sit on a tab called Costs.
List any input you had to assume.
Illustrative output (contains a slip)
Drink                 Beans  Milk  Syrup  Ice   Waste  Pack  Total
Double espresso       0.36   0.00  0.00   0.00  0.02   0.12  0.50
Flat white            0.36   0.18  0.00   0.00  0.03   0.25  0.82
Latte                 0.36   0.30  0.00   0.00  0.04   0.30  1.00
Vanilla latte         0.36   0.30  0.24   0.00  0.05   0.30  1.25
Iced vanilla latte    0.36   0.24  0.24   0.04  0.05   0.30  1.23

Check the last row against the recipe card. The iced vanilla latte has three pumps, which cost 36 cents, but the table shows 24 cents, the two-pump figure from the hot vanilla latte. The correct total is 1.35, not 1.23, and the slip makes the drink look 12 cents better than it is. This is the typical fingerprint of an assistant copying a neighbouring row. Recompute one row of every new table by hand, and always the one with the most unusual recipe. Here is the corrected version, with the packaging share added:

DrinkBeansMilkSyrupIceWastePackagingCost per cup
Double espresso0.360.000.000.000.020.120.50
Flat white0.360.180.000.000.030.250.82
Latte0.360.300.000.000.040.301.00
Vanilla latte0.360.300.240.000.050.301.25
Iced vanilla latte0.360.240.360.040.050.301.35

Two things stand out. Beans cost the same 36 cents in every drink, which is why espresso, with no milk to dilute it, carries the cheapest total but the highest share of beans. And packaging is 30% of both the flat white's and the latte's cost, close to half as much as the beans and milk combined. A cup and lid are easy to overlook, so the cup quote is worth a second look.

Pick the margin target from your overheads, not a rule of thumb

One shortcut you will hear is to multiply cost by three. It sounds tidy, but it fixes the margin at 66.7% whatever the drink: a $1.00 cost becomes a $3.00 price, and 2 divided by 3 is 66.7%. A margin of 76% needs a multiplier of 4.17 (one divided by 0.24), which puts the same $1.00 drink at $4.17. Markup and margin are different measures of the same price, so decide which one you are using before you quote a number to anyone.

The target that matters is the one that pays your overheads. Add up what the shop must cover each month from gross profit, then divide by the sales you expect:

Monthly itemUSD
Rent and utilities6,400
Labour, including your own pay17,900
Card fees1,900
Insurance, software, repairs and other costs2,300
Profit you want to keep3,600
Total to cover from gross profit32,100
Expected monthly sales42,000
Required margin on ingredients and packaging76.4%

That 76.4% becomes a working target of 76%. Notice how sensitive it is to sales. At $36,000 of monthly sales the same overheads need an 89.2% margin, which this menu cannot reach, and at $48,000 they need 66.9%. The prices that look generous in a busy month do not pay the bills in a quiet one, so ask the assistant for the required margin at three sales levels before you set the target, and use the middle one.

Floor prices and where today's menu sits

A floor price is the cost divided by one minus the target margin, here cost divided by 0.24. It is the lowest price that meets the target, not the price to charge. Compare it with what the menu says now:

DrinkCost per cupFloor price at 76%Price todayMargin today
Double espresso0.502.083.0083.3%
Flat white0.823.424.2080.5%
Latte1.004.174.6078.3%
Vanilla latte1.255.215.1075.5%
Iced vanilla latte1.355.635.4075.0%

Three drinks sit comfortably above their floors, so the market, not the maths, decides their prices. Two sit below: the flavoured drinks. Weight the margins by a sales mix of 14% espresso, 28% flat white, 22% latte, 16% vanilla latte and 20% iced vanilla latte, and the blended margin is 78.0% on an average price of $4.50, which clears the target. That is the trap of a blended figure. The shop passes while two of its five drinks are quietly below target, and the iced vanilla latte is a fifth of sales. Always check drink by drink as well as in total.

Price-point rounding: from a $5.21 floor to a price on the board

The vanilla latte's floor is $5.21, and nobody prints that on a menu. Rounding is a real decision, because each choice changes both the margin and how much sales loss the rise can absorb. That second number is a break-even: the share of units you can lose before gross profit per week falls below today's. It is one minus the old profit per cup divided by the new profit per cup. Today the vanilla latte earns $3.85 a cup ($5.10 less $1.25).

Price on the boardMarginChange from $5.10Sales loss it can absorb
$5.2576.2%+15 cents3.8%
$5.3076.4%+20 cents4.9%
$5.5077.3%+40 cents9.4%

All three clear the target. The cheapest rise, $5.25, only just does, and it can absorb a loss of under 4% of cups before the shop earns less from the drink than it does now. The $5.50 option has more cushion but is the biggest step for the customer. There is no formula that picks between them, and this is where your knowledge of your regulars beats an assistant's. A few rules help the decision:

  • Never round down on a drink that is already below target; round up to the nearest price you can hold.
  • Keep the steps up the ladder consistent. If flavour adds 65 cents on a latte ($4.60 to $5.25), make it add the same on every flavoured milk drink, so the board looks logical.
  • Use as few different price endings as you can. A menu that mixes .20, .25 and .30 looks accidental.
  • Recheck the margin after rounding, drink by drink. The formula price is a starting point.

Two ways to rescue an under-target drink: price or recipe

The iced vanilla latte earns 75.0% against a 76% target, and its floor is $5.63. There are two ways out, and the maths shows both. Raise the price: $5.60 gives 75.9%, which still falls short, while $5.70 gives 76.3% and $5.80 gives 76.7%. Or change the recipe: two pumps of syrup instead of three bring the cost down to $1.23 and lift the margin to 77.2% at the current $5.40 price, with no price rise at all.

Which is better depends on taste and customers, not arithmetic. Two pumps in a 480 ml iced drink may taste thin. Try it on a few regulars, or run the cheaper recipe for a week and watch the repeat orders. If the drink is a favourite, a 30-cent rise may go unnoticed. The assistant's job is to lay out both options side by side so the choice is deliberate. Before any price rise goes on the board, test it on one drink first; testing a menu price increase dish by dish shows how to read the results.

Oat milk: set the surcharge from the cost, then test it

Oat milk costs $2.20 a litre against $1.20 for whole milk. On a 250 ml latte that is 25 cents more, or 26 cents once the waste allowance is added. The oat latte therefore costs $1.26 and at the standard price of $4.60 it earns 72.6%, below target. A surcharge has to cover the extra cost and bring the margin back to target.

Oat surchargeOat latte priceMargin
30 cents$4.9074.2%
50 cents$5.1075.3%
60 cents$5.2075.8%
70 cents$5.3076.2%

The surcharge that holds the 76% target exactly is 65 cents, which puts an oat latte at $5.25, level with the vanilla latte; 70 cents leaves a little room for the next rise in oat milk prices. A 50-cent surcharge feels standard but earns nearly a point less than the target on every oat latte. If oat is a quarter of milk drinks, that gap adds up, and it is worth knowing before you decide to match a nearby shop's surcharge.

Size steps: charge for the extra milk and cup, then add margin

A larger size is the cheapest extra margin on the board, because the extra cost is only milk and a bigger cup. A large latte with 350 ml of milk and the same 18 g shot costs $1.18 against $1.00 for the medium: 100 ml more milk, which is 12 cents, plus a cup set that costs 6 cents more. At a 76% margin its floor price is $4.92, so any step of 32 cents or more over the medium's $4.60 meets the target.

Large latte priceStep over the mediumMargin
$4.9030 cents75.9%
$5.0040 cents76.4%
$5.1050 cents76.9%
$5.2060 cents77.3%

A 60-cent step earns 42 cents of margin on 18 cents of extra cost, which is why the size ladder deserves a deliberate price decision, not an afterthought. To keep the ladder consistent, ask the assistant for the minimum step each drink needs and choose one step that satisfies the largest minimum, instead of pricing every size by hand.

Milk up 10%, beans up 10%, a 20-cent rise: three quick tests

Once the sheet exists, what-if questions take minutes. Raise one unit cost, let the formulas run and read the margins:

DrinkMargin nowWhole milk +10%Beans +10%
Double espresso83.3%83.3%82.0%
Flat white80.5%80.0%79.5%
Latte78.3%77.6%77.4%
Vanilla latte75.5%74.9%74.7%
Iced vanilla latte75.0%74.4%74.1%

A 10% rise in milk adds 2 to 3 cents a drink, and a 10% rise in beans adds 4 cents. Neither moves any drink's margin by more than 1.3 points, which is useful perspective when a supplier announces an increase: the headline percentage is large, the effect on a cup is small, and the drinks that were already under target are the ones that slip further. The third test is a price rise. Taking the flat white from $4.20 to $4.40 lifts its profit per cup from $3.38 to $3.58, so unit sales can fall by 5.6% before the shop earns less from it than today.

Card fees ride on top of all this. Square's pricing page lists in-person card payments on its free plan at 2.6% plus 15 cents, and other providers will quote their own rates. At those rates the fee is 23 cents on a $3.00 espresso (7.6% of the price) and 29 cents on the $5.40 iced drink (5.4%). The fixed 15 cents is why the cheapest drinks bear the highest fee percentage, and why the overheads table above carries card fees as a monthly line instead of burying them in each cup.

Recipe drift: what a heavy hand does to the sheet

The sheet assumes the recipe on the card is what goes in the cup. A barista who pours 300 ml into a latte instead of 250 adds 6 cents of milk; the drink costs $1.06 and its margin falls from 78.3% to 77.0%. At 60 lattes a day over 30 days, that is $108 a month. A third pump of syrup on the vanilla latte adds 13 cents with waste, taking it from 75.5% to 72.9%. At 40 a day that costs $156 a month, which gives back most of what a 15-cent price rise on the same drink would earn ($180 a month).

Drift is invisible on any single drink and obvious in the monthly totals. The remedy is dull and effective: recipe cards at the machine, marked jugs and cups, a pump-count rule for each flavoured drink, and a quarterly check where you weigh ten drinks chosen at random.

Reconcile the sheet with a real month's cost of goods

Once a month, compare what the sheet predicts with what the invoices say you used. Predicted cost is units sold of each drink times its cost per cup. Actual cost is opening stock plus purchases minus closing stock for each category, which the stock routine in ordering milk, beans and pastries gives you almost for free. With $42,000 of sales and 9,325 drinks, the sheet predicts $9,228 of cost, 22.0% of sales.

CategoryPredicted from the sheetActual, stock-adjusted invoicesGap
Coffee3,5443,590+46 (1.3%)
Milk2,0912,540+449 (21.5%)
Syrup and ice1,1611,310+149 (12.8%)
Packaging2,4322,470+38 (1.6%)
Total9,228 (22.0% of sales)9,910 (23.6%)+682 (7.4%)

The gap is $682 a month, nearly four times what the 15-cent price rise earns. Coffee and packaging sit within 2% of the sheet, so the recipes and quotes are sound. Milk and syrup are 21.5% and 12.8% over, which points at heavy pours and extra pumps, spoilage, staff drinks and drinks made but not rung through the till. The heavy-pour latte above explains only $108 of the milk gap, so the rest needs a look at the waste log and a week of watching.

Here is the sheet's predicted cost by category and the month's actual cost from stock-adjusted
invoices. Rank the gaps by size, suggest the three most likely causes for each large one given a
coffee shop with five drinks, and tell me what I should measure next week to separate them.
[paste the table]

Checking the assistant's table before it reaches the menu board

Ask a second prompt to attack the table, as a different tool or in a fresh chat so it is not defending its own work. Tell it to report differences, not to fix them.

Act as a sceptical accountant. Using only the unit costs and recipes I give you, recompute the
cost of every drink from scratch and list any cell in my table that differs by more than one cent.
Then raise each of these in turn and tell me which drinks fall below a 76% margin at today's prices:
pump size +20%, waste allowance 6%, cup and lid costs +20%. Do not change my table; report only.
[paste the unit costs, recipes and table]
Illustrative output
Differences: none.
Pump 12 ml: vanilla latte 1.30 (74.5%), iced vanilla latte 1.43 (73.5%). Others unchanged.
Waste 6%: every cost rises by at most 1 cent; no drink changes status.
Cups +20%: espresso 0.52, flat white 0.87, latte 1.06 (77.0%), vanilla latte 1.31 (74.3%), iced 1.41 (73.9%).
Below 76% in every scenario: vanilla latte, iced vanilla latte. No other drink falls below 76%.

The output tells you where the sheet is fragile. The pump size matters most because three pumps go into the iced drink, so weigh it before you commit to a price. Then do three hand checks on anything the assistant gives you: recompute one row, change one input and see whether the outputs move in the expected direction, and look at the total for the drink with the most unusual recipe. Repeat the whole exercise when a supplier price, cup size, recipe or milk type changes, and at least once a quarter. The sales mix this sheet depends on comes from the same till data that feeds your orders, so keep the two routines on one export.

Questions about pricing coffee drinks

What margin should a coffee shop aim for?

There is no universal figure. Work back from your own costs: add up rent, labour, card fees, other overheads and the profit you want, then divide by expected monthly sales. In the worked example that came to about 76% on ingredients and packaging, but yours depends on your costs and sales. Recalculate whenever rent, wages or volumes change.

Should I price from margin or markup?

Pick one and use it everywhere. Margin is profit as a share of the price, markup is profit as a share of cost. A cost of $1.00 with a 76% margin means a price of $4.17, while a triple-the-cost rule gives $3.00 and only a 67% margin. Margin links directly to overheads, which makes it easier to plan with.

Can AI tell me what competitors charge?

Not reliably. It cannot see nearby menus or what your customers will accept. Look at other menus yourself, treat the maths as a floor and a what-if tool, and test any increase on one drink or one time of day before changing the whole board.

How often should I re-cost the menu?

Whenever a supplier price, cup size, recipe or milk type changes, and at least quarterly. Keep unit costs on one tab so a change means editing one cell, and ask the assistant after each update to list any drink that has fallen below its floor price.

Is it worth charging more for oat milk?

Work out the extra cost first: the price difference per litre times the millilitres used, plus waste. Then check the margin with the surcharge included against your target. In the example the extra cost is about 26 cents and a 70-cent surcharge keeps a latte on target, while 50 cents falls a little short.

Further reads

Sources: all prices, recipes and overheads are illustrative examples; the formulas (cost divided by one minus margin, and break-even volume change after a price rise) are standard. Check your own supplier invoices and pump sizes.

Want your menu costed from real invoices?

On a 1:1 call we can take your supplier invoices and recipes, build the cost-per-cup sheet with AI doing the arithmetic, and decide which drinks to re-price first and how to test the change.

Book a 1:1 call with me