There is no single product cost formula, which is why searching for one is confusing. There are four, they answer different questions, and using the wrong one is how a business ends up confident about a number that is not the number it needed. Here they are, each worked through on the same example so you can see how they connect.
The short version
= direct materials + direct labour + manufacturing overhead
2. Cost per unit
= total manufacturing cost ÷ units produced
3. Cost of goods sold
= opening finished goods + cost of goods manufactured - closing finished goods
4. Margin and markup
margin % = (price - cost) ÷ price
markup % = (price - cost) ÷ cost
If you only need one, it is almost certainly number 2. The rest of this page is what each one means and where they go wrong.
The example we will use throughout
A candle workshop, one month of March. It produced 1,200 candles and its books for the month look like this:
| Line | March |
|---|---|
| Direct materials used | €7,500 |
| Direct labour (130 hours at €18) | €2,340 |
| Manufacturing overhead (rent share, power, equipment) | €1,560 |
| Finished candles in stock, 1 March | €3,000 |
| Finished candles in stock, 31 March | €4,200 |
| Units produced | 1,200 |
| Sale price per candle | €24.00 |
Formula 1: total manufacturing cost
This is what it cost to make everything you made in the period. Three inputs, no more.
= €7,500 + €2,340 + €1,560
= €11,400
Direct materials are the ones that physically end up in the product and can be traced to a unit. Getting this line right is a subject of its own, covered in how to calculate direct materials cost.
Direct labour is the time spent actually making the product, at a real hourly cost including employer contributions. Time spent on admin, selling or packing orders is not direct labour.
Manufacturing overhead is everything else that production consumes but that cannot be traced per unit: workshop rent, power, equipment depreciation, cleaning materials, the thermometer. Note the word manufacturing - your accountant's fee and your website hosting are business costs, not manufacturing overhead, and folding them in here will overstate what your products cost to make.
People also search for this as manufacturing cost calculation or cost of production. Same formula, different name.
Formula 2: cost per unit
The one you actually price against.
= €11,400 ÷ 1,200
= €9.50 per candle
There is a trap in this formula, and it is a big one: the answer changes with volume even when nothing about the product changes. Overhead is largely fixed, so spreading it over 600 candles instead of 1,200 gives a very different figure:
| Units produced in the month | 600 | 1,200 | 2,400 |
|---|---|---|---|
| Materials and labour (vary with volume) | €4,920 | €9,840 | €19,680 |
| Overhead (fixed) | €1,560 | €1,560 | €1,560 |
| Cost per unit | €10.80 | €9.50 | €8.85 |
This is why a quiet month makes your products look unprofitable and a busy one makes them look brilliant, without anything actually changing on the shop floor. If you price off a single month, price off a typical one, and recheck when your volumes shift for real.
Formula 3: cost of goods sold
Cost per unit tells you what you made things for. Cost of goods sold tells you what the things you actually sold cost - and those are different numbers whenever your finished stock goes up or down.
= €3,000 + €11,400 - €4,200
= €10,200
The workshop made €11,400 of candles but only sold €10,200 worth. The other €1,200 is sitting on a shelf as stock, and it is not an expense until it sells. Businesses that skip this formula and treat everything they spent as this month's cost will show a loss in every month they build up stock, and a suspiciously good month whenever they run stock down.
Cost of goods manufactured and total manufacturing cost are the same figure here. They differ only if you have work in progress at the start or end of the period, in which case cost of goods manufactured = total manufacturing cost + opening work in progress - closing work in progress. For a workshop where batches start and finish inside the same period, that adjustment is zero and you can ignore it.
Formula 4: margin and markup are not the same
This confusion costs small manufacturers real money, so it is worth being precise. Both compare price and cost. They divide by different things.
markup % = (price - cost) ÷ cost = (24.00 - 9.50) ÷ 9.50 = 152.6%
Same candle, same price, same cost. If someone tells you to work on a 50% margin and you apply a 50% markup instead, you will price at €14.25 rather than €19.00 and wonder later where the money went.
To go the other way, from a target margin to a price:
€9.50 ÷ (1 - 0.60) = €23.75
Which formula do you actually need?
| Your question | Formula |
|---|---|
| What should I charge for this? | 2, then 4 |
| Is this product worth making at all? | 2, then 4 |
| What did production cost us last month? | 1 |
| What goes in the accounts as cost of sales? | 3 |
| Why did our margin drop without prices changing? | 1, then check materials |
Three ways these formulas quietly break
Stale input prices
Every formula above is only as good as the material cost feeding it. If that figure was typed into a spreadsheet a year ago, all four answers are wrong by the same amount and none of them will tell you so.
Overhead in the wrong bucket
Sales commission, delivery, packaging for shipping and your accountant are not manufacturing overhead. Putting them in formula 1 makes your products look more expensive to make than they are, which can talk you out of products that are fine.
Forgetting that waste is a cost
Material that went in the bin still left the shelf. If you only count material that made it into a saleable unit, your cost per unit is optimistic by exactly your waste rate.
How Masto Control handles this
Masto Control calculates the material side of these formulas for you and keeps it current: every purchase is its own batch at the price you actually paid, production consumes the oldest batch first, and the per-unit material figure comes from the bill of materials rather than a stored estimate. Formula 3 is available as a report - cost of goods sold for a period, alongside revenue and margin per product, exportable to Excel.
Direct labour in formula 1 has its own place: you set an hourly rate for a role or an operation, put the minutes a unit takes on the product card, and the cost is multiplied out and carried through with the materials. Manufacturing overhead goes in as your own expense type, a fixed amount per unit or a percentage.
What it does not do: nothing times the work, so the minutes are your estimate rather than a measurement, and there is no per-worker time log. Nor is there a work-in-progress stage - a production run is planned, then completed, and materials are consumed at completion.