"We charge this much because that's what competitors charge." Business owners say it all the time, and it's often why a business is busy but barely profitable.
A healthy price starts with one number: cost of goods sold (COGS). This article explains how to calculate it and then use it to set your selling price.
What is cost of goods sold?
COGS is the total cost directly tied to the products you sell. For a business that makes things (food, clothing, crafts), it usually includes:
- Materials: flour, fabric, wood and other main ingredients.
- Packaging: boxes, bags, labels, stickers.
- Direct labour: wages of the people who make the product.
- Other production costs (overhead): gas, electricity used in production, equipment depreciation.
Costs that aren't directly part of production, such as office rent, admin wages and advertising, are not COGS. They're operating expenses in your profit and loss statement.
How to calculate COGS per product
The easiest way is to work out the cost of one batch and divide it by the number of products it makes. Here's a tray of brownies cut into 20 pieces:
| Component | Per tray | Per piece |
|---|---|---|
| Materials | Rp 120,000 | Rp 6,000 |
| Packaging | Rp 30,000 | Rp 1,500 |
| Direct labour | Rp 50,000 | Rp 2,500 |
| Production gas & electricity | Rp 20,000 | Rp 1,000 |
| COGS | Rp 220,000 | Rp 11,000 |
These figures are an illustrative example for learning, not client data.
How to calculate COGS for a retail business
For a shop or reseller that buys goods and sells them on, COGS is calculated per period:
COGS = opening inventory + purchases − closing inventory
| Item | Amount |
|---|---|
| Opening inventory (1 October) | Rp 15,000,000 |
| Purchases during October | + Rp 40,000,000 |
| Closing inventory (31 October) | − Rp 18,000,000 |
| COGS for October | Rp 37,000,000 |
Closing inventory comes from a stock count, which means physically counting what's left at month-end. Without one, COGS is only an estimate, and losses from damaged or missing stock never show up.
Setting your price from a target margin
Once you know your COGS, decide what share of the selling price you want to keep as gross profit (your margin). The formula:
Selling price = COGS ÷ (1 − target margin)
With a brownie COGS of Rp 11,000 and a 50% target margin:
Selling price = Rp 11,000 ÷ (1 − 0.5) = Rp 22,000 per piece.
That Rp 11,000 of gross profit is what pays the rent, admin wages and marketing, with a net profit left over.
Markup vs margin (a common trap)
Many owners "add 50%" to cost and assume their margin is 50%. In fact:
| Approach | Calculation | Price | Actual margin |
|---|---|---|---|
| 50% markup | Rp 11,000 + 50% of cost | Rp 16,500 | about 33% |
| 50% target margin | Rp 11,000 ÷ (1 − 0.5) | Rp 22,000 | 50% |
Markup is based on cost; margin is based on the selling price. The gap is big, and it's often why a business feels very profitable when it isn't.
Accounting for platform fees and discounts
If you sell through a marketplace or delivery app, a commission comes out of the selling price. Say the commission is 20% (check your platform's actual terms), and you still want a 50% margin on what you receive:
- Amount you need to receive = Rp 11,000 ÷ (1 − 0.5) = Rp 22,000.
- Price on the platform = Rp 22,000 ÷ (1 − 0.2) = Rp 27,500.
The same goes for regular discounts and free-delivery promos you pay for: build them into the calculation instead of hoping they'll cover themselves.
When should you recalculate COGS?
- When material prices rise or fall noticeably.
- When you change supplier or packaging.
- When you add production staff.
- At least every three months, as a habit.
The takeaway: calculate COGS per product (or per period for retail), price from a target margin (not a markup), then include commissions and discounts. If you'd like to work through costing and pricing for your own business, join one of our MSME finance classes.
Frequently asked questions
- What is cost of goods sold (COGS)?
- Cost of goods sold is the total cost directly tied to the products you sold, such as materials, packaging, direct labour and other production costs. It's used to set selling prices and to calculate gross profit.
- What is the COGS formula for a retail business?
- For a business that buys and resells goods, COGS for a period = opening inventory + purchases − closing inventory. Closing inventory comes from a physical stock count at the end of the period.
- What is the difference between markup and margin?
- Markup is calculated on cost, while margin is calculated on the selling price. A product that costs Rp 10,000 and sells for Rp 15,000 has a 50% markup but only about a 33% margin. Use margin when you set profit targets.