Skip to content

Cost of Goods Manufactured Formula, With a Worked Example

The cost of goods manufactured formula: materials used, labor, overhead, work in process, then cost of goods sold, worked for a cheese maker, a calculator.

By Koa Sterling. Product specialist at TaroStack and small business owner. Yes, I am a real human, and I actually sit in front of a computer and write these articles. Reviewed October 17, 2026 · 5 min read

The cost of goods manufactured (COGM) is what it cost to make the products you finished in a period. The formula: work in process at the start + total manufacturing cost − work in process at the end. Total manufacturing cost is raw materials used + direct labor + manufacturing overhead, and raw materials used is raw materials at the start + purchases − raw materials at the end. Then cost of goods sold follows from it: finished goods at the start + COGM − finished goods at the end. The piece small makers skip is work in process, product that's started but not ready to sell: cheese aging in a cave, sauerkraut fermenting, meat curing. When that pile grows, as it does before the holidays, money spent this quarter sits in the cave instead of in cost of goods sold, and leaving it out makes the quarter look worse than it was. In the example below, a cheese maker works out a quarter with its tomme wheels aging. Below are the formulas, the example, and a free calculator.

The short version

  • Raw materials used = materials at the start + purchases − materials at the end.
  • Total manufacturing cost = materials used + direct labor + overhead.
  • COGM = work in process at the start + total manufacturing cost − work in process at the end.
  • Cost of goods sold = finished goods at the start + COGM − finished goods at the end.
  • Work in process is started but not ready to sell: aging, fermenting, curing.
  • Value work in process and finished goods at cost, not at price.
  • TaroStack values stock by site and month, aging lots included. More below.

The formulas

Line Formula
Raw materials used Raw materials at the start + purchases − raw materials at the end
Total manufacturing cost Raw materials used + direct labor + manufacturing overhead
Cost of goods manufactured Work in process at the start + total manufacturing cost − work in process at the end
Cost of goods sold Finished goods at the start + cost of goods manufactured − finished goods at the end
Cost a unit Cost of goods manufactured ÷ units finished

Direct labor is the time spent making the product, at what it costs you; overhead is the rest of the making: the make room's share of rent, power for the cave, cleaning supplies, wear on equipment. How overhead spreads across units is in overhead cost per unit, and the simpler version for makers without much work in process in ending inventory formula.

An example: a cheese maker's quarter

Housatonic Creamery, the made-up cheese maker in Great Barrington, Massachusetts, I use in these examples, makes fresh chèvre and an aged tomme that spends three months in the cave. Its third quarter:

Line Amount
Raw materials at the start $1,200
Purchases $14,800
Raw materials at the end $1,000
Raw materials used $15,000
Direct labor $9,600
Manufacturing overhead $4,200
Total manufacturing cost $28,800
Work in process at the start, wheels in the cave $6,400
Work in process at the end, wheels in the cave $8,600
Cost of goods manufactured $26,600
Finished goods at the start $2,100
Finished goods at the end $2,500
Cost of goods sold $26,200

The cave held $2,200 more in wheels at the end of September than at the start of July, built up for December. Without counting work in process, the quarter's cost of goods would read $28,400 instead of $26,200, and the margin would look $2,200 thinner than it was. The 2,380 pounds finished cost $11.18 a pound to make, close to the $11.07 a pound the creamery plans for its tomme. What the cheeses earn is in cheese making business plan.

Get the calculator

Download the cost of goods manufactured calculator. One sheet: type raw materials at the start and end, purchases, direct labor, overhead, work in process at the start and end, finished goods at the start and end, and pounds finished; raw materials used, total manufacturing cost, the cost of goods manufactured, the cost of goods sold and the cost a pound fill in. It's an ordinary Excel file with no macros, and it works in Google Sheets, LibreOffice and Numbers.

Where this stops working

The formula needs three counts at each end of the quarter, and the hardest one is the cave: forty wheels at different ages, each made from a different day's milk at a different cost.

How TaroStack does it

TaroStack keeps the wheels in the cave as stock at what they cost, so work in process is a number you can read, not count.

Batches carry their cost. Each make is a batch that takes its milk, cultures and salt off stock at what they cost, and can carry its labor minutes and an added cost, such as labor, into the cost of what it makes.

Aging wheels as their own item. A sub-recipe makes the young wheel, which sits in stock as its own item and lot while it ages, then becomes the finished tomme, so the cave is valued at cost.

Stock value by month. Stock is valued by site and by month, first-in-first-out or moving average, so the start and end figures for raw materials, aging wheels and finished cheese are there for the quarter.

The job Spreadsheet In TaroStack
Value of wheels in the cave Count and guess Stock of the aging item, at cost
Raw materials at quarter end A count sheet Stock value by month
Labor in a make Not recorded Labor minutes and added cost on the batch
Cost a pound Worked out once a year From each batch

Recipes, batches, costing and stock value are on every plan, from $49 a month. The first 30 days are free, with no credit card. If you'd like a hand setting up, ask, and we'll do it with you.

Questions people also ask

What is the formula for cost of goods manufactured?

Work in process at the start, plus raw materials used, direct labor and overhead, minus work in process at the end.

What is the difference between cost of goods manufactured and cost of goods sold?

COGM is the cost of what you finished making in the period; cost of goods sold is the cost of what you sold, after finished goods at the start and end.

What counts as work in process?

Product started but not ready to sell, such as cheese aging, kraut fermenting or meat curing, valued at what's gone into it so far.

Do small food makers need to calculate COGM?

If a lot of product sits half-made at the end of a period, yes; otherwise cost of goods sold from purchases and counts is close enough.

We use AI to help with the research for these articles. Every one is read, checked against its sources and edited by Koa before it's published. Spot a mistake? Tell us and we'll fix it and say so. How we write these.

Let’s get your stack in order.

Get TaroStack

Sign up now for your free 30 day trial. No credit card required.