How to Calculate & Understand Cost of Goods Sold

The cost of goods sold, or COGS, is the total cost a business pays to produce or purchase the products it sells. It includes expenses like raw materials and labor tied directly to making a product.
Knowing the cost of goods sold makes it easier for businesses to track profits accurately. Correctly calculating COGS leads to smarter pricing decisions and better cash flow management. Understanding COGS also supports stronger financial reporting and helps avoid tax errors.
What Is Cost of Goods Sold (COGS)?
The cost of goods sold is the money a company spends to produce or buy its products. Knowing the cost of goods sold gives a clearer picture of business performance. In the next sections, we’ll examine whether COGS is an expense and why it matters.
Is COGS an Expense?
Yes, COGS is a direct expense. It shows up on a company’s income statement just below revenue. This placement shows how much it costs to make the products sold during a certain period.
Businesses can calculate gross profit by subtracting COGS from revenue. That’s the first step in understanding how much money a company makes.
Why Is COGS Important?
COGS plays a big role in tracking gross profitability. It tells companies whether their pricing covers production costs.
Understanding COGS also helps set prices, manage costs, and file accurate taxes. Businesses can’t track performance without it, and it’s closely tied to metrics like inventory turnover.
What Is Included in Cost of Goods Sold?
COGS includes the costs directly associated with making or purchasing products. These costs fall into two primary categories: direct costs and, in some cases, limited indirect costs.
Direct Costs
Direct costs are expenses tied to the actual creation of a product. They include raw materials, direct labor, and packaging.
For example, a clothing company’s direct costs might include fabric, thread, and the wages paid to factory workers. Controlling direct costs is essential to profitability, especially in a complex supply chain.
Indirect Costs
Indirect costs aren’t tied to one product and are usually excluded from COGS. These can include rent, office utilities, and salaries for admin staff.
However, if an indirect cost directly supports production, like a factory supervisor’s salary, it may be partly included in COGS. The exact treatment depends on your accounting method.
What Is Not Included in Cost of Goods Sold?
While COGS covers direct production costs, many other expenses don’t qualify. These non-COGS items usually support the business overall, not just product creation. Let’s look at what gets left out and why it matters.
Learn more about returns management and what is order management to see how they impact cost tracking.
Operating Expenses vs. COGS
Operating expenses are the costs of running a business daily, but they aren’t tied to making a product. These include marketing, rent, software tools, and management salaries.
Unlike COGS, which affects gross profit, operating expenses impact net income. Knowing the difference helps businesses analyze profit margins and better control costs.

Common Exclusions from COGS
Many costs are excluded from COGS because they aren’t directly tied to making or buying products. Common examples include:
- Sales commissions
- Office rent
- Insurance
- Administrative salaries
These expenses support the business but don’t change based on how much you produce. A common mistake businesses make is including these in COGS, which can skew profit margins and lead to reporting issues.
How to Calculate Cost of Goods Sold (COGS)
Understanding how to calculate the cost of goods sold helps you keep your finances in check. The formula is simple, but small mistakes can lead to big problems. In this section, we’ll walk through the cost of goods sold formula, calculation steps, and real examples.
COGS Formula
The basic formula for cost of goods sold is as follows:
Beginning Inventory + Purchases – Ending Inventory = COGS
- Beginning Inventory is the value of what you had at the start of the period.
- Purchases include all materials or products bought during the period.
- Ending Inventory is what you have left at the end.
This cost of goods sold equation works for many businesses, including retail and manufacturing.
Steps to Calculate COGS
To calculate cost of goods sold:
- Start with beginning inventory. This is usually last period’s ending inventory.
- Add purchases. Include raw materials, products, and any shipping costs tied to purchases.
- Subtract ending inventory. Take a count of what’s left at the end of the period.
That gives you your COGS for the period.
For accuracy:
- Track inventory closely throughout the year.
- Record every purchase tied to production.
- Use accounting software or inventory tools to reduce errors.
If you skip steps or use incorrect numbers, your gross profit will be off.
Examples of Calculating COGS
Retail Example:
- Beginning inventory: $10,000
- Purchases: $5,000
- Ending inventory: $4,000
- COGS = $10,000 + $5,000 – $4,000 = $11,000
Manufacturing Example:
- Beginning inventory of materials: $20,000
- Purchases (materials/labor): $15,000
- Ending inventory: $5,000
- COGS = $20,000 + $15,000 – $5,000 = $30,000
One common mistake is forgetting to update the ending inventory, especially if items are misplaced or damaged. That leads to inaccurate reporting and tax filings.
Inventory Valuation Methods and COGS
The way a company values its inventory affects the cost of goods sold. Businesses choose different methods based on how they track inventory and market conditions. Let’s break down the four most common approaches.

First-In, First-Out (FIFO)
FIFO describes when the first items you buy will be the first ones you sell. This method is simple and often matches the actual flow of goods.
FIFO is helpful when prices are rising because it uses older, cheaper inventory in COGS. That keeps reported profits higher and makes the business look more profitable on financial statements.
Last-In, First-Out (LIFO)
LIFO assumes the newest items are sold first. This is common in industries with rising costs, like oil or manufacturing.
Using LIFO in inflationary periods increases COGS, which lowers reported profits. While this reduces taxable income, it can also make the business appear less profitable to investors.
Weighted Average Cost
This option averages the cost of all inventory items and applies the same cost to each item sold.
It’s a good choice for companies that deal with large volumes of similar items, like grocery stores or pharmacies. Weighted average cost smooths out price changes but may not reflect real-time market trends.
Special Identification Method
This method tracks each item and its exact cost, so COGS is based on the actual item sold.
It works best for high-value, unique products like cars, luxury goods, or fine jewelry. While it’s accurate, it can be complex to manage, especially without the right inventory system.
Common Mistakes in Calculating COGS
Small errors in calculating COGS can lead to big financial problems. From inventory mix-ups to misclassified expenses, these mistakes hurt your bottom line. Here’s what to watch out for.
Incorrect Inventory Valuation
Using the wrong inventory value can throw off your COGS. Common mistakes include forgetting to update ending inventory or not accounting for lost or damaged goods.
These errors lead to inflated profits or underreported losses, both of which skew financial reporting. To avoid this, use consistent inventory analysis techniques and update records regularly.
Misclassifying Expenses
Mixing up direct and indirect costs is another frequent issue. For example, counting a marketing expense as part of COGS can overstate production costs.
To fix this, train staff on expense categories and use accounting software that tags costs correctly. Regular reviews help keep everything in the right place.
Failing to Track Purchase Costs Accurately
Missing receipts, skipped invoices, or delayed data entry can cause errors in purchase records. Your COGS will be incomplete or incorrect if these costs aren’t tracked.
Keep records organized, automate tracking where possible, and audit regularly. Clean purchase data supports better pricing and more accurate tax filings.
Key Takeaways: Why COGS Matters for Your Business
Understanding and tracking your cost of goods sold is crucial for staying profitable and making smart financial decisions. Here are the main points to remember:
- COGS is essential for accurate profitability tracking
- Always separate direct costs from indirect ones to avoid reporting mistakes
- Choose the inventory valuation method that fits your business model
- Calculate COGS consistently to prevent errors in financial statements
- Conduct regular audits to ensure ongoing accuracy
Want to see how ReverseLogix can help with cost tracking and inventory accuracy? Request a demo or explore ReverseLogix pricing to learn more.