Finance fundamentals
Manufacturing COGS Formula
Manufacturing COGS is a two-step calculation. Step 1 — find Cost of Goods Manufactured: COGM = Direct Materials Used + Direct Labor + Manufacturing Overhead + Beginning WIP − Ending WIP. Step 2 — convert COGM to COGS: COGS = Beginning Finished Goods + COGM − Ending Finished Goods.
A retailer buys a finished product and resells it — one inventory account, one subtraction. A manufacturer converts raw materials into a product through three inventory stages, which is why the formula needs an extra step. For the single-step retail version, see our general COGS guide.
The three components of COGM
Direct Materials Used
Beginning Raw Materials + Purchases − Ending Raw Materials
Use direct-material balances and purchases only. Materials remaining unused stay in inventory; indirect materials belong in overhead and must not be counted here too.
Direct Labor
Wages of production employees
Production wages traceable to products, such as assembly work. Indirect production labor, including factory supervision, belongs in overhead; sales and admin wages are excluded.
Manufacturing Overhead
Factory rent + utilities + depreciation + indirect materials + indirect labor
Every production cost that isn't direct materials or direct labor. Office rent and sales expenses are never included here.
Build your own COGM-to-COGS schedule
Enter your own period figures and the full schedule resolves line by line — direct materials used, total manufacturing cost, COGM, and finally COGS. Download the completed schedule as a CSV.
Use costs for the same accounting period and the same inventory valuation basis. The three raw-material fields cover direct materials only; include indirect materials once in manufacturing overhead. This simplified schedule calculates unadjusted COGS, before any under- or overapplied overhead adjustment.
Method sources: OpenStax product cost components and inventory cost flows.
Enter nonnegative costs for one period, not quantities or selling prices. The schedule updates as you type.
| Line item | Amount |
|---|---|
| Beginning raw materials | $20,000 |
| + Raw material purchases | $60,000 |
| − Ending raw materials | −$15,000 |
| = Direct materials used | $65,000 |
| + Direct labor | $40,000 |
| + Manufacturing overhead | $25,000 |
| = Total manufacturing cost | $130,000 |
| + Beginning WIP | $10,000 |
| − Ending WIP | −$12,000 |
| = COGM (Cost of Goods Manufactured) | $128,000 |
| + Beginning finished goods | $18,000 |
| − Ending finished goods | −$22,000 |
| = COGS (Cost of Goods Sold) | $124,000 |
Inventory can grow while COGM and COGS remain nonnegative. Negative calculated costs mean the ending inventory exceeds the available costs in this simplified schedule; reconcile missing costs or adjustments before using the result.
Worked example: a full COGM-to-COGS schedule
A small furniture manufacturer closes out the quarter with these numbers:
| Line item | Amount |
|---|---|
| Beginning raw materials | $20,000 |
| + Raw material purchases | $60,000 |
| − Ending raw materials | $15,000 |
| = Direct materials used | $65,000 |
| + Direct labor | $40,000 |
| + Manufacturing overhead | $25,000 |
| = Total manufacturing cost | $130,000 |
| + Beginning WIP | $10,000 |
| − Ending WIP | $12,000 |
| = COGM (Cost of Goods Manufactured) | $128,000 |
| + Beginning finished goods | $18,000 |
| − Ending finished goods | $22,000 |
| = COGS | $124,000 |
Notice the two adjustments that make manufacturing different from retail: WIP inventory (product started but not finished) sits between materials/labor/overhead and COGM, and finished goods inventory sits between COGM and COGS. The factory produced $128,000 of finished goods this quarter, but because finished goods inventory grew by $4,000, only $124,000 worth actually sold.
Three mistakes that break the manufacturing COGS formula
Overhead includes non-production costs
Office rent, sales commissions, and administrative salaries are period expenses, not manufacturing overhead. Mixing them in overstates COGS and understates operating expenses — it distorts gross margin.
WIP change gets skipped
Skipping the WIP adjustment treats every dollar spent on materials, labor, and overhead as if it finished production this period. Any product still on the factory floor at period end needs to be backed out.
Purchases used instead of materials used
Raw material purchases and raw materials used are not the same number. If you bought more than you consumed, using the purchase figure inflates COGS and understates raw materials inventory on the balance sheet.
Frequently asked questions
What is the COGS formula for a manufacturing company?+
Manufacturing COGS takes two steps instead of one. First calculate Cost of Goods Manufactured (COGM): direct materials used + direct labor + manufacturing overhead, adjusted for the change in work-in-process (WIP) inventory. Then calculate COGS: beginning finished goods inventory + COGM − ending finished goods inventory. Retail businesses skip the first step entirely because they buy finished products rather than building them.
What is the difference between COGM and COGS?+
COGM is the total cost of everything the factory finished producing this period — it becomes an input, not the final answer. COGS is the cost of what actually sold this period. The two differ by the change in finished goods inventory: if you manufactured more than you sold, COGM is higher than COGS and the difference sits in inventory; if you sold from existing stock, COGS can exceed COGM for the period.
Is direct labor included in manufacturing COGS?+
Yes — direct labor is one of the three core components of COGM, alongside direct materials and manufacturing overhead. This means wages for employees physically involved in production: assembly line workers and machine operators whose work can be traced to products. Production supervisors whose work cannot be traced directly to products belong in manufacturing overhead. Salaries for sales staff, accounting, and executive management are period expenses, not COGS, regardless of how the business is organized.
What is included in manufacturing overhead?+
Manufacturing overhead is every production cost that isn't direct materials or direct labor: factory rent and utilities, depreciation on production equipment, indirect labor (maintenance staff, quality inspectors), factory supplies, and equipment repairs. It does not include office rent, sales commissions, marketing, or administrative salaries — those are operating expenses reported separately on the income statement.
How is manufacturing COGS different from retail COGS?+
Retail COGS is a single-step calculation: beginning inventory + purchases − ending inventory, because a retailer buys finished goods and resells them unchanged. Manufacturing COGS requires two steps and three inventory accounts (raw materials, WIP, and finished goods) because the business is converting materials and labor into a new product. See our general COGS guide for the retail version of the formula.
What does a schedule of cost of goods manufactured look like?+
A COGM schedule is a stacked, cumulative statement that starts with direct materials used and adds each cost layer in order: beginning raw materials + purchases − ending raw materials = direct materials used; + direct labor + manufacturing overhead = total manufacturing cost; + beginning WIP − ending WIP = COGM. Each line adds to or subtracts from the running subtotal, and the final subtotal is cost of goods manufactured — which then feeds the COGS line, beginning finished goods + COGM − ending finished goods. The interactive schedule on this page builds exactly that statement from your own figures.
Does it matter which items you list first in a schedule of cost of goods manufactured?+
Within each block the order does not change the answer, as long as the components of that block are grouped correctly. Direct materials used must be resolved before it enters total manufacturing cost, WIP must be adjusted after total manufacturing cost to arrive at COGM, and finished goods must be adjusted after COGM to arrive at COGS. What does break the schedule is putting an item in the wrong block — for example treating office rent as manufacturing overhead, or using raw material purchases in place of direct materials used.
How do you reverse-calculate cost of production when COGS and opening finished goods are given?+
Work the formula backwards one step at a time. COGS = beginning finished goods + COGM − ending finished goods, so COGM = COGS − beginning finished goods + ending finished goods. Without ending finished goods or an explicit assumption about its balance, COGM cannot be determined uniquely. COGM equals COGS only if beginning and ending finished goods are equal; do not assume this silently. Then go one step further back: total manufacturing cost = COGM − beginning WIP + ending WIP, again reversing the WIP adjustment.
Are indirect materials included in manufacturing overhead?+
Yes. Indirect materials — glue, fasteners, cleaning supplies, machine lubricant, and any material that cannot be traced to a specific unit — are part of manufacturing overhead, not direct materials. The distinction matters because direct materials enter the schedule as direct materials used (beginning + purchases − ending), while indirect materials are folded into the overhead line. Indirect labor such as maintenance staff and quality inspectors goes into overhead the same way.
Is depreciation grouped into COGS for a manufacturing company?+
Only depreciation on production assets is grouped into COGS for a manufacturer. Depreciation on factory buildings, production machinery, and equipment used in making the product is part of manufacturing overhead, so it flows through COGM and then into COGS. Depreciation on office equipment, sales vehicles, or administrative buildings is an operating expense and is reported separately — it never enters the COGM schedule.
Related tools and guides
The single-step retail and ecommerce version of the formula.
COGS is the denominator behind DIO and DPO in the cash cycle.
See how fast raw materials and finished goods actually move.
Calculate gross margin once you have your COGS figure.
See how COGS flows into gross margin and then net margin.
Use your manufacturing cost structure to find your break-even unit volume.