Get 80% off your plan for your first 3 months*
Guide

How to calculate your cost of sales

Learn what cost of sales is, how to calculate it for your business type, and ways to lower your direct costs.

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 Tuesday 19 May 2026

Table of contents

Key takeaways

  • Calculate your cost of sales by including only direct costs tied to producing or delivering what you sell, such as inventory purchases, production labour, and delivery fees, while excluding general business expenses like rent, marketing, and administrative salaries.
  • Apply the right formula for your business type: retailers use beginning inventory plus purchases minus ending inventory, service businesses add labour and delivery costs, and manufacturers include raw materials, production labour, and overheads.
  • Track your cost of sales at least monthly to spot rising costs early and protect your profit margins, helping you decide when to adjust prices or find alternative suppliers.
  • Stay consistent in how you categorize costs between cost of sales and operating expenses, as treating similar expenses the same way every period ensures reliable financial statements and better decision-making.

What is cost of sales?

Cost of sales is the total of all direct costs involved in delivering a product or service to your customer. You might also see it called cost of goods sold (COGS).

Understanding your cost of sales helps you make better financial decisions, from setting competitive prices to choosing the right suppliers.

For most small businesses, cost of sales equals your direct costs, or the expenses tied directly to the goods or services you sell. Keep this separate from indirect costs, which are general business expenses that support your overall operations rather than specific products or services.

Cost of sales varies depending on your business type:

  • Retailers typically include stock purchases and packaging
  • Service providers might count software subscriptions or subcontractor fees
  • Manufacturers factor in raw materials and production labour

The basic formula for a retail business is: Beginning inventory + Purchases – Ending inventory = Cost of sales.

Why is cost of sales important?

Cost of sales sets your profit baseline. Once you know how much it costs to deliver your product or service, you can set prices that actually generate profit.

Understanding these costs also reveals the true profitability of each sale, not just your overall revenue.

While labour costs are usually straightforward to calculate, other expenses can surprise you. Watch for scaling costs: an ecommerce business run from home might enjoy healthy margins at first, but those margins shrink when you need to pay for warehouse space or a dedicated workspace.

For tax purposes, you may be able to deduct expenses for the business use of a workspace in your home if it's your main place of business or used exclusively and regularly for business activities.

Consider both fixed and variable costs when calculating your cost of sales:

  • Fixed costs stay consistent regardless of production levels (for example, employee salaries)
  • Variable costs change based on output or circumstances (for example, shipping fees that vary by distance or volume)

Your cost of sales calculation should capture all direct costs, both fixed and variable, that go into delivering your products or services.

Calculate your cost of sales regularly because costs change over time. Tracking these shifts helps you spot margin pressure early, whether it's rising delivery fees or supplier price increases. This visibility helps you decide when to raise prices or find alternative suppliers.

Cost of sales vs. cost of goods sold

Cost of sales and cost of goods sold (COGS) are closely related but not identical. The terms are often used interchangeably, but the distinction matters depending on your business type.

Cost of goods sold (COGS) focuses specifically on the direct costs of creating or purchasing products you sell. This includes raw materials, manufacturing labour, and production overheads.

Cost of sales is a broader term that includes COGS plus other direct costs involved in making a sale, such as:

  • Sales commissions
  • Delivery and distribution costs
  • Service delivery expenses

Which term should you use?

  • Product-based businesses (retailers, manufacturers) typically use COGS
  • Service businesses often prefer cost of sales, since they don't have physical inventory. However, some professional practices must account for work-in-progress (WIP) as inventory. According to the Canada Revenue Agency, businesses can no longer exclude amounts for WIP for tax years beginning after 21 March 2017
  • Hybrid businesses might use cost of sales to capture both product and service delivery costs

For most small businesses, the practical difference is minimal. What matters is that you consistently include all direct costs in your calculation.

Cost of sales vs. operating expenses

Cost of sales covers direct costs tied to each sale, while operating expenses cover the costs of running your business overall. Understanding this difference helps you analyze your finances more accurately and make better decisions about where to cut costs.

