GBWise

How to Compute Cost of Sales: A Clear Guide for UK Businesses

Expert Reviewed by GBWise Team • November 10, 2026
Published: February 17, 2026
12 min read

Learning how to compute cost of sales is a core skill for any UK business owner who wants to understand gross profit. Cost of sales, sometimes called cost of goods sold, is the total of the direct costs of producing the goods or delivering the services a business sells during an accounting period. This guide explains the formula in plain English, shows what counts as a direct cost and what does not, works through three examples, and covers the HMRC record-keeping rules that apply. It is general education only, not financial or tax advice.

What Is Cost of Sales?

Cost of sales is the total of direct costs that can be traced to the goods sold or services delivered by a business. It usually includes raw materials, direct labour and other costs that vary with production or service delivery. It does not normally include indirect costs such as rent, marketing, administration or office utilities — those are treated separately as operating expenses. In UK financial reporting, cost of sales appears in the profit and loss account and is deducted from revenue to calculate gross profit.

The Cost of Sales Formula

For a business that holds stock, the standard formula is:

Cost of sales = Opening stock + Purchases (or direct production costs) − Closing stock

Each part of the formula means the following:

Part of the formulaWhat it means
Opening stockThe value of stock held at the start of the accounting period
PurchasesStock, raw materials or direct production costs bought during the period
Closing stockThe value of stock still unsold at the end of the period
Cost of salesThe cost of the goods actually sold — not simply the goods purchased

The result is the cost of the goods actually sold in the period, because stock bought but not yet sold is left out through the closing stock deduction.

What Counts as a Direct Cost — and What Does Not

Direct costs are expenses that can be clearly and consistently traced to specific goods or services. Getting this split right is the most important step in working out cost of sales correctly.

Usually a direct cost (in cost of sales)Usually an operating expense (not in cost of sales)
Raw materials and componentsRent and business premises costs
Packaging for goods soldMarketing and advertising
Production wages for staff making the goodsGeneral administration salaries
Manufacturing suppliesOffice utilities and insurance
Subcontractor fees for work delivered to a clientAccountancy fees for the business generally
Billable staff time spent delivering a serviceTraining for general business skills

The test is simple: would this cost disappear if the sale had not happened? If the answer is yes, it is usually a direct cost. If the cost would still be paid anyway, it is usually an overhead.

Worked Example 1: A Retailer (Illustrative)

All figures in the worked examples in this guide are illustrative examples chosen to show the maths clearly. They are not figures from a real business.

A small retailer starts the year with £12,000 of stock, buys £45,000 of stock during the year, and ends the year with £9,000 of stock still unsold.

StepCalculationAmount
Opening stock—£12,000
Add purchases—£45,000
Less closing stock—−£9,000
Cost of sales£12,000 + £45,000 − £9,000£48,000

If the retailer sold £80,000 of goods in the year, gross profit is £80,000 − £48,000 = £32,000, a gross profit margin of 40% (£32,000 ÷ £80,000).

Worked Example 2: A Manufacturer (Illustrative)

A small manufacturer makes furniture. The figures below are illustrative, chosen to show the maths clearly, and are not figures from a real business.

ItemAmount
Opening raw materials£5,000
Add raw material purchases£20,000
Add direct labour (production wages)£15,000
Less closing raw materials−£4,000
Cost of sales£36,000

Calculation: £5,000 + £20,000 + £15,000 − £4,000 = £36,000. Note that the cost of the factory building, the office and the sales team is not included — those are operating expenses, not direct production costs.

Worked Example 3: A Service Business (Illustrative)

A consultancy holds no physical stock, so there is no opening or closing inventory. Its cost of sales is the direct cost of delivering client work. The figures below are illustrative, chosen to show the maths clearly, and are not figures from a real business.

ItemAmount
Direct labour (billable staff time)£18,000
Subcontractor fees for client work£6,000
Cost of sales£24,000

