Cost of Goods Sold (COGS): What It Is, How to Calculate It, and Why It Matters for Your Business
You just wrapped up a great quarter of sales, but when you look at your bank account, the numbers don't match your expectations. Where did all that revenue go? The answer often lies in a single line item that many small business owners overlook or miscalculate: cost of goods sold.
Cost of goods sold (COGS) is one of the most important numbers in your financial statements. It directly determines your gross profit, affects your tax bill, and reveals whether your products are actually making money. Yet it's also one of the most frequently misunderstood metrics, with errors ranging from including the wrong expenses to using an inventory method that doesn't match your business reality.
Here's everything you need to know about COGS — what it includes, how to calculate it, and how to avoid the mistakes that cost businesses real money.
What Is Cost of Goods Sold?
Cost of goods sold represents the total direct costs of producing or purchasing the goods your business sold during a specific period. It captures only the expenses directly tied to creating or acquiring your products — not every cost your business incurs.
Think of it this way: if a cost would disappear entirely if you stopped producing or purchasing products, it's probably part of COGS. If the cost would remain even with zero production, it likely belongs elsewhere on your income statement.
COGS appears on your income statement and is subtracted from revenue to calculate gross profit:
Revenue - Cost of Goods Sold = Gross Profit
This makes COGS a critical driver of profitability. A company with $500,000 in revenue and $350,000 in COGS has a gross profit of $150,000, leaving that amount to cover operating expenses, taxes, and net income. If COGS climbs to $400,000 with the same revenue, gross profit drops to $100,000 — a 33% decline that could turn a profitable business into a struggling one.
What Costs Go Into COGS?
Understanding what belongs in COGS — and what doesn't — is essential for accurate financial reporting and tax filing.
Costs to Include
- Raw materials — The physical inputs used to manufacture your products
- Wholesale purchase prices — What you pay to acquire finished goods for resale
- Direct labor — Wages for workers directly involved in production or assembly (factory workers, not office staff)
- Manufacturing overhead — Utilities, rent, and maintenance for production facilities
- Packaging materials — Boxes, labels, wrapping, and containers used to package products for sale
- Freight-in costs — Shipping costs to get raw materials or inventory to your location
- Production supplies — Tools, safety equipment, and consumables used in manufacturing
- Subcontractor costs — Payments to third parties for production work
Costs to Exclude
- Sales and marketing expenses — Advertising, promotions, and sales team salaries
- Administrative overhead — Office rent, management salaries, accounting fees
- Distribution costs — Shipping products to customers (this is a selling expense)
- Research and development — Costs to design new products (these are operating expenses)
- Interest and financing — Loan interest and financing charges
A common mistake is lumping administrative costs into COGS. Your office rent, for example, is not part of COGS even if you run your business from the same building where products are made. Only the portion of rent attributable to the production area counts.
The COGS Formula
The standard formula for calculating COGS is straightforward:
Beginning Inventory + Purchases During the Period - Ending Inventory = COGS
Let's break this down with an example.
Example: A Candle-Making Business
Say you run a small candle-making business and want to calculate COGS for the first quarter of 2026.
- Beginning inventory (Jan 1): $12,000 in finished candles and raw materials (wax, wicks, fragrance oils, jars)
- Purchases during Q1: $28,000 in additional raw materials and supplies
- Ending inventory (Mar 31): $9,000 in remaining finished candles and materials
COGS = $12,000 + $28,000 - $9,000 = $31,000
This means your direct production costs for candles sold in Q1 were $31,000. If you generated $55,000 in revenue during the same period, your gross profit was $24,000 — a gross margin of about 43.6%.
Example: A Retail Clothing Store
For a retailer, the calculation works similarly but focuses on purchase prices rather than raw materials.
- Beginning inventory (Jan 1): $45,000 in clothing
- Purchases during Q1: $60,000 in new inventory from suppliers
- Ending inventory (Mar 31): $38,000 in unsold clothing
COGS = $45,000 + $60,000 - $38,000 = $67,000
Inventory Valuation Methods
When you purchase inventory at different prices throughout the year — which is almost always the case — you need a consistent method for determining which costs to assign to units sold. The IRS recognizes three primary methods.
FIFO (First In, First Out)
FIFO assumes the oldest inventory items are sold first. In periods of rising prices, FIFO results in lower COGS (because you're "selling" the cheaper, older items) and higher reported profit.
Best for: Businesses where inventory actually moves in order (perishable goods, fashion retail) or those wanting to report higher income on financial statements.
LIFO (Last In, First Out)
LIFO assumes the newest inventory is sold first. During inflation, LIFO produces higher COGS (because the more expensive, recent purchases are matched to sales) and lower taxable income.
Best for: Businesses looking to minimize current tax liability during periods of rising costs. Note that LIFO requires filing IRS Form 970 and is not permitted under IFRS (International Financial Reporting Standards).
Weighted Average Cost
This method calculates the average cost per unit across all inventory available during the period, then applies that average to units sold.
Best for: Businesses with large volumes of similar items where tracking individual costs is impractical (hardware stores, commodity goods, bulk supplies).
Choosing a Method
Once you choose an inventory valuation method, you must use it consistently. Switching methods requires filing IRS Form 3115 (Application for Change in Accounting Method). Choose based on your business reality, not just tax optimization — an inventory method that doesn't reflect how your goods actually flow can create accounting headaches and audit risk.
COGS for Service Businesses
If you run a service-based business — consulting, design, software development — you might wonder whether COGS applies to you. Technically, service businesses don't have COGS in the traditional sense because they don't sell physical products.
However, many service businesses track an equivalent metric called cost of services or cost of revenue. This includes:
- Direct labor costs for service delivery
- Subcontractor fees
- Software licenses or tools used exclusively for client work
- Travel expenses directly tied to client projects
Tracking these costs separately from general overhead gives you the same analytical benefit: understanding how much it actually costs to deliver what you sell and whether your pricing generates adequate margins.
COGS and Your Taxes
COGS is a fully deductible business expense, which means accurate calculation directly affects your tax bill. Here's what you need to know about tax reporting.
Where to Report COGS
- Sole proprietors and single-member LLCs: Report COGS on Schedule C (Form 1040), Part III
- Partnerships: Use Form 1125-A, attached to Form 1065
- S corporations: Use Form 1125-A, attached to Form 1120-S
- C corporations: Use Form 1125-A, attached to Form 1120
Small Business Taxpayer Exception
If your average annual gross receipts over the prior three tax years are $31 million or less (adjusted annually for inflation), you may qualify as a small business taxpayer. This provides a significant simplification: you can potentially deduct inventory costs when paid rather than tracking beginning and ending inventory values. This exception eliminates the need for complex inventory accounting methods for many small businesses.
Section 263A: Uniform Capitalization Rules
Businesses that produce property or purchase goods for resale may need to capitalize certain indirect costs into inventory under Section 263A. These include warehouse costs, purchasing department expenses, and handling costs. Small business taxpayers (under the gross receipts threshold) are generally exempt from these rules.
Common COGS Mistakes to Avoid
1. Including Personal or Non-Production Costs
One of the most frequent errors is counting personal purchases or general business expenses as COGS. A new laptop for your office is a depreciable asset, not a COGS item — even if you use it to manage inventory. Only include costs directly tied to producing or acquiring goods for sale.
2. Inaccurate Inventory Counts
Your COGS calculation is only as good as your inventory numbers. If your beginning or ending inventory values are off, your COGS will be wrong too. Physical inventory counts should be performed regularly, and significant discrepancies should be investigated — not ignored.
3. Forgetting Inventory Adjustments
Inventory shrinkage from theft, damage, or spoilage needs to be accounted for. If 500 units of product were damaged in storage, failing to write them down inflates your ending inventory and understates COGS, which overstates your gross profit and potentially your tax liability.
4. Mixing Up Inventory Methods
Once you've elected an inventory valuation method, apply it consistently. Some business owners inadvertently apply FIFO to some products and average cost to others, creating inconsistencies that are difficult to reconcile and can raise red flags during an audit.
5. Overlooking Direct Labor
If you have employees who work directly on producing your products, their wages and related costs (payroll taxes, workers' compensation for production staff) belong in COGS. Omitting these costs understates your COGS and overstates your taxable income — meaning you're paying more tax than necessary.
6. Recording COGS in the Wrong Period
COGS must be matched to the period in which the related revenue is recognized. If you purchased inventory in December but sold it in January, the cost belongs in January's COGS, not December's. This matching principle is fundamental to accurate financial reporting.
How to Reduce Your COGS
Lowering COGS directly improves your gross profit margin. Here are practical strategies:
Negotiate with suppliers. Even small discounts on raw materials add up over time. Ask about volume discounts, early payment terms, or long-term contracts that lock in favorable pricing.
Reduce waste. Track material waste rates and identify where production inefficiencies occur. Even a 5% reduction in raw material waste on a $200,000 annual materials budget saves $10,000.
Optimize your supply chain. Consolidate shipments, find closer suppliers, or adjust order quantities to minimize freight costs. Freight-in is part of COGS, so logistics improvements flow directly to your bottom line.
Improve production efficiency. Better training, improved equipment maintenance, and streamlined processes reduce the labor hours required per unit produced.
Review your pricing. Sometimes the most effective way to improve margins is to raise prices strategically — especially if your COGS analysis reveals that certain products have unacceptably thin margins.
Using COGS to Make Better Business Decisions
Beyond tax reporting, COGS is a powerful analytical tool. Track it consistently and you can:
- Identify your most profitable products by comparing gross margins across product lines
- Spot cost trends — rising COGS as a percentage of revenue signals pricing pressure or production inefficiency
- Set appropriate prices by understanding your true cost floor for each product
- Forecast profitability when planning new product launches or expansion
- Benchmark against industry standards to see whether your production costs are competitive
A healthy gross margin varies by industry. Retail businesses typically operate with 25-50% gross margins, manufacturing ranges from 20-35%, and software companies often exceed 70%. If your margins fall significantly below industry norms, your COGS analysis can pinpoint where costs are out of line.
Streamline Your COGS Tracking and Financial Records
Accurate COGS calculation starts with organized, reliable financial records. Whether you're tracking inventory for a growing product line or reconciling costs across multiple suppliers, Beancount.io offers plain-text accounting that gives you complete transparency and control over your financial data — every cost, every transaction, fully auditable and version-controlled. Get started for free and build a financial system that makes COGS tracking and tax reporting straightforward.
