Cost of Goods Sold (COGS): Definition, Calculation, & Formula
- Cost of goods sold (COGS) is the direct cost of making or buying the products you sold in a given period.
- The COGS formula is Beginning Inventory + Purchases - Ending Inventory.
- COGS sits right under revenue on your income statement. Subtract it from revenue and you get gross profit.
- Your costing method (FIFO, LIFO, weighted average, or specific identification) changes your COGS and your reported profit.
- Your COGS is only as accurate as your inventory counts and landed costs.
Maybe you've heard your accountant mention cost of goods sold, or someone tossed "COGS" around in a meeting and everyone nodded along. If you've ever wondered what it is and why it matters, you're in the right place.
We'll cover what's included, how to calculate it, which costing method to pick, and how to bring it down.
What Is Cost of Goods Sold (COGS)?
Cost of goods sold (COGS) is the direct cost of producing or buying the products you sold during a specific period. That includes materials, direct labor, and the costs of getting stock ready to sell. You subtract COGS from revenue to find your gross profit.
The formula is simple: COGS = Beginning Inventory + Purchases - Ending Inventory. Indirect costs, like sales and marketing, stay out of it.
What's Included in COGS?
The IRS Publication 334 lists the cost of labor, materials and supplies, containers, freight-in, and production overhead as parts of cost of goods sold. In practice, COGS usually includes:
- The cost of raw materials used to make your products
- The purchase cost of goods you buy for resale
- Direct labor for the people who make the product
- Manufacturing overhead tied to production, like factory utilities
- Inbound freight to get stock to your warehouse
- Packaging and containers that are part of the product
Filing a business tax return? Corporations and partnerships report these costs on IRS Form 1125-A, Cost of Goods Sold.
What's Not Included in COGS?
Anything you'd still pay if you sold nothing this month usually lands outside COGS. Common exclusions include:
- Rent for offices and other non-production space
- Marketing and advertising
- Administrative and sales salaries
- Outbound shipping to customers (in most cases)
- Other general and administrative costs, like insurance and legal fees
AccountingTools notes that selling and administrative costs stay out of COGS. Outbound shipping, or freight-out, is typically an operating expense too, per AccountingCoach.
COGS vs. Cost of Revenue
COGS covers the direct costs of producing physical goods, like raw materials and labor. Cost of revenue takes a broader view. It starts with COGS and adds the direct costs of obtaining or fulfilling a sale, like shipping and payment processing fees, according to AccountingTools.
For businesses selling both products and services, this distinction helps clarify margins. COGS drives gross profit, while cost of revenue captures your total delivery cost.
You'll also see "cost of sales" used as another name for COGS, especially by retailers. Same idea, different label.
COGS vs. Operating Expenses
COGS is what it costs to create or buy your product. Operating expenses (OPEX) are the costs of running the business, like rent, software, and marketing. Here's how they compare:
| COGS | Operating Expenses (OPEX) | |
|---|---|---|
| What it covers | Materials, direct labor, production overhead, inbound freight | Rent, salaries outside production, marketing, software |
| Varies with sales? | Yes, it rises and falls with units sold | Mostly no, it stays steadier month to month |
| Income statement line | Directly below revenue | Below gross profit |
| Profit it affects | Gross profit | Operating income |
Keeping the two separate shows you where your money goes. If your gross margin looks strong but profits are thin, OPEX is the place to dig.
Why Is It Important to Know and Calculate the Cost of Goods Sold?
COGS affects your gross margin, net income, and cash flow. Here's what knowing your cost of goods sold does for you.
Informs a Smarter Pricing Strategy
Knowing your COGS tells you exactly what it costs to produce or buy each product. With that number, you can price your products to cover costs and still hit your target margin.
You can weigh that against what competitors charge and what customers will pay. That's how you stay competitive and profitable at the same time.
Reveals Your True Product Costs
This one's more of an accounting point, but it matters. Your income statement lists all your income and expenses.
Once you know what you spent on the products you sold, you can add overhead like sales and marketing to see your total expenses.
Supports Competitive Market Positioning
Pricing on purchase cost alone, then picking a margin afterward, is risky. Price too high and customers shop elsewhere. Price too low and your margin may shrink too far to sustain the business.
Understanding your cost of goods sold helps you price competitively while still protecting your profitability.
How to Calculate Cost of Goods Sold: The COGS Formula
Now that you know why it matters, let's get into the math. Don't worry, it's friendlier than it sounds!
The Basic COGS Formula
COGS = Beginning Inventory + Purchases During the Period - Ending Inventory
Here's how to calculate cost of goods sold, step by step:
- Start with your beginning inventory, the value of stock on hand at the start of the period.
- Add the inventory purchases you made during the period.
- Subtract your ending inventory, the value of stock left at the end of the period.
The result is the cost of the goods that actually moved through your business. If you count stock at set intervals under a periodic inventory system, you'll run this formula at period end. As AccountingTools explains, a perpetual inventory system updates your records continuously as you buy and sell, so COGS stays current.
An Example of the COGS Formula in Action
Let's say Maple & Moss, a fictional home goods retailer, tracks inventory on a calendar year. It records beginning inventory on January 1 and ending inventory on December 31.
Beginning inventory is valued at $20,000. Mid-year, the retailer buys another $7,000 of stock. By December 31, ending inventory is worth $4,000.
COGS = $20,000 + $7,000 - $4,000 = $23,000
Maple & Moss's cost of goods sold for the year is $23,000. That figure helps the team compare vendor pricing, plan orders, and keep expenses in check.
Now say annual revenue is $75,000. Here's how gross profit and gross margin shake out:
- Gross profit: $75,000 - $23,000 = $52,000
- Gross margin: $52,000 / $75,000 = 69.3%
COGS Accounting Methods: FIFO, LIFO, Average Cost, and Specific Identification
The method you use to value inventory decides which costs land in COGS and which stay on your balance sheet. That means your choice directly shapes your reported profit.
Here's a quick rundown of each option. For a deeper comparison of the two most common ones, check out our guide to FIFO vs. LIFO.
FIFO (First In, First Out)
Under FIFO, your oldest inventory costs are matched to sales first. It fits products with a shelf life or that go out of style fast, like electronics or fashion.
When prices are rising, FIFO generally gives you lower COGS and a higher ending inventory value, according to IRS Publication 538. Older, cheaper costs are expensed first, so your reported profit is generally higher too, as AccountingTools explains.
LIFO (Last In, First Out)
LIFO is the opposite. Your most recent purchase costs are matched to sales first.
When prices are rising, LIFO generally means higher COGS and lower taxable income, according to OpenStax. The catch is that your remaining inventory can be valued at old, outdated costs.
IFRS doesn't permit LIFO, while US GAAP does, according to PwC's IFRS and US GAAP guide. Under IFRS (IAS 2), businesses use FIFO, weighted average cost, or specific identification instead.
Weighted Average Cost
The weighted average cost method divides the total cost of goods available for sale by the total units available. Every unit sold gets that same average cost.
It smooths out price swings, which makes it handy for interchangeable items bought at different prices. IAS 2 permits it alongside FIFO.
Specific Identification
Specific identification tracks the actual cost of each individual item you sell. It works best for unique, high-value goods like jewelry, cars, or custom furniture.
IAS 2 calls for this method when items aren't ordinarily interchangeable. For high-volume, identical stock, it's usually more effort than it's worth.
FEFO (First Expired, First Out)
FEFO ships the products with the earliest expiration dates first. It's common for perishable goods like food, pharmaceuticals, and cosmetics.
FEFO is more of a stock rotation rule than a costing formula. By moving short-dated stock first, it helps you sell items before they expire.
The Role of Inventory Management in COGS
Good inventory management keeps your cost of goods sold in check. Regularly tracking purchases, ending inventory, and production costs helps you spot cost creep early and protect your gross margin.
How Optimized Inventory Reduces COGS
Accurate stock levels and a consistent costing method, like weighted average cost or specific identification, help you avoid overstocking. Less excess stock means fewer markdowns and write-offs.
Inventory software that automates COGS calculations also beats chasing numbers in spreadsheets at month-end.
The Impact of Inventory Turnover on COGS
Your inventory turnover ratio divides COGS by average inventory. The Corporate Finance Institute uses the same formula. It notes a higher ratio generally means faster-selling stock and lower holding costs, like rent, insurance, and theft.
Low turnover often points to excess stock that ties up cash and risks write-offs. Compare your ratio with others in your industry, and aim for a balance that protects your gross margin without risking stockouts.
How to Reduce Cost of Goods Sold
Want a healthier gross margin? Here are six practical ways to bring your COGS down:
- Negotiate with suppliers. Ask for volume breaks, early payment discounts, or better terms on your top sellers.
- Consolidate purchase orders. Fewer, larger inbound shipments can cut the freight cost per unit.
- Reduce waste and shrink. Use FEFO to help perishables sell before they expire, and tighten receiving and storage to limit damage and loss.
- Forecast demand more accurately. Buying closer to real demand helps you avoid overstock and the markdowns that follow.
- Track landed costs. Factor freight, duties, and fees into each product's cost so you see your true margins.
- Automate stock counts. Accurate counts mean accurate ending inventory, and accurate ending inventory means accurate COGS.
Cin7 helps with several of these at once. Our accounting features automate COGS calculations and track landed costs, so freight, duties, and fees show up in your margins.
For forecasting, ForesightAI uses AI demand forecasting to help you buy the right amount at the right time.
How Play Pits Got Its Numbers in Order
Play Pits, a natural kids' and family hygiene brand known for its deodorant, used to run on spreadsheets. Inventory accuracy hovered around 60 to 70 percent.
The team spent "15 to 20-plus hours every single week" playing "spreadsheet detective." That meant calculating landed costs, updating inventory across channels, and manually matching POs. Month-end close took three to four weeks.
Play Pits paired Cin7 with accounting partner Fiskal Finance, with Cin7 feeding inventory and order data into Xero. Now month-end inventory closes in a few business days, and Play Pits hit a 98%+ on-time, in-full (OTIF) rate.
COGS in Different Business Models
COGS looks different depending on how your business makes money. Here's how it plays out in three common models.
Retail Industry
In retail, COGS is mainly the cost of goods bought for resale, plus inbound freight. Retailers need to watch purchases and ending inventory closely to keep COGS from climbing.
Run the COGS formula regularly and you'll make better pricing and purchasing calls for your stores and e-commerce channels.
Manufacturing Industry
For manufacturers, COGS covers production costs: raw materials, direct labor, and factory overhead. Getting it right means tracking the cost of goods manufactured and allocating overhead correctly.
Nail those inputs and your COGS reflects what each product really costs to make.
Service Industry
Service businesses may have no physical inventory. Their version of COGS, often called cost of services or cost of revenue, covers the labor and materials tied directly to delivering the service.
For them, managing staff time and resource allocation matters more than managing stock.
Limitations of COGS
COGS is a powerful number, but it doesn't tell the whole story. Keep these limits in mind:
- It leaves out overhead. COGS excludes operating expenses, so a healthy gross margin can still hide a loss.
- It depends on your costing method. FIFO, LIFO, and average cost can produce different COGS from the same sales.
- It can be manipulated. Inventory valuation choices and timing can make COGS, and profit, look better than reality.
- It's less useful for pure service firms. Without inventory, COGS says less about how efficiently you operate.
- It relies on accurate counts. If your ending inventory is wrong, your COGS is wrong too.
Frequently Asked Questions About Cost of Goods Sold
Is Cost of Goods Sold an Expense or an Asset?
It's both, just at different times. While products sit on your shelves, they're inventory, which is an asset on your balance sheet. Once you sell them, their cost moves to your income statement as COGS, an expense.
Why Doesn't Your COGS Match What You Spent on Inventory?
COGS only counts the products you actually sold. Anything you bought but didn't sell stays in ending inventory as an asset until it moves. So if you stocked up for a busy season, your purchases can run well ahead of your COGS.
Can Your COGS Change If Your Sales Stay the Same?
Yep! If supplier prices or freight costs go up, selling the same number of units costs you more. Shrink, write-offs, and your costing method can shift the number too, so it's worth checking COGS even in a steady month.
What Does It Mean If COGS Is High?
A high COGS means each sale leaves you with less gross profit. It could point to rising supplier or freight costs, waste and shrink, or prices that are set too low. Start by checking your landed costs and pricing to find where the money's leaking.
What Is a Good COGS-to-Revenue Ratio?
There's no universal number, sorry! A healthy ratio varies widely by industry and business model, so a grocer and a jewelry brand will look very different. Compare yours against your own history and your industry peers, and watch your gross margin trend over time.
How Often Should You Calculate COGS?
At a minimum, calculate COGS every accounting period, whether that's monthly, quarterly, or annually. If you'd rather skip the manual work, Cin7 can help. Our accounting features automate COGS calculations, so you're not stuck doing month-end math in a spreadsheet.
Take Control of Your COGS with Cin7
Knowing your cost of goods sold gives you a clearer picture of how your business is really doing. It's the foundation for smarter pricing and healthier margins.
With Cin7, you're not stuck calculating COGS in the dark. Our IMS gives you real-time visibility into your stock and financials. It automates COGS calculations and tracks landed costs, like freight, duties, and fees, so your margins include every cost.
It also syncs with QuickBooks and Xero, so your books stay in step with your stock. Ready to see your true margins? Get a demo.