Calculation: £18,000 + £6,000 = £24,000. If the consultancy charged clients £60,000 in the year, gross profit is £60,000 − £24,000 = £36,000, a gross profit margin of 60% (£36,000 ÷ £60,000). General office administration time is excluded, because it is not tied to a specific client job.

Gross Profit and Cost of Sales

Gross profit is revenue minus cost of sales. It shows how much remains after covering direct costs, before overheads and other operating expenses. Gross profit alone does not show whether a business is successful — a business can have a healthy gross profit and still make a loss after overheads — but it is the starting point for understanding pricing and margins. Comparing gross profit margin across periods, calculated the same way each time, is more useful than looking at a single figure in isolation.

Inventory Valuation and Its Role

Inventory valuation affects cost of sales, because opening and closing stock values feed directly into the formula. In the UK, businesses typically value inventory at the lower of cost or net realisable value, following standard accounting principles. The valuation method chosen influences the figures, so it must be applied consistently from one period to the next, or comparisons between periods will be misleading. If a business changes its valuation method, it should record the change and the reason for it.

Period Matching: Why the Formula Works

The matching principle is the accounting idea behind the formula: costs should be matched with the revenues they help generate in the same accounting period. Including only the costs of goods sold or services delivered in that period gives a clearer picture of gross profit and avoids overstating or understating performance because of the timing of purchases. Buying a large amount of stock just before the year end does not increase cost of sales for that year, because the unsold stock is deducted as closing stock.

Cost of Sales and HMRC: Allowable Expenses

For tax purposes, the question is not only how to compute cost of sales but which costs HMRC treats as allowable expenses. GOV.UK states that self-employed people (sole traders and partners in a business partnership) can deduct allowable expenses to work out taxable profit. The costs GOV.UK lists as allowable include things bought to sell on, such as stock or raw materials, direct costs from producing goods, staff costs such as salaries or subcontractor costs, and office, travel and premises costs. Allowable expenses do not include money taken from the business for personal use, and a cost used for both business and personal reasons can only be claimed for the business part.

This guide states no tax rate, allowance or threshold for cost of sales itself, because none is needed to compute it. Any tax figure a reader needs should be checked on GOV.UK at the time it is used.

Record-Keeping for Cost of Sales

Good records are what make a cost of sales figure defensible. GOV.UK states that sole traders and partners must keep records of business income and expenses for their Self Assessment tax return, and must keep those records for at least 5 years after the 31 January submission deadline of the relevant tax year. Records to keep include receipts for goods and stock, sales invoices, bank statements and, for businesses using traditional accounting, the value of stock and work in progress at the end of the accounting period. Proof of expenses does not need to be sent in with the tax return, but it must be available to show HMRC if asked. From the 2024 to 2025 tax year, cash basis is the default method of accounting for self-employed people, who must opt out if they want to use traditional accounting.

Keeping a separate business bank account makes this much easier. If you are choosing one, read the Starling Bank Business Account: A Clear Guide for UK Businesses guide on this site. If your income comes from freelance or service work, the How to Report Freelance Income: A Complete Step-by-Step Guide guide explains how to record that income for Self Assessment.

Common Errors When Computing Cost of Sales

  • Including indirect costs: rent, marketing and general administration belong in operating expenses, not cost of sales.
  • Omitting direct costs: leaving out subcontractor fees or production wages understates cost of sales and overstates gross profit.
  • Forgetting the stock adjustment: using purchases alone, without deducting closing stock and adding opening stock, counts unsold goods as sold.
  • Inconsistent inventory valuation: changing how stock is valued without noting it makes period-to-period comparison meaningless.
  • Mixing personal and business costs: only the business part of a shared cost belongs in the calculation.
  • Using cash paid instead of costs incurred: under traditional accounting, costs are recorded when invoiced or billed, not when the money is paid.

Limitations of Cost of Sales Figures

Cost of sales is a useful measure, but it has limits. It does not reflect overhead costs, cash flow or long-term financial commitments. Changes in accounting methods or inventory valuation can move the figure without any real change in the business. It should therefore be read as one part of a broader financial picture — alongside the full profit and loss account, the balance sheet and cash flow — not as a standalone indicator of a business’s health.

