Understanding and calculating Cost of Goods Sold (COGS)
What cost of goods sold is, how to calculate it and why it's important for your business.

Published Friday 11 July 2025
What is COGS?
Table of Contents
Key takeaways
- COGS includes direct production costs for producing goods, such as the cost of materials, labor, and manufacturing. It doesn’t include operational and other indirect costs, like rent and marketing.
- Retailers and manufacturers use different formulas for calculating COGS. Retailers generally focus on inventory while manufacturers usually include a broader range of production-related costs, like manufacturing a product.
- While COGS helps you identify and manage production expenses, you’ll need to use other metrics as well (like gross profit margin and cost of sales) for a more complete picture of your business’s financial health.
- Understanding how COGS affects your business helps you boost your business’ overall efficiency (including by managing your inventory and minimizing capital tied up in goods), set competitive prices and stay profitable.
What is COGS?
COGS is the direct cost to produce or purchase the goods you sell, or the materials you turn into goods.
COGS includes:
- Direct materials
- Direct labor
- Manufacturing overheads
Some businesses, like ecommerce businesses, also include things like freight, storage, sales commissions, or transaction fees if they relate to the costs of selling products.
COGS doesn’t include indirect expenses, such as rent, marketing, general administrative overhead, and (often) salaries.
Tracking COGS requires accounting software for running your business and managing your expenses and inventory.
Why COGS is important for small businesses
A business needs to know the true cost of serving its customers to settle on a competitive and profitable markup.
While materials and labor costs are typically easy to figure out, other costs can trip up those just starting out. For example, small business owners who start by using their home as a production facility or warehouse may enjoy good margins, but their COGS will jump when they upgrade to dedicated manufacturing or warehousing premises.
Monitoring COGS helps business owners identify and address the things that put pressure on their profit margins.
COGS also helps you make better business decisions in four key areas.
Pricing
COGS is fundamental in setting product prices and establishing the baseline costs that you must exceed to make a profit. Understanding COGS helps you more easily judge how cost fluctuations affect expenses and when to adjust prices.
Profitability
COGS is directly related to gross profit margin. Reducing COGS while maintaining prices increases gross profit. Even small improvements can significantly affect business profitability.
Keep in mind that COGS is just part of your operating expenses – your operating income also includes expenses like wages and depreciation.
Inventory management
Analysis of COGS helps you assess your inventory efficiency and identify slow-moving items. This insight helps you optimize your stock levels, reorder points, and product mix to balance demand while minimizing the capital tied up in goods.
Taxes
COGS is a deductible business expense. Tracking and documenting all the components of COGS makes it easier to maximize deductions and provide the necessary audit documents.
Understanding your financial health
Understanding COGS is key to calculating your profit margins to build a secure business.
Strategic decision-making
With a close eye on COGS accounting, you can make better decisions. COGs gives you the context for strategic financial analysis to inform decisions like investing in new product lines, automation, or new distribution methods.
How to calculate COGS
There are two ways to calculate COGS – one more commonly used by retailers, the other by manufacturers.
Retail COGS formula
Cost of goods sold formula used by retailers for inventory accounting.
Where:
- Beginning inventory is the value of inventory at the start of the period
- Purchases is the cost of inventory acquired during the period
- Ending inventory is the value of inventory remaining at the end of the period
You’ll see the COGS calculation does not reference the number of sales – it focuses on the value of inventory at the beginning and end of the sales period instead. Doing it this way helps account for discarded inventory.
Manufacturing COGS formula
Manufacturers have more complex supply chains. It makes sense for them to add up all the costs on their product’s journey to the customer. Be aware that some choose not to count warehousing or freight.
Manufacturers have more complex supply chains. It makes sense for them to add up all the costs on their product’s journey to the customer. Be aware that some choose not to count warehousing or freight.
Where:
- Raw materials: the direct materials used to produce goods
- Manufacturing costs: costs of production
- Storage costs: expenses from inventory storage
- Freight: any shipping costs for incoming materials or final delivery
If you use accounting software like Xero, you can find COGS in the P&L/income parts of your financial statements.
COGS accounting methods
The method you use to value inventory directly affects the COGS calculation. As you sell inventory, its value transfers from the balance sheet to the income statement as part of the cost of goods sold. The inventory valuation methods you choose then determine which costs are assigned to sold items and which remain in inventory.
The FIFO (first in, first out) method
FIFO assumes that you sell your oldest inventory items first – a method that often results in a COGS that closely matches the physical flow of goods. When prices rise, FIFO typically leads to a lower COGS and higher reported profits.
The LIFO (last in, first out) method
LIFO assumes the inventory you most recently acquired is sold first. This can lead to higher COGS and lower profits during periods of inflation. LIFO isn’t permitted under International Financial Reporting Standards (IFRS) cost-accounting principles and many countries outside the United States don’t allow it.
The average cost method
This method of cost accounting uses the weighted average inventory costs of individual items to value both COGS and your ending inventory. It smooths out price fluctuations and is a middle ground between FIFO and LIFO.
Specific identification method
This method of expense tracking looks at the actual cost of each inventory item. It's typically used for high-value items. While accurate, it can be impractical for businesses that sell lots of similar items.
Examples of COGS
A retail business holds $10,000 of inventory at the beginning of the quarter, and it buys $25,000 during the quarter. At the end, it owns $8,000.
The equation is:
$10,000 + $25,000 − $8,000 = $27,000
A manufacturing business buys $7,000 worth of materials and spends $3,000 of energy and labor, turning it into goods, plus $1,200 on shipping.
The equation is:
$7,000 + $3,000 + $1,200 = $11,200
COGS vs cost of revenue
Although cost of revenue (CoR) and COGS both reflect the costs of producing products or services, they differ in the types of costs they encompass.
- COGS includes only the direct costs of producing goods, like materials, labor, and manufacturing expenses. Businesses involved in manufacturing or retail typically use COGS because production expenses are easy to track.
- CoR includes both direct costs and some indirect costs needed for generating business revenue, like variable costs for things like distribution, marketing, and the delivery of products or services to customers.
- CoR gives you insights into your cost structure and a more complete view of what it costs to bring your products or services to market. It’s therefore more commonly used by services businesses and companies with many indirect or variable costs as well as fixed costs.
COGS vs operating expenses
Operating expenses and COGS can seem the same thing. While they both reflect business costs and are necessary for understanding your business’s financial position, they cover different costs and help you understand different areas of your cost structure.
- COGS is tied to the direct costs of producing or purchasing goods that customers buy, like inventory, raw materials for manufacture, and people working on manufacturing goods or delivering services.
- Operating expenses (OpEx) cover a range of expenses beyond manufacturing costs that are essential for the business to run – like rent, the power bill, marketing expenses, and office supplies.
COGS directly affects your business’s gross profit since you’re subtracting it from your business income (IRS website) to calculate the gross margin. It therefore helps you monitor production costs and gauge your profitability.
However, operational costs get subtracted from your gross profit to determine your operating income – also known as your earnings before interest and tax (EBIT) – to reflect the cost of managing and running your business overall.
Tips for managing and reducing COGS
Negotiate with suppliers
Have regular discussions with your suppliers to secure better prices. Consider long-term contracts or bulk purchasing agreements to leverage volume discounts, and don't hesitate to look for other suppliers who offer more-competitive rates.
Streamline production processes
Analyze your production workflow to identify inefficiencies and reduce waste. Consider investing in automation to decrease labor costs and increase output consistency (but you’ll need to assess the effects on COGS and ROI).
Optimize inventory levels
Use data analytics to accurately forecast demand so you can keep inventory levels optimal. Regularly review your product mix and consider discontinuing slow-moving items.
Reduce freight costs
Explore alternative shipping methods that balance cost and delivery time. For example, by consolidating shipments you can access bulk shipping rates. Try negotiating with carriers for volume discounts or think about a third-party logistics provider to optimize your shipping strategy.
Limitations of COGS
While COGS is a valuable insight into the direct costs of producing goods or services, its narrow focus gives you only a partial view of your business’s financial performance.
COGS excludes factors that affect your business’s financial health
If you look at COGS in isolation your business can seem more profitable than it really is. This is because COGS excludes indirect costs (like marketing, rent, and administrative expenses) and operating expenses – both of which strongly affect your business’s profitability.
So while COGS helps you track production expenses, it can’t give you insights into other areas of your finances, like your total overhead, sales expenses, or any inefficient processes – potentially misleading you on your business's financial health.
Use COGS with other metrics for a complete financial health picture
Metrics like your gross profit margin, operating income, and even the cost of sales factor in both direct and indirect costs, and clarify your profitability and operational efficiency. Use them alongside COGS to help you make more informed decisions about pricing, inventory and cost management, and strategies for business growth.
FAQs about COGs
Review these frequently asked questions about COGs to better understand how they apply in your small business:
Can I reduce my COGS without affecting the quality of my products?
Yes, you can. Improve your processes and production efficiency, minimize waste, use more cost-effective materials, to reduce COGs while maintaining your product standards. You can also negotiate cheaper arrangements with your suppliers to bring down your direct costs.
What is the difference between cost of goods sold and cost of sales?
These are often used interchangeably. However, COGS focuses on the direct costs of creating or purchasing products that are sold. Cost of Sales (COS) sometimes includes those costs plus additional business expenses linked to revenue generation, like transaction fees, sale commissions, or acquisition costs in some digital businesses.
How often should I calculate COGS?
Generally, businesses calculate COGS at the end of each accounting period (monthly, quarterly, or annually). Businesses with high inventory turnover may calculate it more often for a better view of profitability. Talk to your accountant for specific advice for your business.
Can I estimate my COGS?
Yes, you can use estimates, especially if you're a new business or have limited resources. As your business grows, you’ll want to track COGs accurately as it directly affects your profitability and taxes. Accounting software can help.
My business is service-based. Do I still have COGS?
Yes, even service businesses have COGS. While you’re not selling physical goods, COGS can include the labor costs, software subscriptions, or materials you use to deliver the service.
Are salaries included in COGS?
Yes, even service businesses have COGS. While you’re not selling physical goods, COGS can include the labor costs, software subscriptions, or materials you use to deliver the service.
Master COGS for better business decisions with Xero
Calculating and managing COGS can be complex, so it helps if you know something about bookkeeping. Ask your bookkeeper or accountant for advice – you can find one in Xero’s advisor directory.
Accounting software like Xero can help, too. It gives you real-time reporting and detailed analytics to help you track and optimize COGS and make data-informed decisions that improve your business’s financial health. It also has automations to help you whizz through your financial admin and manage your expenses and inventory efficiently.
Disclaimer
Xero does not provide accounting, tax, business or legal advice. This guide has been provided for information purposes only. You should consult your own professional advisors for advice directly relating to your business or before taking action in relation to any of the content provided.
Start using Xero for free
Access Xero features for 30 days, then decide which plan best suits your business.