Guide

Cost of goods sold (COGS): definition, formula and tips

Learn how cost of goods sold reveals profit and how to calculate it to price better and control costs.

A person moving their orders to a van full of boxes

Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio

Published Wednesday 18 February 2026

Table of contents

Key takeaways

  • Calculate your COGS using the basic formula: Beginning Inventory + Purchases − Ending Inventory = COGS, adapting this approach based on whether you're a retailer focusing on inventory values or a manufacturer including raw materials, labour, and production costs.
  • Track COGS regularly to make informed pricing decisions that ensure profitability, as understanding these direct costs establishes the baseline you must exceed to generate profit from each sale.
  • Reduce COGS by negotiating better supplier rates, streamlining production processes to eliminate waste, and optimising inventory levels to avoid overstocking and reduce storage costs.
  • Recognise that COGS is a deductible business expense that reduces your taxable income, so maintain accurate documentation of all direct costs including materials, labour, and manufacturing overheads to maximise tax benefits.

What is COGS?

Cost of goods sold (COGS) is the direct cost to produce or purchase the goods you sell. It includes the materials you turn into products and the expenses directly tied to making them.

COGS includes:

  • Direct materials: Raw goods used to create your products
  • Direct labour: Wages for employees who make or assemble products
  • Manufacturing overheads: Factory costs like utilities and equipment maintenance

Some businesses, like ecommerce businesses, also include costs directly tied to selling products:

  • Freight: Shipping costs for incoming materials
  • Storage: Warehousing expenses for inventory
  • Sales commissions: Fees paid per sale
  • Transaction fees: Payment processing costs

COGS doesn't include indirect expenses such as:

  • Rent: Office or retail space costs
  • Marketing: Advertising and promotional expenses
  • Administrative overhead: General office costs
  • Most salaries: Wages for non-production staff

Accounting software can help you track COGS by managing your expenses and inventory.

Why COGS is important for small businesses

COGS directly affects your pricing, profitability, and business decisions. Knowing your true cost to serve customers helps you set competitive prices that still turn a profit.

Materials and labour costs are usually straightforward to calculate. Other costs can trip up new business owners. For example, you might enjoy good margins working from home, but your COGS will jump when you move to dedicated premises.

Monitoring COGS helps you spot what's putting pressure on your profit margins.

COGS helps you make better business decisions in these key areas.

Pricing

COGS establishes the baseline cost you must exceed to make a profit. Understanding your COGS helps you judge how cost fluctuations affect expenses and when to adjust prices.

Profitability

Reducing COGS while maintaining prices directly increases your gross profit margin. Even small improvements can significantly affect your bottom line.

Keep in mind that COGS is just part of your operating expenses. Your operating income also includes costs like wages and depreciation.

Inventory management

Analysing COGS helps you assess inventory efficiency and identify slow-moving items. Use this insight to optimise stock levels, reorder points, and product mix. You'll balance demand while minimising capital tied up in goods.

Taxes

COGS is a deductible business expense that reduces your taxable income, though certain exceptions to the rules may apply for smaller businesses, such as those with under $30 million in gross receipts as of 2024. Tracking and documenting all COGS components makes it easier to maximise deductions and provide audit documents.

Check with your local tax authority for specific COGS requirements.

Understanding your financial health

Understanding COGS is key to calculating your profit margins and building a secure business. By tracking these costs over time, you can identify trends and make adjustments to improve your financial position.

Strategic decision-making

By closely tracking your COGS, 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

The basic COGS formula is: Beginning Inventory + Purchases − Ending Inventory = COGS. Retailers and manufacturers apply this formula differently based on their business model.

Retail COGS formula

Cost of goods sold formula used by retailers for inventory accounting.

Retailers calculate COGS using inventory values at the start and end of each period.

  • Beginning inventory: The value of inventory at the start of the period
  • Purchases: The cost of inventory acquired during the period
  • Ending inventory: The value of inventory remaining at the end of the period

The calculation focuses on inventory value rather than sales numbers. This approach helps account for discarded or damaged 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 and typically add up all costs on their product's journey to the customer.

  • Raw materials: Direct materials used to produce goods
  • Manufacturing costs: Production expenses including labour and equipment
  • Storage costs: Warehousing and inventory holding expenses
  • Freight: Shipping costs for incoming materials or final delivery

Some manufacturers choose not to include warehousing or freight in their COGS calculation.

If you use accounting software like Xero, you can find COGS in the profit and loss (P&L) or income parts of your financial statements.

Examples of COGS

Retail example

A retail business holds $10,000 of inventory at the beginning of the quarter. It buys $25,000 during the quarter and owns $8,000 at the end.

$10,000 + $25,000 − $8,000 = $27,000 COGS

