Guide

COGS explained: what it is and how to calculate it

Cost of goods sold, or COGS, affects your profit and pricing. Learn 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 COGS using the right formula for your business type: retailers use beginning inventory plus purchases minus ending inventory, while manufacturers add up raw materials, direct labour, and manufacturing overheads.
  • Choose your inventory valuation method carefully, as FIFO, average cost, or specific identification each affect your COGS figure, financial statements, and tax bill differently, and LIFO is not allowed for UK tax purposes.
  • Negotiate with suppliers and streamline production regularly to reduce COGS, since every £1 you cut from these costs adds £1 directly to your gross profit.
  • Track COGS consistently each month to set prices above your direct costs, spot slow-moving stock, and make informed decisions about product mix and business growth.

Key takeaways

• Calculate cost of goods sold (COGS) using the appropriate formula for your business type. Retailers use beginning inventory plus purchases minus ending inventory, while manufacturers include raw materials, direct labour, and manufacturing overheads.

• Negotiate with suppliers regularly and streamline production processes to reduce COGS, as every £1 reduction in these costs directly increases your gross profit margin.

• Choose your inventory valuation method carefully (first in, first out (FIFO), average cost, or specific identification) because it significantly affects your COGS calculation, financial statements, and tax obligations, especially since last in, first out (LIFO) is not an allowable method for valuing stock for tax purposes.

• Track COGS consistently to set profitable pricing above your direct costs and make informed decisions about inventory management, product mix, and business growth strategies.

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

What is COGS?

Cost of goods sold (COGS) is the direct cost to produce or purchase the goods you sell. It includes the money spent specifically on creating your products, from raw materials to manufacturing labour, as well as other costs directly attributable to production. Understanding COGS helps you set profitable prices and track your true margins.

This formula shows how retailers calculate cost of goods sold for inventory accounting.

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.

COGS typically includes three core cost categories:

  • Direct materials: Raw materials and components used in production.
  • Direct labour: Wages for workers directly involved in manufacturing.
  • Manufacturing overheads: Factory costs like utilities and equipment maintenance, which accounting standards classify as either fixed or variable overheads based on production volume.

Some businesses also include these costs in COGS:

  • Freight and storage: Shipping and warehousing expenses.
  • Transaction fees: Payment processing costs for sales.
  • Sales commissions: Direct selling expenses for certain 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.

COGS does not include indirect business expenses:

  • Indirect expenses: Rent, marketing, and administrative costs.
  • General salaries: Management and office staff wages.

Track COGS accurately with accounting software that helps you manage expenses and inventory.

Why COGS is important for small businesses

Track COGS to set profitable prices and protect your margins. When you understand your true costs, you can price competitively while maintaining profitability.

When you track COGS, you gain these benefits:

  • Accurate pricing: Know exactly what markup you need for profit.
  • Cost awareness: Identify hidden expenses that affect margins.
  • Growth planning: Anticipate cost changes as you scale operations.

Growing businesses often encounter unexpected cost increases, such as:

  • Facility upgrades: The shift from home-based to dedicated premises.
  • Material handling: Additional logistics and storage costs.
  • Compliance expenses: New regulatory requirements as you expand.

COGS also helps you make better business decisions in four key areas. For guidance on setting up your business, check official resources.

Pricing

COGS determines your minimum price point. You must price above COGS to generate profit, and tracking these costs helps you respond quickly to changes.

Pricing benefits include:

  • Profit protection: Ensure every sale covers direct costs.
  • Price adjustment timing: Know when rising costs require price increases.
  • Competitive positioning: Price strategically while maintaining profitability.

Profitability

Lower COGS means higher profits. Reducing your cost of goods sold directly increases your gross profit margin when you keep the same selling prices.

The profitability impact includes:

  • Direct relationship: Every £1 reduction in COGS adds £1 to gross profit.
  • Compound effect: Small COGS improvements create significant profit gains.
  • Margin improvement: Better COGS control strengthens overall business margins.

COGS affects gross profit directly. Your net profit also depends on operating expenses like rent, wages, and marketing costs.

Inventory management

Analyse COGS to assess inventory efficiency and spot slow-moving items. Use it to optimise stock levels, reorder points, and product mix while reducing capital tied up in goods.

Taxes

COGS is a deductible business expense. Track and document all COGS components to maximise your tax deductions and maintain audit-ready records.

Check with your local tax authority for how they handle COGS. In the UK, see self-employed business tax guidance.

Strategic decision-making

COGS data helps you decide strategically. With accurate cost tracking, you gain context for financial analysis on investments like new product lines, automation, or distribution methods.

How to calculate COGS

How you calculate COGS depends on your business type. Retailers typically use inventory-based formulas, while manufacturers calculate based on production costs.

Retail COGS formula

The formula uses these components:

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

When you calculate COGS, focus on inventory values at the start and end of the period, not the number of sales. This aligns with tax rules requiring you to bring opening and closing stock into your accounts at the lower of cost or net realisable value. This approach helps you account for discarded or damaged inventory.

Manufacturing COGS formula

Manufacturers use a different approach to calculate COGS.

The formula uses these components:

  • Raw materials: The direct materials used to produce goods.
  • Manufacturing costs: Costs of production including labour and overheads.
  • Storage costs: Expenses from inventory storage.
  • Freight: Shipping costs for incoming materials or final delivery.

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

Examples of COGS

These examples show how different business types calculate COGS.

Retail example:

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

The equation is: £10,000 + £25,000 − £8,000 = £27,000 COGS

Manufacturing example:

A manufacturing business buys £7,000 worth of materials and spends £3,000 on energy and labour, plus £1,200 on shipping.

The equation is: £7,000 + £3,000 + £1,200 = £11,200 COGS

COGS and different business models

COGS calculations vary by business model. Consider these differences:

  • Manufacturers: Tend to include indirect costs such as material handling, with official guidance allowing reasonable production-related costs to be included.
  • Retailers: Often use starting and ending inventory values, though those with rapidly changing items may value stock at selling price less the normal gross profit margin.
  • Service businesses: Typically include direct labour costs as their primary COGS component.

FAQs on cost of goods sold

Here are answers to common questions about calculating and using COGS in your business.

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 and manufacturing labour. Operating expenses cover indirect costs like rent, marketing, and administrative salaries that support your overall business operations.

Which inventory valuation method should I use?

Choose FIFO (first in, first out), average cost, or specific identification based on your business needs. FIFO works well for businesses with perishable goods, while average cost suits businesses with consistent pricing. Note that LIFO (last in, first out) is not allowed for UK tax purposes.

How often should I calculate COGS?

Calculate COGS at least monthly to monitor your margins and make timely pricing decisions. Many businesses calculate it quarterly for tax reporting, but more frequent calculation helps you spot cost trends earlier.

Can service businesses have COGS?

Yes, service businesses can have COGS if they incur direct costs to deliver their services. For example, direct labour costs for consultants or materials used in service delivery can be included in COGS.

How does COGS affect my tax liability?

COGS is a deductible business expense that reduces your taxable income. Accurately tracking COGS ensures you claim all eligible deductions and lower your tax liability while maintaining compliant records.

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.