Conclusion

Knowing how to compute cost of sales is a fundamental accounting skill for UK businesses and for anyone learning to read financial statements. By focusing on direct costs, applying the opening stock plus purchases minus closing stock formula, valuing inventory consistently, and matching costs to the revenues they generate, cost of sales gives a structured way to understand how goods or services contribute to gross profit. Keep the underlying records — receipts, invoices and stock counts — for at least 5 years after the relevant Self Assessment deadline, and check the current GOV.UK guidance before relying on any tax rule. This guide is general education only and does not replace professional advice.

Frequently Asked Questions

What is included in cost of sales in the UK?
Cost of sales in the UK generally includes direct costs that are directly linked to producing goods or delivering services. This may include raw materials, direct labour, manufacturing supplies or costs of subcontracted work. Indirect expenses such as rent, marketing and administration are normally excluded.

Is cost of sales the same as cost of goods sold?
Cost of sales and cost of goods sold are closely related terms and are often used interchangeably. In practice, “cost of sales” is more commonly used in UK financial statements, especially for service-based businesses, while “cost of goods sold” is more common in manufacturing or retail contexts.

How does inventory affect how to compute cost of sales?
Inventory affects cost of sales through opening and closing stock values. The calculation usually starts with opening inventory, adds purchases or production costs, and then subtracts closing inventory. This ensures that only the cost of goods actually sold during the period is included.

Do service businesses have cost of sales?
Yes, service businesses can have cost of sales even if they do not hold physical inventory. For services, cost of sales usually includes direct labour, subcontractor fees or other costs that arise only when the service is provided to a client.

Why can cost of sales change from one period to another?
Cost of sales can change due to variations in production levels, changes in material or labour costs, differences in inventory levels, or shifts in the type of services delivered. Changes may also result from accounting adjustments, so figures should always be reviewed in context.

What is the formula for cost of sales?
The standard formula is: cost of sales = opening stock + purchases (or direct production costs) − closing stock. For a service business with no stock, it is the total of the direct costs of delivering the service, such as direct labour and subcontractor fees.

Is rent included in cost of sales?
No. Rent is normally an operating expense, not a direct cost. It is paid whether or not a particular sale happens, so it does not belong in cost of sales. The same applies to general marketing, administration and office utilities.

How do I calculate gross profit from cost of sales?
Gross profit = revenue − cost of sales. For example, in the illustrative retailer example in this guide, revenue of £80,000 minus cost of sales of £48,000 gives gross profit of £32,000, a gross profit margin of 40%.

How should a business value its closing stock?
In the UK, businesses typically value inventory at the lower of cost or net realisable value, following standard accounting principles. Whichever method is used, it must be applied consistently from one period to the next so that comparisons remain meaningful.

Are the costs in cost of sales tax-deductible?
GOV.UK states that self-employed people can deduct allowable expenses to work out taxable profit, and that allowable expenses include things bought to sell on, such as stock or raw materials, direct costs from producing goods, and staff and subcontractor costs. Costs must be wholly for the business, or only the business part can be claimed. If you are unsure whether a cost is allowable, check GOV.UK or contact HMRC.

How long must a UK business keep cost of sales records?
GOV.UK states that sole traders and partners must keep records of business income and expenses for at least 5 years after the 31 January submission deadline of the relevant tax year. Records should include receipts for goods and stock, sales invoices and bank statements, and, for traditional accounting, the value of stock and work in progress at the end of the accounting period.

What is the difference between cost of sales and operating expenses?
Cost of sales includes only direct costs tied to producing goods or delivering services, while operating expenses cover indirect costs such as rent, utilities, insurance, marketing and administrative salaries. Keeping the two categories separate supports clearer reporting and a more accurate gross profit figure.

About GBWise

Financial expert with years of experience in the UK banking and finance industry.

Finance Expert • 10+ Years Experience