Cost of Goods Sold (COGS): What's Included and Why It Matters
By Newtown Analytics · · 9 min read
For smb owners & operators
Cost of goods sold is the direct cost of the products you sold during a period, and it is the first and largest deduction between your sales and your profit. If it is wrong, every margin, price and tax figure built on it is wrong too. Owners often treat it as a number their accountant produces at year end, but it is one of the most useful numbers to understand week by week, because it tells you whether each sale made money. This guide explains what belongs in cost of goods sold and what does not, shows the formula with a worked example, covers the manufacturer and reseller cases, explains how errors in inventory flow through to profit and gives a short monthly routine. It belongs to unit economics and budgeting and forecasting, builds on landed cost and wholesale versus DTC margins, and leads to the COGS formula and inventory method examples and retail margin structures.
What cost of goods sold includes
COGS includes the costs directly tied to getting the product ready for sale. The exact list depends on the type of business and on the accounting rules you follow, so ask your accountant to confirm what applies to you.
| Business type | Typical COGS items |
|---|---|
| Reseller (buys finished goods) | Purchase price, inbound freight, duties, insurance on inbound, receiving costs |
| Manufacturer | Direct materials, direct labor, manufacturing overhead (such as factory rent, utilities, equipment depreciation) |
| Food and beverage | Ingredients, packaging, production labor, co-packer fees |
| Ecommerce brand | Product cost, inbound freight, duty, sometimes packaging |
Items that normally sit outside COGS are selling and marketing expense, general and administrative costs (such as office salaries and software), research and development, and interest. The boundary has gray areas: outbound shipping to customers, fulfillment labor, payment fees and returns are classified differently by different companies. Some include them in COGS and others report them as operating expenses. The choice affects reported gross margin, so be consistent and write the policy down. For pricing and channel decisions, do not rely on reported gross margin: use contribution margin, which includes all variable costs of the sale.
The formula
COGS = Beginning inventory + Purchases (or production cost) during the period - Ending inventory
The logic is simple. What you had at the start plus what you added is what was available to sell. What is left at the end was not sold. The difference was sold.
A worked example
A small reseller has these figures for a year (hypothetical):
| Item | Amount |
|---|---|
| Beginning inventory | $40,000 |
| Purchases | $120,000 |
| Freight in, duty and receiving | $6,000 |
| Ending inventory (counted and valued) | $46,000 |
COGS = 40,000 + 120,000 + 6,000 - 46,000 = $120,000.
If sales for the year were $300,000, then:
- Gross profit = 300,000 - 120,000 = $180,000
- Gross margin = 180,000 / 300,000 = 60.0 percent
- Markup on cost = 180,000 / 120,000 = 150 percent
Margin and markup describe the same profit from different bases. A 60 percent margin is a 150 percent markup. Confusing them is a classic source of pricing errors: someone who wants a 40 percent margin and applies a 40 percent markup earns only 28.6 percent (0.40 / 1.40).
Why inventory errors change profit dollar for dollar
Because ending inventory is subtracted in the formula, any error in its value passes straight through to COGS and to profit. If the ending inventory in the example were overstated by $5,000, for instance because of obsolete stock still carried at full value, COGS would be 5,000 lower at $115,000, and profit would be $5,000 too high. Next year the error reverses, since the overstated ending inventory becomes the beginning inventory, and next year's COGS is overstated. Over two years the total is right, and each year on its own is wrong. This is why a physical count, a regular review of slow-moving stock and a write-down policy for damaged or obsolete items matter for honest reporting.
The manufacturer's case
A manufacturer has three layers of inventory: raw materials, work in process and finished goods. The cost of goods manufactured in a period is direct materials used plus direct labor plus manufacturing overhead, adjusted for changes in work in process. COGS then uses the same formula, with finished goods as the inventory.
Example (hypothetical): direct materials used $50,000; direct labor $30,000; manufacturing overhead $20,000; no change in work in process. Cost of goods manufactured is 50,000 + 30,000 + 20,000 = $100,000. If 10,000 units were produced, the cost per unit is $10.00. Suppose the company started with 1,000 finished units valued at $9.00 each ($9,000) and ended with 2,000 units. Under the first-in, first-out method, ending inventory is the 2,000 most recently produced units at $10.00, or $20,000, and COGS is 9,000 + 100,000 - 20,000 = $89,000. The 9,000 units sold at a cost of $89,000 are composed of the 1,000 older units at $9.00 and 8,000 units at $10.00 (9,000 + 80,000 = 89,000). Check: 1,000 + 10,000 - 2,000 = 9,000 units sold. Overhead matters: if the company allocates $20,000 of overhead over 10,000 units but only produces 8,000 in a slow period, the cost per unit rises, and it must be handled with a consistent method.
How COGS changes with volume and mix
COGS rises with units sold, but unit cost changes too. Supplier price changes, freight rates, currency and duty all feed in, with a lag that depends on the inventory method. When costs rise, the older inventory carries older costs, and reported margin looks healthy until the newer stock is sold. Watch the replacement cost of what you sell, not only the reported figure. If you price from reported COGS during a period of rising costs, you may be selling below replacement cost.
Mix matters too. If sales shift toward lower-margin products, blended COGS as a percentage of sales rises even if no individual cost changed. Report COGS and margin by product line, not only in total. See product mix analysis.
Reading COGS as a manager
| Question | What to check |
|---|---|
| Is our margin changing? | COGS as a percentage of sales, month by month |
| Is the change from price, cost or mix? | Break into price, volume, mix and cost effects |
| Are we accounting for all costs? | Compare to landed cost per unit |
| Is inventory valued correctly? | Count, aging report, write-downs |
| Are we pricing from the right number? | Replacement cost versus reported cost |
| Do our reports agree with our tax filings? | Reconcile with the accountant |
A monthly routine for owners
- Close the books within a set number of days and review COGS as a percentage of sales against last month and the same month last year.
- Check the largest cost lines: supplier invoices, freight and duty.
- Review the aging report and list items that have not sold for more than a set period.
- Count a sample of items each month so that errors are caught early instead of at year end.
- Update the standard cost of products whose costs have changed.
- Write down what you learned in a short note, so that explanations are on record.
Linking to the plan
COGS is a major input to the budget: a sales forecast times an expected COGS rate gives expected gross profit, and the purchasing plan decides what the inventory costs. Purchases in advance of sales raise inventory, which ties up cash. See demand planning and inventory optimization for how to buy the right quantities, and budgeting and forecasting for how to plan the margin.
Common mistakes
- Leaving inbound freight, duty and receiving out of cost.
- Valuing obsolete stock at full cost.
- Mixing up margin and markup.
- Changing the classification of costs between periods without notice.
- Using reported COGS to price in a time of rising costs.
- Never counting the inventory.
Classification choices change the margin, not the profit
Consider an ecommerce company with $300,000 of sales. Product cost is $120,000, outbound shipping and fulfillment cost $45,000, and payment fees cost $9,000. Two companies with the same operations could report very different gross margins.
| Policy 1: COGS is product cost only | Policy 2: COGS includes shipping, fulfillment and fees | |
|---|---|---|
| Sales | $300,000 | $300,000 |
| COGS | $120,000 | $174,000 |
| Gross profit | $180,000 | $126,000 |
| Gross margin | 60.0% | 42.0% |
| Operating expenses (shipping, fulfillment and fees shown here under Policy 1) | $54,000 | $0 |
| Profit before other expenses | $126,000 | $126,000 |
Check: 120,000 + 45,000 + 9,000 = 174,000; 300,000 - 174,000 = 126,000; 126,000 / 300,000 = 42.0 percent; and under Policy 1, 180,000 - 54,000 = 126,000. The profit is the same under both policies. Only the line on which the costs appear changes, and with it the gross margin that is quoted. This matters when you compare yourself with another company, read an investor deck or negotiate a loan covenant based on gross margin. Always ask what is in the cost line before comparing percentages.
Using COGS to set a price floor
COGS gives you a floor below which a price cannot go without losing money on the product. To earn a target gross margin m on a unit that costs C, the price must be C / (1 - m). For a unit costing $10.00 and a 40 percent target margin, the price is 10.00 / 0.60 = $16.67. Check: 16.67 × 0.40 = $6.67 of margin, and 16.67 - 6.67 = $10.00. For a 60 percent margin the price would be 10.00 / 0.40 = $25.00. Notice how quickly the price rises as the target margin rises. Because the floor uses reported cost, add the variable costs of selling, such as shipping and fees, in a contribution view before settling on a price. See pricing strategy and cost-plus pricing.
How a small change in the COGS rate affects the plan
COGS as a percentage of sales is a planning assumption, and a small change has a large effect. On planned sales of $3,000,000, a COGS rate of 60 percent gives gross profit of $1,200,000. If supplier increases and freight push the rate to 62 percent, gross profit falls to $1,140,000, a loss of $60,000 (2 percent of $3,000,000) with no change in sales. To protect profit, the company would need to raise prices by about 2 percent of the price, adjust the mix or reduce other costs. A sensitivity table on the COGS rate belongs in every budget. See budgeting and forecasting.
FAQs
What is cost of goods sold?
The direct cost of the products a business sold in a period, including purchase or production cost and the costs of bringing goods to a sellable state.
How do you calculate COGS?
Beginning inventory plus purchases or production cost, minus ending inventory.
Is shipping to customers part of COGS?
It depends on your accounting policy. Many companies report it in operating expenses. For pricing and channel decisions, include it as a variable cost in contribution margin either way.
What is the difference between margin and markup?
Margin is profit divided by selling price, and markup is profit divided by cost. A 60 percent margin equals a 150 percent markup.
How does an inventory error affect profit?
Ending inventory is subtracted in the formula, so overstating it understates COGS and overstates profit by the same amount for that period.
Keep reading
- Complete guide: Unit Economics: The Complete Guide to Profitable Growth
- COGS Formula and Inventory Method Examples
- Retail Margin Structures: Brand, Distributor, and Retailer
- Landed Cost: What's Included and How to Calculate It
- Related topic: Budgeting and Forecasting: The Complete Guide for Finance Leaders
This article is for general information. It is not accounting, tax, legal or investment advice, and examples use illustrative numbers rather than client data. Confirm decisions that carry financial or legal consequences with a qualified professional.