Cost of Goods Sold: What It Is & How To Calculate COGS
Cost of goods sold impacts your profit margins and tax obligations. Learn how to calculate COGS accurately.

Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio
Published Wednesday 26 November 2025
Table of contents
Key takeaways
• Calculate COGS using the appropriate formula for your business model—retailers should use beginning inventory plus purchases minus ending inventory, while manufacturers should add raw materials, manufacturing costs, storage, and freight expenses.
• Track all direct costs including materials, labour, and manufacturing overheads in your COGS calculation, but exclude indirect expenses like rent, marketing, and administrative salaries which are operating expenses.
• Use COGS as your pricing floor by ensuring you charge more than your cost of goods sold to maintain profitability, and monitor cost increases regularly to adjust prices before margins erode.
• Implement cost reduction strategies such as negotiating volume discounts with suppliers, streamlining production processes to eliminate waste, and optimising inventory levels through demand forecasting to improve your bottom line.
What is COGS?
Cost of goods sold (COGS) is the direct cost to produce or purchase the goods you sell. It represents the actual expenses tied to creating your products, not the overhead costs of running your business.
Cost of goods sold formula used by retailers for inventory accounting.
What COGS includes:
- Direct materials: Raw materials and components used in production
- Direct labour: Wages for employees directly involved in making products
- Manufacturing overheads: Factory costs like utilities and equipment maintenance
- Product-related costs: Freight, storage, and sales commissions directly tied to selling products
What COGS excludes:
- Indirect expenses: Rent, marketing, and general administrative overhead
- Operating costs: Most salaries and business expenses not directly tied to production
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.
Use accounting software to track your COGS, manage your expenses, and keep on top of your inventory.
What's included in COGS?
COGS covers the direct costs of making your products. It generally includes:
- Direct materials: The raw materials that go into your final product.
- Direct labour: The wages for staff who physically make the product.
- Manufacturing overheads: Costs that are directly related to production but not part of the final product, like factory rent or utilities.
COGS does not include: COGS does not cover indirect costs such as marketing, salaries for sales staff, or general office expenses. These are considered operating expenses.
How to calculate COGS
COGS calculation varies by business type because retailers buy finished goods while manufacturers create products from raw materials. Choose the method that matches your business model:
Cost of goods sold formula used by retailers for inventory accounting.
Retail COGS formula
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
Why inventory-based calculation works: This method tracks inventory value changes rather than individual sales, which automatically accounts for discarded, damaged, or unsold inventory. It gives you a more accurate picture of your true costs.
Manufacturers often add up all the costs involved in getting products to customers. Some do not include warehousing or freight.
Manufacturing COGS formula
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 Xero accounting software, you can find COGS in the profit and loss or income sections of your financial statements.
Examples of COGS
Retail COGS example:A clothing retailer starts the quarter with $10,000 in inventory, purchases $25,000 in new stock, and ends with $8,000 remaining.
COGS calculation: $10,000 + $25,000 − $8,000 = $27,000
This means $27,000 worth of inventory was sold during the quarter.
Manufacturing COGS example:A furniture maker spends $7,000 on wood and materials, $3,000 on labour and factory costs, plus $1,200 on shipping finished products.
COGS calculation: $7,000 + $3,000 + $1,200 = $11,200
This represents the total cost to produce and deliver the furniture sold.
COGS and different business models
COGS is calculated differently depending on your business model. For example:
- Manufacturers tend to include certain indirect costs, such as material handling costs
- Retailers often calculate COGS using starting and ending inventory for a period
- Service businesses are more likely to include labour
Why COGS is important for small businesses
COGS determines your pricing strategy and profitability. Understanding your true costs ensures you price products competitively while maintaining healthy margins.
Common COGS challenges for small businesses:
- missing hidden costs such as storage, shipping, transaction fees, and stock shrinkage
- facing higher costs when moving from home-based to dedicated facilities
- losing profit when rising costs are not monitored
Tracking COGS helps you spot cost increases early so you can adjust prices before your profits drop.
COGS also helps you make better business decisions.
Pricing
COGS sets your minimum price floor – you must charge more than your COGS to make a profit. When material costs rise by 10%, you know how much to increase prices to keep your margins.
Profitability
Every dollar you save in COGS increases your gross profit. Poor cost control can reduce your markups; one study showed a business’s markup dropped to 50 per cent below benchmark, which reduced profit.
Inventory management
Analysing COGS helps you see how well you manage your inventory. For example, a low stock turn rate of 2.3, compared to a benchmark of 3.5, means you have too much stock. Use this insight to adjust your stock levels and product range.
Taxes
You can deduct COGS as a business expense. When you track and document all COGS components, you can claim more deductions and provide the right documents for audits.
Understanding your financial health
Understanding COGS is key to calculating your profit margins to build a secure business.
Strategic decision-making
When you track COGS closely, you can make better decisions. COGS gives you the information you need for strategic financial analysis and helps you decide on new products, automation, or distribution methods.
Tips for managing and reducing COGS
Follow these tips to better understand how to properly manage and reduce COGS.
Negotiate with suppliers
Supplier negotiation strategies:
- Regular price reviews: Schedule quarterly discussions to secure better rates
- Volume discounts: Use long-term contracts and bulk orders to reduce per-unit costs
- Competitive bidding: Compare multiple suppliers to ensure competitive pricing
- Payment terms: Negotiate early payment discounts or extended payment periods
Streamline production processes
Review your production process to find and fix waste. For example, one business lost 15% of stock on weekends when managers were not present. You could invest in automation to lower labour costs and make your output more consistent. Check how this affects your COGS and return on investment.
Optimise 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
Find shipping methods for small businesses that balance cost and delivery time. For example, you can consolidate shipments to get bulk rates. You can also negotiate with carriers for volume discounts or use a third-party logistics provider to improve your shipping.
COGS accounting methods
The way you value your inventory affects your COGS and your taxes. Each method assigns costs differently, which changes your reported profits and tax.
How it works: When you sell inventory, its value moves from your balance sheet to your income statement as COGS. The method you use decides which costs go with each sale.
FIFO (first in, first out) method
FIFO assumes that the oldest inventory items are sold first. This method often results in COGS that closely matches the physical flow of goods. When prices are increasing, FIFO typically leads to lower COGS and higher reported profits.
LIFO (last in, first out) method
LIFO assumes the most recently acquired inventory is sold first. This can lead to higher COGS and lower profits during periods of inflation. Note that LIFO is not permitted under International Financial Reporting Standards (IFRS) cost-accounting principles and is not allowed in many countries outside the United States.
Average cost method
This method uses the weighted average inventory costs of individual items to value both COGS and ending inventory. It smooths out price fluctuations and is a middle ground between first in, first out (FIFO) and last in, first out (LIFO).
Specific identification method
This method tracks the actual cost of each inventory item. It's typically used for high-value items. While accurate, it can be impractical for businesses with large quantities of similar items.
Get started with COGS tracking
Understanding your COGS is key to making smart business decisions. But calculating and managing it can be complex. Using accounting software simplifies the process, giving you real-time reports and clear insights into your costs.
When you track your COGS accurately, you protect your profit margins and build a healthier business.
FAQs on cost of goods sold
Here are answers to common questions about cost of goods sold.
What's the difference between COGS and operating expenses?
COGS covers direct production costs – materials, labour, and manufacturing expenses for the products you sell. Operating expenses are indirect costs like rent, marketing, and administrative salaries that keep your business running but don't directly create products.
What is the difference between cost of goods sold and cost of sales?
Cost of Sales (COS) sometimes includes those costs plus other business expenses linked to revenue, such as transaction fees, sales commissions, or acquisition costs in 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, service businesses have COGS. It can include labour, software subscriptions, or materials used to deliver your service.
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.
Get one month free
Purchase any Xero plan, and we will give you the first month free.