Cost of goods manufactured (COGM) = beginning work in process inventory + total manufacturing costs − ending work in process inventory. Total manufacturing costs is direct materials used + direct labor + applied manufacturing overhead. Add the work in process you carried in from last period, subtract what is still unfinished, and what remains is the cost of everything your factory finished and moved into finished goods inventory during the period.
Here is how to calculate cost of goods manufactured in a way that holds up when a banker, an auditor or a customer asks where a number came from. The whole job takes a few hours once your production records are clean.
Table of Contents
- What You Need
- Step-by-Step: How to Calculate Cost of Goods Manufactured
- 1. Define the Production Period and Costing Scope
- 2. Calculate Direct Material Costs
- 3. Calculate Direct Labor Costs
- 4. Gather Manufacturing Overhead
- 5. Allocate Overhead to Production
- 6. How to Calculate Cost of Goods Manufactured in Accounting
- 7. Calculate Cost Per Good Unit
- 8. Validate and Use the Result
- Common Mistakes
- Frequently Asked Questions
- What is the formula for cost of goods manufactured?
- What goes into manufacturing overhead?
- Is cost of goods manufactured the same as cost of goods sold?
- How do I calculate cost of goods sold without an ending inventory figure?
- How do I calculate cost per unit manufactured?
- How is third-party or contract manufacturing cost treated?
- Conclusion
What You Need
Gather these before you start. Chasing numbers halfway through the calculation is how most schedules end up wrong.
- Raw materials records: beginning balance, purchases, freight-in, purchase returns, and ending balance for the period.
- Production quantities: units started, units completed, units scrapped, units reworked, and good units transferred to finished goods.
- Material issue documents: the quantities and grades of resin, components and packaging actually issued to the floor, by job or work order.
- Labor data: hours booked to production jobs, wage rates by department or shift, overtime premium, payroll taxes and benefits.
- Overhead pool: the period’s actual factory overhead costs, plus the predetermined overhead rate and the allocation driver you use.
- Work in process balances: the value carried into the period and the value left at period end, valued under your stated method.
- Finished goods balances: beginning and ending finished goods inventory, if you want to continue on to cost of goods sold.
Decide also which costing method you are on. Job order costing values each job separately, so work in process is the sum of open jobs. Process costing values work in process by equivalent units or percentage of completion, which suits a shop making the same part over and over. Say which one you use, because that single sentence is what makes your schedule auditable.
Step-by-Step: How to Calculate Cost of Goods Manufactured
1. Define the Production Period and Costing Scope
Pick the period first: monthly, quarterly, annual, or per batch. Monthly is the most useful default for a production shop, because it is short enough to trace and long enough to smooth out a single bad setup.
Then write down what is in scope. List the products, work centers and inventory accounts that belong in the period, and note anything deliberately excluded, such as a second building you account for separately. A scope you can state in one sentence is a scope you can defend.
Also fix the inventory cut-off timestamp. Every material issue, labor booking and shipment crossing that moment has to land on one side of it or the other.
2. Calculate Direct Material Costs

