Guide

Cost of sales formula: How to calculate direct costs easily for your small business

Learn the cost of sales formula to calculate costs, set prices, and boost profit.

Image shows cost of sales highlighted on an income statement.

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

Published Monday 24 November 2025

Table of contents

Key takeaways

• Apply the cost of sales formula (beginning inventory + purchases - ending inventory = cost of sales) to calculate your direct costs and establish a baseline for profitable pricing decisions.

• Include only direct costs such as raw materials, production labour, shipping, and packaging in your cost of sales calculation, while excluding indirect expenses like rent, marketing, and general administration.

• Track your cost of sales monthly to spot rising expenses early and make timely adjustments to pricing or supplier arrangements before they impact your profitability.

• Maintain consistency in how you categorise borderline costs like sales commissions or equipment maintenance, applying the same classification rules every time to ensure reliable data for business decisions.

What is cost of sales?

Cost of sales is the total amount you spend to deliver your products or services directly to customers. This includes all expenses tied to creating what you sell – from materials and labour to shipping and packaging.

You might also see cost of sales called cost of goods sold (). Both terms measure the same thing: your direct costs of doing business.

Why it matters: Understanding your true cost of sales helps you set profitable prices and make smart sourcing decisions.

Cost of sales includes only – expenses you can trace directly to specific products or services. It does not include indirect costs like rent, marketing or general administration.

Examples by business type:

  • Retailers: paying for products, packaging and shipping
  • Service businesses: subscribing to software, paying contractor fees, covering travel costs
  • Manufacturers: buying raw materials, paying production labour, maintaining equipment

Cost of sales formula

If you sell physical products, use the cost of sales formula to work out the direct cost of inventory sold in a period. This shows how profitable your business is.

What to include in your cost of sales

Include all direct costs of producing or buying what you sell. Common costs include:

  • The cost of raw materials or finished products for resale
  • Direct labour costs for production or service delivery
  • Shipping and freight-in charges for acquiring inventory
  • Packaging costs
  • Software subscriptions or tools essential for delivering a service

Why is cost of sales important?

Cost of sales is your profit baseline – you need to charge more than this to make a profit. Knowing these costs helps you set prices that keep your business profitable.

Common cost calculation mistakes:

  • Missing hidden expenses, such as storage, equipment or workspace fees
  • Underestimating costs when your business grows and you need more space
  • Not tracking changes in shipping, materials or supplier costs

Types of costs to include:

  • Paying fixed costs such as employee salaries and equipment leases
  • Covering variable costs such as materials, shipping and transaction fees

Track your cost of sales every month. This helps you spot rising expenses early, so you can adjust prices or find cheaper suppliers.

How to calculate cost of sales in different industries

Industry-specific calculations give you more accurate costs. The main idea is the same, but each business type focuses on different costs.

Use the formula that fits your business.

Cost of sales example formula for service businesses

Service businesses focus on costs directly tied to delivering client work.

Include in your calculation:

  • Direct labour: Employees who work on client projects
  • Service delivery costs: Software, tools, travel expenses
  • Workspace costs: Office space used for client work

Exclude from your calculation:

  • Back-office staff (admin, marketing, management)
  • General business expenses not tied to specific services

Cost of sales example formula for retailers

Retailers can use this cost of sales formula for inventory accounting. An ecommerce business might choose to add shipping and transaction fees, which are common for every retail sale.

Cost of sales example formula for manufacturing

Manufacturers have raw materials and production costs to consider in their cost of sales calculations. A manufacturer might choose not to include warehousing or freight if they see these as operating expenses.

Cost of sales examples

Consistency matters more than perfection when you categorise costs. Apply the same rules every time you calculate.

Common grey-area costs:

  • Sales commissions: Can be cost of sales or operating expense
  • Equipment maintenance: Can be cost of sales (if used for production) or operating expense
  • Quality control: Usually cost of sales if directly tied to products

Once you decide how to categorise a cost, use the same approach every time. This gives you reliable data for pricing and profit decisions.

Retail business example

Retail business example: A homeware store owner calculates the cost of sales for handmade pottery cups to set a profitable price.

Step-by-step calculation:

  • Product cost: £5 per cup (supplier price)
  • Shipping cost: £2 per cup (delivery to store)
  • Labour cost: £3 per cup (shelving and customer service)
  • Total cost of sales: £10 per cup

Pricing decision: With a £10 cost of sales, the owner sets a retail price of £15 per cup, creating a 50% profit margin (£5 profit ÷ £10 cost = 50%).

Simplify your cost tracking with Xero

The costs of running a business and making a sale change often. If you track your costs simply, you can stay in control.

With Xero Projects, you see your income and costs in real time, so you always know your financial position.

Use analytics and reporting features to see cash flow projections, income and expenditure reports, and other financial statements. This helps you stay in control of your numbers.

FAQs on cost of sales

Here are answers to common questions about calculating your cost of sales.

What is the formula for COGS?

The formula for cost of goods sold (COGS) is the same as the cost of sales formula for product-based businesses: beginning inventory plus purchases minus ending inventory equals COGS. The terms are often used for the same calculation.

How often should I calculate my cost of sales?

Calculate your cost of sales every month. This gives you an up-to-date view of your profits and helps you spot issues early. Accounting software can automate this process.

What's the difference between gross margin and cost of sales?

. The bigger the gap between your costs and selling price, the more profit you keep.

Example impact: If you generate £100,000 in sales revenue but your cost of sales is £90,000, you only have £10,000 left for all other business expenses and profit.

Keep your cost of sales low enough for healthy profits, but make sure your prices stay competitive.

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.