Here's how to tell the difference:

  • PR agency fees: this is an operating expense. It promotes your brand but isn't directly tied to delivering a specific product or service to a customer
  • Delivery fees: this is a cost of sales. Without it, your online store customers wouldn't receive their orders

Track both figures to make smarter financial decisions:

  • When sales drop, look at reducing operating expenses to stay profitable
  • When profit margins shrink, focus on lowering your cost of sales

What to include in your cost of sales?

Include any cost that's directly tied to producing or delivering what you sell. The key test: ask yourself whether this cost only occurs when you make a sale. If it does, it's probably a cost of sales.

Common costs to include for product-based businesses:

  • purchase price of inventory or raw materials
  • freight and shipping to receive goods
  • direct labour for production or assembly
  • packaging materials
  • transaction fees on sales

Common costs to include for service businesses:

  • labour costs for staff delivering services
  • software subscriptions required to deliver work
  • subcontractor or freelancer fees
  • travel expenses for client work
  • equipment costs directly tied to service delivery

Common costs to include for all businesses:

  • sales commissions (if directly tied to specific sales)
  • merchant processing fees
  • direct materials consumed in delivery

What to exclude from your cost of sales?

Exclude costs that exist regardless of your sales volume. These are operating expenses or overheads, not direct costs of delivering your product or service.

Costs to exclude from your cost of sales:

  • rent and utilities for your office or retail space (unless a specific space is used solely for production)
  • marketing and advertising costs
  • administrative salaries for staff not directly involved in production or service delivery
  • insurance premiums
  • professional fees such as accounting or legal services
  • office supplies and general equipment
  • interest on loans
  • depreciation on assets not directly used in production

Keeping operating expenses separate from your cost of sales gives you an accurate gross profit figure. Maintain these categories for accurate financial reporting and better decision-making.

How to calculate cost of sales for different business types

The cost of sales formula varies by business type because different businesses have different direct costs. A retailer tracks inventory, while a service business tracks labour hours. Choose the formula that matches your business model for the most accurate calculation.

How to calculate cost of sales for service businesses

Service businesses don't carry physical inventory, so the formula focuses on the labour and resources you use to deliver work to clients.

Service business formula: Sales commissions + Service delivery labour + Workspace costs + Travel + Equipment use = Cost of sales

What to include:

  • wages for employees who directly deliver services to clients
  • workspace costs if dedicated to service delivery
  • travel expenses for client work
  • equipment costs tied to service delivery

What to exclude:

  • back-office and administrative staff salaries
  • general office expenses

A freelancer working from home on a personal laptop might only count their labour time and any software subscriptions required for client work.

How to calculate cost of sales for retailers

Retailers track how much inventory comes in and how much remains at the end of each period. The difference, plus any new purchases, gives you the cost of what you sold.

Retailer formula: Beginning inventory + Purchases – Ending inventory = Cost of sales

How it works:

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

For tax purposes, the Government of Canada outlines two acceptable methods for valuing inventory: its fair market value, or the lower of its original cost or fair market value.

For ecommerce businesses, consider adding shipping costs and payment processing fees, since these apply to every sale.

How to calculate cost of sales for manufacturing businesses

Manufacturers have more cost components to track because you're turning raw inputs into finished products. Each stage of production adds to your cost of sales.

Manufacturing formula: Raw materials + Manufacturing labour + Production overhead + Storage + Freight = Cost of sales

Key components:

  • raw materials: the basic inputs for your products
  • manufacturing labour: wages for production staff
  • production overhead: factory utilities, equipment maintenance, and similar costs
  • storage: warehousing costs for raw materials and finished goods
  • freight: shipping costs to receive materials or deliver products

Some manufacturers treat warehousing and freight as operating expenses rather than cost of sales. Choose the approach that best reflects how these costs relate to your production process and apply it consistently.

Cost of sales examples

Consistency matters more than perfection when categorizing costs. Some costs fall into grey areas, but the important thing is to treat them the same way every time.

Common grey areas include:

  • Sales commissions: could be a cost of sales (tied to specific sales) or an operating expense (general sales team cost)
  • Equipment repairs: could be a cost of sales (if equipment is used solely for production) or an operating expense (if used across the business)

