Guide

Cost of goods sold: what it is and how to calculate

Learn how cost of goods sold helps you track profit and how to calculate it.

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 Friday 17 April 2026

Table of contents

Key takeaways

  • Calculate your COGS using the right formula for your business type: retailers use beginning inventory plus purchases minus ending inventory, while manufacturers add up raw materials, labour, and freight costs.
  • Use COGS as your minimum price floor, since you must charge more than your direct production costs to make a profit, and revisit your prices whenever supplier costs rise.
  • Track COGS at least monthly to catch cost increases early, protect your gross profit margins, and claim accurate tax deductions with the right documentation in place.
  • Negotiate with suppliers regularly by scheduling quarterly price reviews, requesting volume discounts, and comparing multiple suppliers to reduce your per-unit costs without cutting product quality.

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. Knowing your COGS helps you set profitable prices and calculate your true margins.

COGS typically includes these direct production costs:

  • 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

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

COGS excludes indirect business expenses:

  • 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 and often add up all the costs on their product's journey to the customer. 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.

Use Xero to track your COGS, manage your expenses, and keep on top of your inventory.

What's included in COGS?

COGS covers only the direct costs of making or buying your products. The key test is whether a cost would disappear if you stopped producing.

Direct costs that belong in COGS:

  • direct materials: the raw materials that become part of your final product
  • direct labour: wages for staff who physically make the product
  • manufacturing overheads: production-related costs like factory rent or utilities

Indirect costs that belong in operating expenses:

  • marketing and advertising
  • salaries for sales staff and office workers
  • general office expenses

Learn more about operating expenses.

How to calculate COGS

To calculate COGS, use the formula that matches your business type. Retailers track inventory changes, while manufacturers add up production costs.

Choose the method below that fits your business model.

Retail COGS formula

The formula components are:

  • beginning inventory: the value of stock at the start of the period
  • purchases: the cost of inventory acquired during the period
  • ending inventory: the value of stock remaining at the end of the period

This method tracks inventory value changes rather than individual sales. It automatically accounts for discarded, damaged, or unsold inventory, giving you a more accurate picture of your true costs.

Manufacturing COGS formula

The formula components are:

  • raw materials: the direct materials used to produce goods
  • manufacturing costs: labour and production expenses
  • storage costs: warehousing and inventory holding expenses
  • freight: shipping costs for incoming materials or final delivery

In Xero, you can find your COGS in the profit and loss report under your income statement.

Examples of COGS

These examples show how COGS calculations work in practice.

Retail example: A clothing retailer starts the quarter with $10,000 in inventory, purchases $25,000 in new stock, and ends with $8,000 remaining.

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

The retailer sold $27,000 worth of inventory during the quarter.

Manufacturing 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.

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

This represents the total cost to produce and deliver the furniture sold.

Why COGS is important for small businesses

COGS is important because it determines your pricing strategy and profitability. Understanding your true costs ensures you price products competitively while maintaining healthy margins.

Small businesses often face these COGS challenges:

  • hidden costs: storage, shipping, transaction fees, and stock shrinkage add up
  • scaling costs: moving from home-based to dedicated facilities increases expenses
  • cost creep: rising supplier prices erode margins when not monitored

Tracking COGS helps you spot cost increases early so you can adjust prices before your profits drop. It also helps you make better business decisions across several areas.

Pricing

COGS sets your minimum price floor. You must charge more than your COGS to make a profit. When material costs rise by 10 per cent, you know exactly how much to increase prices to protect your margins.

Profitability

Every dollar you save in COGS goes straight to your gross profit. Poor cost control can significantly reduce your markups. One study found a business's markup dropped to 50 per cent below benchmark, directly cutting into profit.

Inventory management

Analysing COGS reveals how well you manage your inventory. A low stock turn rate of 2.3 compared to a benchmark of 3.5 means you have too much stock sitting idle. Use this insight to adjust your stock levels and product range.

Taxes

COGS is tax-deductible as a business expense. When you track and document all COGS components accurately, you can claim more deductions and have the right records ready for audits.

Find out how your local tax authority handles COGS.

Understanding your financial health

Understanding COGS helps you calculate accurate profit margins. Your gross profit margin shows what percentage of revenue remains after covering direct costs. Tracking this over time helps you build a more secure, predictable business.

Strategic decision-making

Tracking COGS closely supports better strategic decisions. With accurate cost data, you can evaluate whether to launch new products, invest in automation, or change distribution methods. Xero's analytics tools help you turn COGS data into useful information you can act on.

COGS and different business models

Different business types calculate COGS differently based on how they create value.

  • manufacturers: include production costs and often add indirect costs like material handling
  • retailers: calculate COGS using beginning and ending inventory values for a period
  • service businesses: focus primarily on labour costs to deliver services

Tips for managing and reducing COGS

Reducing your COGS directly increases your profit margins. These proven strategies help you lower costs without sacrificing quality.

Negotiate with suppliers

Use these negotiation tactics to reduce supplier costs:

  • schedule regular price reviews: hold quarterly discussions to secure better rates
  • request volume discounts: use long-term contracts and bulk orders to reduce per-unit costs
  • run competitive bidding: compare multiple suppliers to ensure competitive pricing
  • negotiate payment terms: ask for early payment discounts or extended payment periods

Get expert support for your business finances

Ready to take control of your costs and improve your profit margins? Xero's accounting software helps you track COGS, manage inventory, and make smarter business decisions. Try Xero free for 30 days to see how easy it is to keep your finances on track.

FAQs on cost of goods sold

Here are answers to common questions about COGS and how to calculate it.

What's the difference between COGS and operating expenses?

COGS includes only the direct costs of producing or purchasing the goods you sell, such as raw materials, direct labour, and manufacturing overheads. Operating expenses are the indirect costs of running your business, such as rent, marketing, and administrative salaries. COGS appears on your income statement before gross profit, while operating expenses appear after gross profit.

How often should I calculate COGS?

Calculate your COGS at least monthly to stay on top of your costs and pricing. Many businesses calculate COGS monthly for management reporting and quarterly or annually for tax purposes. More frequent calculations help you spot cost increases quickly and adjust your prices before profits decline.

Can service businesses have COGS?

Yes, service businesses can have COGS if they incur direct costs to deliver their services. For service businesses, COGS typically includes direct labour costs for staff delivering the service, along with any materials or supplies used directly in service delivery. However, many service businesses have minimal COGS compared to manufacturers or retailers.

What happens if I don't track COGS accurately?

Without accurate COGS tracking, you can't calculate your true profit margins. This can lead to underpricing your products, missing tax deductions, or making poor business decisions based on incomplete financial information. Accurate COGS tracking helps you price competitively while maintaining healthy margins.

How does inventory valuation affect COGS?

The method you use to value inventory (such as FIFO, LIFO, or weighted average) directly affects your COGS calculation. Different valuation methods can produce different COGS amounts, which impacts your reported profit and tax liability. Consult your accountant to choose the best inventory valuation method for your business.

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.