COGS, Margin & Pricing · 16 October 2026 · 5 min read · Updated 9 Nov 2026
How to Calculate Unit Cost and Set Your Selling Price
Working out the cost of one unit or one serving — labour and direct overhead included — then setting the price from the margin you want.

Pricing by "see what competitors charge and go a thousand lower" is the fastest route to working hard with no profit. Your price should start from unit cost: what one unit actually costs you.
1. What belongs in unit cost and what usually gets left out
Unit cost is not only materials. It has three layers:
- Direct materials — what physically goes into the product.
- Direct labour — the people who make that product. Divide the monthly wage by the number of units produced.
- Other direct costs — packaging, machine power, gas, water, delivery per order.
What does not belong here: rent, internet, admin salaries, advertising. Those are operating costs, used in the calculation further down, not in the cost of one unit.
2. Worked example: one cup of milk coffee
| Component | Calculation | Rp per cup |
|---|---|---|
| Coffee, 18 grams | 18/1,000 × Rp180,000 per kg | 3,240 |
| Milk, 150 ml | 150/1,000 × Rp22,000 per litre | 3,300 |
| Cup, lid, napkin | per unit | 1,100 |
| Sugar and straw | per unit | 250 |
| Total materials | 7,890 | |
| Direct labour | Rp2,500,000 ÷ 1,200 cups a month | 2,083 |
| Other direct costs | Rp180,000 ÷ 1,200 cups (machine power, water) | 150 |
| Unit cost per cup | 10,123 |
Notice: leave labour out and the cost looks like only Rp7,890 — about 22% cheaper than reality. Prices built on that figure make you feel profitable when you are not.
3. Setting the selling price
Two approaches work well together:
a. From a markup
If you want a gross profit near 60%, the markup is about 2.5 times cost: Rp10,123 × 2.5 = Rp25,308, rounded to Rp25,500.
b. From the margin you want (more precise)
The formula is: price = unit cost ÷ (1 − margin you want).
Target margin 60%: Rp10,123 ÷ 0.4 = Rp25,308, rounded to Rp25,500.
At a price of Rp25,500:
- Gross margin = (25,500 − 10,123) ÷ 25,500 = 60.3%
- Materials alone = 7,890 ÷ 25,500 = 30.9% of the selling price — for food and beverage businesses that sits inside the range commonly regarded as healthy (usually kept around 30–35%). Once it passes 40%, check your portions and purchase prices.
- Contribution per cup towards fixed costs = Rp15,377
4. How many cups do you need to sell?
Say fixed costs are Rp12,000,000 a month (rent, fixed wages, internet, shop utilities).
Break-even = Rp12,000,000 ÷ Rp15,377 = 781 cups a month, about 26 cups a day (over 30 days).
That figure is far more useful than hoping it gets busy: you know when you start making money, and you know how much you need to lift if last month sold only 700 cups.
8. Four common mistakes
- Calculating unit cost from materials only.
- Not updating material prices. Coffee, cooking oil and flour move; unit cost built on last year's prices makes the margin look better than it is.
- Discounting without knowing your unit cost. A 20% discount on Rp25,500 brings the price to Rp20,400, leaving Rp10,277 — still above cost, but barely anything towards fixed costs.
- Using one average cost for every product. Each item has its own unit cost; never price a single item from an average.
9. Update it every quarter
Keep the ingredients, latest prices and portion sizes in one sheet. Repeat the exercise every quarter or whenever a key ingredient moves. Ten minutes a quarter is far cheaper than a year of selling at the wrong price.
10. A second example: a product made in batches
Products made in batches need one extra step: divide the cost of one batch by the number of units that actually come out saleable. One batch of butter cookies:
| Item | Calculation | Rp per cookie |
|---|---|---|
| Ingredients | Rp85,000 per batch ÷ 40 cookies | 2,125 |
| Direct labour | 2 hours × Rp15,000 ÷ 40 | 750 |
| Packaging | per cookie | 1,200 |
| Oven electricity | Rp5,000 per batch ÷ 40 | 125 |
| Cost per cookie | 4,200 |
At a 55% target margin: Rp4,200 ÷ 0.45 = Rp9,333, rounded to Rp9,500 per cookie (a 55.8% margin).
Two things are easy to get wrong: packaging is counted per cookie, not per batch; and the divisor is the number of saleable units. If 4 of the 40 break, the batch still costs Rp168,000 but only 36 units carry it — cost per cookie rises to Rp4,667, and the Rp9,500 price leaves a thinner margin than you planned.
11. When ingredient prices rise 20%
Coffee and milk prices do not sit still. On the coffee example, a 20% rise across all ingredients lifts unit cost from Rp10,123 to Rp11,701 (ingredients Rp9,468 + labour Rp2,083 + other direct costs Rp150).
At an unchanged price of Rp25,500 the margin falls from 60.3% to 54.1% — about six points lost without a single decision on your part. To restore 60%, the price has to rise to Rp11,701 ÷ 0.4 = Rp29,252, rounded to Rp29,500.
That is why ingredient prices are refreshed every quarter, and the selling price is reviewed whenever a main ingredient moves by more than 10%.
12. Raising the price 10%: how many customers can you lose?
A price rise always feels risky. This calculation makes the risk measurable. At Rp25,500 each cup leaves Rp15,377 towards fixed costs and break-even is 781 cups. At Rp28,050 (10% higher) each cup leaves Rp17,927 and break-even drops to 669 cups — 112 cups fewer, about 14%.
In other words: a 10% price rise still pays as long as sales fall by less than 14%. If you expect to lose fewer customers than that, the new price is worth testing — provided ingredient costs do not rise in the same month.
13. If you want to move faster
Our Pricing & Margin Calculator contains all of these formulas: enter your costs and portions and it returns the recommended price and break-even point.
Read next
- Gross Profit vs Net Profit for a Small Shop: Counting from Purchase Price, Shrinkage, and Daily Costs
- How to Build Small Business Financial Statements Without an Accountant
- How to Record Daily Sales So the Data Is Actually Useful
The kit for this topic
Pricing & Margin Calculator
Rp79.000 (≈ USD 4)
Work out unit cost, set your margin, and find the break-even price before you quote.
