Guide

Cost of goods sold: What it is and how to calculate COGS

Cost of goods sold affects your profit margins and tax obligations. Learn how to calculate COGS accurately.

A person moving their orders to a van full of boxes

Written by Jotika Teli—Certified Public Accountant with 24 years of experience. Read Jotika's full bio

Published Friday 7 November 2025

Table of contents

Key takeaways

• Calculate COGS using the appropriate formula for your business type—retailers should use beginning inventory plus purchases minus ending inventory, while manufacturers should include raw materials, manufacturing costs, storage, and freight expenses.

• Track COGS regularly to set profitable pricing above your direct production costs and identify when price adjustments are needed to maintain healthy profit margins.

• Reduce COGS by negotiating volume discounts with suppliers, streamlining production processes to eliminate waste, and optimising inventory levels to avoid overstocking slow-moving items.

• Choose the right inventory valuation method (FIFO, LIFO, or average cost) as it directly impacts your reported COGS, profits, and tax obligations, with FIFO typically showing lower COGS during inflationary periods.

What is COGS?

Cost of goods sold (COGS) is the direct cost to produce or purchase the goods you sell. It includes all expenses directly tied to creating your products, from raw materials to manufacturing labour.

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

COGS includes direct materials, direct labour, and manufacturing overheads, such as:

  • Direct materials
  • Direct labour
  • Manufacturing overheads

What cost of goods sold includes

  • using direct materials and raw materials
  • paying direct labour costs
  • covering manufacturing overheads
  • including freight and storage if directly related to production
  • adding transaction fees for some business models

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.

What COGS excludes:

  • paying rent and utilities
  • running marketing and advertising
  • covering general administrative costs
  • paying most salary expenses

Use accounting software to track your cost of goods sold, manage your expenses, and control your inventory.

How to calculate COGS

COGS calculation varies by business type to accurately reflect your specific costs and inventory flow. Retailers focus on inventory turnover, while manufacturers include production costs.

Retailers use this cost of goods sold formula 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

Why this formula works:

  • Focuses on inventory value changes rather than individual sales
  • Accounts for discarded or damaged inventory automatically
  • Reflects actual cost flow through your business

Manufacturers add up all the costs involved in getting their products to customers. Some businesses do not include warehousing or freight in their cost calculations.

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 cost of goods sold in the profit and loss or income sections of your financial statements.

Examples of COGS

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

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 labour, turning it into goods, plus $1,200 on shipping.

The equation is:

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

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 helps you set profitable prices by revealing your true production costs. Understanding these costs prevents common pricing mistakes that hurt profitability.

Common COGS challenges for small businesses:

  • Hidden costs emerge as you scale – home-based operations have lower costs than dedicated facilities
  • Indirect costs get overlooked – warehousing, handling, and freight add up quickly
  • Seasonal variations affect margins – material costs fluctuate throughout the year

COGS also helps you make better business decisions in four key areas.

Pricing

COGS determines your minimum profitable price – you must price above these costs to generate profit. Track COGS changes to know when price adjustments are needed to maintain margins.

Profitability

Lower COGS equals higher profits when you maintain the same selling prices. Small COGS reductions create significant profit improvements because they directly impact your gross margin.

COGS affects gross profit, but your net profit also depends on operating expenses like wages and depreciation.

Inventory management

Analysing your cost of goods sold helps you assess inventory efficiency and spot slow-moving items. This insight helps you optimise stock levels, reorder points, and your product mix. Some industries, such as oil and gas, may hold inventory for security reasons, often representing a minimum of 90 days of sales.

Taxes

Cost of goods sold is a deductible business expense. Track and document all components to maximise deductions and provide the right audit documents. Incorrect valuations can attract additional tax provisions.

Understanding your financial health

Understanding COGS is key to calculating your profit margins to build a secure business.

Strategic decision-making

By tracking your cost of goods sold, you can make better decisions. Cost of goods sold gives you the context for strategic financial analysis, helping you decide whether to invest in new product lines, automation, or new distribution methods.

Tips for managing and reducing COGS

Negotiate with suppliers

Supplier negotiation strategies:

  • Regular price reviews – schedule quarterly discussions to secure better rates
  • Volume discounts – negotiate bulk purchasing agreements for consistent savings
  • Alternative suppliers – research competitive options to maintain pricing leverage

Streamline production processes

Analyse your production workflow to identify inefficiencies and reduce waste. Consider investing in automation to decrease labour costs and increase output consistency, but assess the effects on cost of goods sold and return on investment.

Optimise inventory levels

Use data to forecast demand and 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. Consolidate shipments to access bulk shipping rates. Negotiate with carriers for volume discounts or use a third-party logistics provider to optimise your shipping.

COGS accounting methods

The way you value your inventory changes your cost of goods sold and directly affects your reported profits. Different methods assign different costs to sold items and remaining inventory.

How it works: When you sell inventory, its value moves from your balance sheet to COGS on your income statement.

FIFO (first in, first out) method

The first in, first out (FIFO) method assumes you sell your oldest inventory first. This matches how most businesses move products and leads to lower cost of goods sold during inflation, increasing reported profits.

LIFO (last in, first out) method

The last in, first out (LIFO) method assumes the most recently acquired inventory is sold first. This can lead to higher cost of goods sold and lower profits during periods of inflation. LIFO is not permitted under International Financial Reporting Standards (IFRS) cost-accounting principles and is disallowed in many countries outside the United States, as the International Accounting Standards Board decided to eliminate the allowed alternative of using the LIFO method.

Average cost method

This method uses the weighted average inventory costs of individual items to value both cost of goods sold 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 works best for high-value items. It can be impractical for businesses with large quantities of similar items.

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?

Cost of goods sold is the direct costs of creating products while operating expenses are the indirect costs of running the business, such as rent, marketing, staff, and so on.

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

These are often used interchangeably. However, cost of goods sold 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, such as transaction fees, sale commissions, or acquisition costs in some digital businesses.

How often should I calculate COGS?

You should calculate cost of goods sold at the end of each accounting period—monthly, quarterly, or annually. If you have high inventory turnover, calculate it more often for a better view of profitability. Talk to your accountant for advice specific to your business.

Can I estimate my COGS?

Yes, you can use estimates, especially if you are a new business or have limited resources. As your business grows, track cost of goods sold accurately because 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 cost of goods sold. While you are not selling physical goods, cost of goods sold can include the labour costs, software subscriptions, or materials you use to deliver the service.

Understanding and managing your COGS is crucial for your business's success. COGS directly affects your pricing strategies, profitability, inventory management, tax calculations, and overall decision-making processes.

Calculating and managing cost of goods sold can be complex. Xero accounting software gives you real-time reporting, detailed analytics, efficient expense management, and comprehensive inventory management. This simplifies your cost of goods sold management and gives you more insight into your costs. Try Xero for free to see how it can help you track your cost of goods sold.

By tracking and optimising your cost of goods sold, you can boost your profit margins and make informed business decisions that improve your long-term financial health.

Need a bookkeeper or accountant near you? Use the Xero advisor directory to find one in your area.

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.