Manufacturing example

A manufacturing business buys $7,000 worth of materials. It spends $3,000 on energy and labour to turn materials into goods, plus $1,200 on shipping.

$7,000 + $3,000 + $1,200 = $11,200 COGS

COGS and different business models

COGS is calculated differently depending on your business model.

  • Manufacturers: Tend to include indirect costs like material handling and factory overhead
  • Retailers: Typically calculate COGS using starting and ending inventory values for a period
  • Service businesses: Often include direct labour costs and materials used to deliver services

COGS accounting methods

Your inventory valuation method directly affects your COGS calculation. For interchangeable goods, International Financial Reporting Standards (IFRS) state that businesses should use either the FIFO or weighted average cost formula.

As you sell inventory, its value transfers from the balance sheet to the income statement as COGS. The method you choose determines which costs are assigned to sold items and which remain in inventory.

FIFO (first in, first out) method

First in, first out (FIFO) assumes 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

Last in, first out (LIFO) assumes the most recently acquired inventory is sold first. This method can lead to higher COGS and lower profits during periods of inflation.

The LIFO method is not permitted under IFRS and is therefore disallowed in many countries outside the United States.

Average cost method

The average cost method uses the weighted average of all inventory costs to value both COGS and ending inventory. It smooths out price fluctuations and provides a middle ground between FIFO and LIFO.

Specific identification method

Specific identification tracks the actual cost of each individual inventory item. This method is used for high-value goods like vehicles or custom products, and according to IFRS guidelines, it applies to any items that are not interchangeable or are designated for a particular project.

While highly accurate, it can be impractical for businesses with large quantities of similar items.

Tips for managing and reducing COGS

Negotiate with suppliers

Regular supplier discussions can help you secure better prices. Consider long-term contracts or bulk purchasing agreements to access volume discounts. Compare rates from multiple suppliers to find the most competitive options.

Streamline production processes

Analysing your production workflow helps you find where processes are inefficient and reduce waste. Consider investing in automation to decrease labour costs and increase output consistency.

Before automating, assess the effects on your COGS and return on investment.

Optimise inventory levels

Analysing your sales data helps you forecast demand and maintain optimal inventory levels. This reduces storage costs and prevents overstocking.

Regularly review your product mix and consider discontinuing slow-moving items that tie up capital.

Reduce freight costs

Exploring alternative shipping methods can significantly lower your COGS. Here are some tactics to consider:

  • Consolidate shipments: Access bulk shipping rates by combining orders
  • Negotiate with carriers: Request volume discounts based on shipping frequency
  • Use third-party logistics: Outsource to providers who can optimise your shipping strategy

How Xero simplifies COGS management

Xero's accounting software helps you track COGS and make confident business decisions.

With Xero, you can:

  • Track expenses in real time: See your costs as they happen
  • Manage inventory: Monitor stock levels and values automatically
  • Generate reports: Access profit and loss statements with COGS breakdowns
  • Connect your bank: Reconcile transactions and spot cost trends quickly

Understanding your COGS helps you set better prices, improve margins, and make data-informed decisions for long-term growth.

Ready to simplify your COGS tracking? Get one month free and see how Xero can help your business.

Need expert help? Find a bookkeeper or accountant through Xero Advisors.

FAQs on cost of goods sold

Here are answers to common questions about COGS.

What's the difference between COGS and operating expenses?

COGS covers the direct costs of creating or purchasing products you sell. Operating expenses are the indirect costs of running your business, like rent, marketing, and administrative salaries. COGS appears above gross profit on your income statement, while operating expenses appear below it.

What is the difference between cost of goods sold and cost of sales?

These terms often mean the same thing. COGS focuses specifically on direct costs of creating or purchasing products. Cost of sales (COS) may include those costs plus additional revenue-related expenses like transaction fees, sales commissions, or customer acquisition costs.

How often should I calculate COGS?

Most businesses calculate COGS at the end of each accounting period, whether monthly, quarterly, or annually. If you have high inventory turnover, calculate more frequently for better visibility into profitability. Talk to your accountant for advice specific to your business.

Can I estimate my COGS?

Yes, estimates are acceptable when you're starting out or have limited resources. As your business grows, track COGS accurately. It directly affects your profitability and taxes. Accounting software makes precise tracking easier.

My business is service-based. Do I still have COGS?

Yes, service businesses have COGS too. While you're not selling physical products, your COGS can include direct labour costs, software subscriptions, and materials used to deliver your services.

Are salaries included in COGS?

It depends on the role. Wages for employees who directly produce goods or deliver services are included in COGS. Salaries for administrative staff, sales teams, and management are typically classified as operating expenses, not COGS.

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.