Once you decide where a cost belongs, apply that decision consistently. If commission is part of your cost of sales this month, it should be part of your cost of sales every month. Consistent treatment keeps your figures reliable for decision-making.

Retail business example

A homeware store owner wants to price handmade pottery cups profitably. Here's how they calculate the cost of sales.

  1. Identify direct costs per unit: purchase price from supplier ($5), shipping from supplier to store ($2), staff labour for shelving and customer service ($3)
  2. Calculate total cost of sales: $5 + $2 + $3 = $10 per cup
  3. Set a profitable price: for a 50% profit margin, the owner prices the cups at $15 each

This calculation ensures every sale generates profit after covering all direct costs. You can also use a markup calculator to test different pricing scenarios.

Service business example

A freelance graphic designer in Toronto wants to understand the true cost of delivering client projects each month.

  1. Identify direct costs per month: design software subscriptions ($150), stock image licences ($50), subcontractor illustration fees ($800), travel to client meetings ($100)
  2. Calculate total cost of sales: $150 + $50 + $800 + $100 = $1,100 per month
  3. Assess profitability: if monthly revenue is $5,000, the gross profit is $3,900, leaving room to cover operating expenses like rent, insurance, and marketing

Tracking these costs monthly helps the designer spot when subcontractor fees or software costs are rising and eating into margins.

How to reduce your cost of sales

Lowering your cost of sales directly increases your gross profit without requiring you to raise prices. Since the formula has multiple components, you have several ways to bring costs down.

Here are practical strategies to reduce your cost of sales:

  • Negotiate better prices or payment terms with suppliers, and source alternative suppliers for raw materials or stock
  • Increase production efficiency through training, better processes, or updated technology
  • Improve inventory management to maintain optimal stock levels and reduce waste from overstocking or spoilage
  • Outsource specific functions selectively instead of hiring permanent staff, particularly for seasonal or fluctuating workloads
  • Review your cost categories regularly to identify areas where spending has crept up without a corresponding increase in output

Even small improvements across several cost areas can add up to a meaningful boost in profitability over time.

Simplify your cost tracking with Xero

Business costs change constantly, and tracking them accurately is the foundation of healthy margins. With Xero's job costing software, you can assign costs to specific projects, clients, or jobs and see exactly where your money goes.

Xero helps you stay on top of your cost of sales with:

  • Live cost visibility: see your income and outgoings in real time
  • Deeper analysis: access cash flow projections, income statements, and financial statements
  • Better decisions: track cost trends and spot margin pressure early

Ready to take control of your costs? Get one month free and see how Xero simplifies cost tracking for your business.

FAQs on cost of sales

Here are answers to frequently asked questions about cost of sales.

How can I reduce my cost of sales?

Start by breaking your cost of sales into individual line items so you can see which costs take the biggest share. Then focus on the largest items first: compare supplier quotes, renegotiate contracts at renewal time, and test whether bulk ordering lowers your per-unit price. Small, consistent reductions across several cost lines often have a bigger impact than one dramatic cut.

How does the cost of sales affect profitability?

Cost of sales directly determines your gross profit. If you generate $100,000 in sales but your cost of sales is $90,000, you're left with only $10,000 in gross profit before covering any operating expenses. Aim for a cost of sales that leaves room for healthy margins while keeping your prices competitive.

How often should I calculate my cost of sales?

Calculate your cost of sales at least monthly, or whenever you prepare financial statements. Businesses with fluctuating costs or tight margins may benefit from weekly tracking. Regular calculation helps you spot cost increases early and adjust pricing or sourcing to protect your margins.

Should I include shipping costs in my cost of sales?

Include shipping costs if they're directly tied to delivering products to customers. Outbound shipping to customers and inbound shipping from suppliers are both typically included. However, shipping costs for returning items to suppliers might be treated as an operating expense. Apply your chosen approach consistently.

Where does cost of sales appear on financial statements?

Cost of sales appears on your income statement, directly below revenue. Your revenue minus your cost of sales equals your gross profit, which is a key measure of how efficiently you deliver your products or services before accounting for operating expenses.

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.