Direct materials used is not what you bought. It is what left the storeroom and became part of the product. Calculate it as a roll-forward of the raw materials account:
Direct materials used = beginning raw materials + purchases + freight-in − purchase returns − indirect materials − ending raw materials.
The indirect materials line matters more than most people expect. Release agents, labels, glue, machine cleaning supplies and gloves get issued to production but never become part of the part. They belong in manufacturing overhead, and subtracting them here is what stops you counting the same dollar twice.
Freight-in counts because the material is not usable at your dock until it is. Outbound freight and shipping to the customer do not belong here at all; those are selling costs.
3. Calculate Direct Labor Costs
Direct labor cost is production hours multiplied by the wage rate for the department doing the work. Pull the hours from labor bookings or time cards tied to jobs, not from a payroll total, because payroll mixes production and non-production time in one report.
Add the overtime premium and the employer’s payroll taxes and benefits that relate to those production hours, if your policy books them here. Supervisors, maintenance techs, material handlers and quality inspectors are indirect labor. Keep them out of direct labor and put them in overhead.
The clean test is traceability. If you can point to the hour and the job it belongs to, it is direct. If you cannot, it is overhead.
4. Gather Manufacturing Overhead
Manufacturing overhead is every manufacturing cost that is not a direct material or a direct labor hour. It splits two ways. Fixed overhead stays roughly the same month to month no matter how much you run: factory rent, insurance, property tax, salaried supervision, depreciation on machines and molds. Variable overhead moves with volume: factory utilities, maintenance, consumable tooling, inspection supplies, scrap handling.
A typical plastic or machining shop’s overhead pool looks something like this:
- Indirect labor: supervisors, maintenance, material handlers, quality inspection
- Factory utilities: electricity, gas, compressed air, water
- Depreciation on production equipment, molds and fixtures
- Maintenance, repairs, mold cleaning and calibration
- Factory rent, property insurance, property tax, security
- Small tools, safety equipment and quality supplies
Utilities deserve their own line because they are the one overhead item that spikes without warning. Splitting the metered cost out per part is the subject of a whole separate calculation, and it is worth doing if your energy bill moves more than a few hundred between months. Our guide on how to calculate factory energy cost per part walks through that allocation.
5. Allocate Overhead to Production
Overhead does not arrive attached to a part. You attach it with a driver, and the driver has to match how your factory actually consumes resources.
- Machine hours suits capital-intensive work, where a press running empty still burns money. This is usually the honest driver for injection molding and CNC shops.
- Direct labor hours suits labor-intensive work where people, not machines, carry the cost.
- Units produced is simple and defensible only when parts consume resources roughly equally.
- Activity-based drivers split the pool into separate rates for setups, inspections, machine time and material handling, then apply each to the job that caused it.
Multiply the driver quantity by the rate. With machine hours, the rate comes straight out of building a machine hour rate for each asset, adding power, labor, maintenance and depreciation into one figure per hour of run time.
The number that matters most for trust is the gap between overhead actually incurred and overhead applied. If your actual pool came to 81,900 and you applied 81,648, you are 252 under-absorbed. Write that difference down and close it to cost of goods sold rather than letting it disappear. A shop that applies overhead at a rate nobody wrote down cannot compare one month to the next, and that is precisely the complaint you hear from anyone trying to benchmark two plants.
6. How to Calculate Cost of Goods Manufactured in Accounting
The accounting schedule adds the work in process carried over from the prior period and removes the work in process left unfinished. COGM is the cost of goods completed and transferred into finished goods during the period, before a single unit is sold.
Three terms get mixed up constantly, so here they are side by side.
| Term | What it measures | Where the cost sits |
|---|---|---|
| Total manufacturing cost (TMC) | Direct materials used + direct labor + applied overhead for the period | Costs added during the period only |
| Cost of goods manufactured (COGM) | TMC + beginning WIP − ending WIP | Moves into finished goods inventory |
| Cost of goods sold (COGS) | Beginning finished goods + COGM − ending finished goods | Expense on the income statement |
Prime cost is direct materials used plus direct labor, the cost of inputs you can trace to a unit. Conversion cost is direct labor plus overhead, the cost of turning those inputs into a finished part. The split tells you where a reduction program pays off: a drop in prime cost comes from material yield, negotiating or design, while a drop in conversion cost comes from cycle time, labor efficiency and overhead absorption.
What must stay out of COGM is just as important. Marketing, sales commissions, general administration, research and development, interest, income tax and any non-manufacturing facility cost are period costs. They hit the income statement in the period they occur and never enter a product’s cost. If a cost cannot be traced to making a physical product, it does not belong in your schedule.
7. Calculate Cost Per Good Unit
Total COGM tells you what production cost. Per-unit cost is what you actually quote from, and it is the figure most manufacturers never finish computing. Here is a full month for a small injection molding shop. All figures are in US dollars.
Direct materials used
| Line | Amount |
|---|---|
| Beginning raw materials inventory | 38,000 |
| Purchases of raw materials | 126,500 |
| Freight-in | 3,400 |
| Less purchase returns | (1,200) |
| Less indirect materials included above | (7,300) |
| Less ending raw materials inventory | (34,900) |
| Direct materials used | 124,500 |
Direct labor
| Line | Amount |
|---|---|
| Production labor hours booked | 4,860 |
| Blended direct labor rate per hour | 24.50 |
| Direct labor | 119,070 |
Manufacturing overhead
| Line | Amount |
|---|---|
| Indirect labor | 21,600 |
| Factory utilities | 12,400 |
| Depreciation on molding machines | 18,500 |
| Maintenance and tooling | 9,300 |
| Quality inspection and scrap handling | 4,100 |
| Facility rent, insurance, property tax | 16,000 |
| Total actual overhead incurred | 81,900 |
| Predetermined rate per direct labor hour | 16.80 |
| Overhead applied (4,860 hours) | 81,648 |
The COGM schedule
| Line | Amount |
|---|---|
| Direct materials used | 124,500 |
| Direct labor | 119,070 |
| Manufacturing overhead applied | 81,648 |
| Total manufacturing costs added | 325,218 |
| Add beginning work in process inventory | 46,300 |
| Less ending work in process inventory | (52,900) |
| Cost of goods manufactured | 318,618 |
Now divide by good units, not units started. The shop started 15,200 parts, scrapped 1,200 at first-article inspection and transferred 14,000 good units to finished goods. Cost per good unit is 318,618 ÷ 14,000, or 22.76 per part.
That division is where scrap quietly destroys margin. Had the same total been divided by 15,200 units started, the apparent cost per part would have come out lower and your quote would have been built on a yield the shop does not actually achieve. When scrap runs higher than the standard, the cost per good unit rises without a single extra purchase of resin, because the same material and the same machine hours are spread over fewer sellable parts.
Yield is worth tracking on its own: good units divided by units started, expressed as a percentage. Material used per good unit is the second number to watch, and together they explain most of the drift between quoted cost and real cost.
8. Validate and Use the Result
Before the number goes anywhere, put it against a budget. Comparing budgeted cost per good unit to actual cost per good unit gives you a single percentage that localizes the problem: if materials came in under but total cost came in over, the gap is labor or overhead.
Then look at the two variances that explain most overruns. Material yield variance compares standard pounds per unit to actual pounds per unit. Labor efficiency variance compares standard hours to actual hours. When both run hot in the same month, check whether WIP was valued too high, because a flat-valued work in process balance quietly inflates the total you started from.
Tie out the inventory. Total raw materials used plus purchases net of returns should equal beginning plus purchases less ending. The same roll-forward applies to work in process and to finished goods. If those three schedules do not balance, fix them before you analyze anything.
Once it holds, the number earns its keep in three places. You quote from cost per good unit and add margin rather than guessing. You compare it to a supplier’s price on the same part, which is the only way to tell whether a quote is fair. And you decide insource versus outsource on evidence rather than on a feeling. Building an independent model of what the part should cost is the only way to audit a supplier’s pricing, and our explanation of should-cost modeling covers how to structure that comparison.
Common Mistakes
- Mixing period costs into the product. Marketing, admin, R&D and interest land in the schedule and inflate every unit. The fix: a cost joins COGM only if it exists because a physical product was made.
- Counting indirect materials twice. Release agents and labels get subtracted in the materials roll-forward and then added again in the overhead pool. The fix: subtract them once, and define the overhead pool so it excludes them.
- Leaving work in process at zero or flat. A WIP balance that never moves makes COGM simply equal total manufacturing costs and hides everything still on the floor. The fix: value it by job, or by equivalent units under percentage of completion, and document the method.
- Applying one overhead rate across every work center. A labor-hour rate on a fully automated cell undercharges it and overcharges the manual line. The fix: a rate per work center, chosen on the driver that work center actually consumes.
- Cut-off errors at period end. A material issue dated the 30th but booked in the next period moves cost between months and throws off yield. The fix: a documented cut-off timestamp and a rule that the transaction date, not the posting date, decides the period.
- Dividing by units started instead of good units. Scrap disappears from the denominator and the per-unit cost looks better than reality. The fix: divide by good units transferred, and report yield next to the cost.
- Reconstructing costs at month end from memory. Costs captured at the transaction level, when the material is issued and the clock is booked, beat a spreadsheet rebuilt from memory six weeks later. If your team is not Excel-deep, a simple fillable schedule with the rows above pre-labeled will do more than a sophisticated model nobody maintains.
Frequently Asked Questions
What is the formula for cost of goods manufactured?
Cost of goods manufactured equals beginning work in process inventory, plus total manufacturing costs, minus ending work in process inventory. Total manufacturing costs is direct materials used plus direct labor plus applied manufacturing overhead. The result is the cost of goods completed and moved into finished goods inventory during the period, before anything is sold.
What goes into manufacturing overhead?
Manufacturing overhead holds every factory cost that is not a direct material or a direct labor hour. That typically includes indirect labor such as supervisors and maintenance staff, factory utilities, depreciation on machines and molds, maintenance and tooling, factory rent, insurance, and quality inspection supplies. Period costs like marketing, administration, and research do not belong in overhead.
Is cost of goods manufactured the same as cost of goods sold?
No. Cost of goods manufactured is production cost for the period, and it moves into finished goods inventory. Cost of goods sold takes beginning finished goods inventory, adds COGM, subtracts ending finished goods inventory, and lands on the income statement as an expense. One measures what you made, the other measures what you sold.
How do I calculate cost of goods sold without an ending inventory figure?
You cannot do it accurately without one, because COGS is defined as beginning finished goods plus COGM minus ending finished goods. Without a physical count and a valuation of what is still on the shelf, you have to estimate, and estimates drift. A year-end physical count is the cheapest fix, since it forces the roll-forward to reconcile.
How do I calculate cost per unit manufactured?
Divide cost of goods manufactured by the number of good units transferred to finished goods, not by units started. In the example in this guide, 318,618 divided by 14,000 good units gives 22.76 per part. Scrap raises this figure because the same material and machine hours are spread across fewer sellable units.
How is third-party or contract manufacturing cost treated?
If a contract manufacturer produces the finished goods, their production cost becomes your cost of goods purchased rather than something you build from your own material and labor records. Many buyers then add inbound freight, duty, insurance and receiving to get a landed cost for comparison. Keep the two apart, because a supplier production cost and a landed cost answer different questions.
Conclusion
Start with one clearly defined production period and reconcile it before you calculate anything: production quantities, material usage, labor hours booked and the overhead pool. Build the schedule in the order above, document your work in process valuation method and your overhead driver, then divide by good units to get the per-part number you quote from. Once that process runs reliably month after month, you can price against it, check a supplier’s quote against it, and see exactly where your margin is going.