How to calculate cost of sales: formulas + examples
Learn how to calculate cost of sales for your business to price right, protect margins, and forecast cash flow.

Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio
Published Wednesday 18 February 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 appropriate 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 overhead.
- Track your cost of sales at least monthly to spot rising costs early and protect your profit margins, as regular monitoring helps you decide when to adjust prices or find alternative suppliers.
- Maintain consistency in how you categorize costs between cost of sales and operating expenses, as treating similar expenses the same way every period ensures reliable financial reporting 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.
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 make money.
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 overhead.
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 March 21, 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. expenses
Cost of sales covers direct costs tied to each sale. 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 a business 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 business 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 the cost only occurs with sales, 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
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
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
Why this matters: Keeping operating expenses separate from your cost of sales gives you an accurate gross profit figure. Keep these categories separate 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 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
Note: 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
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
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
Note: 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. 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 cost of sales (tied to specific sales) or operating expense (general sales team cost)
- equipment repairs: could be cost of sales (if equipment is used solely for production) or operating expense (if used across the business)
The rule: 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 (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.
Simplify your cost tracking with Xero
Stay on top of your costs with simple, streamlined tracking. Business costs change constantly – you need a simple way to track them.
With Xero's job costing software, you get:
- live cost visibility: see your income and outgoings in real time
- deeper analysis: access cash flow projections, income reports, 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 common questions about calculating and managing your cost of sales.
How can I reduce my cost of sales?
Reduce your cost of sales by lowering the direct costs of production or delivery. Since the formula has multiple components, you have several options:
- Negotiate better prices or payment terms with suppliers
- Source alternative suppliers for raw materials or stock
- Increase production efficiency through new technology or training
- Improve inventory management to maintain optimal stock levels
- Outsource specific functions instead of hiring permanent staff
How does the cost of sales affect profitability?
Cost of sales directly determines your profit margin. The gap between what you charge and what it costs to deliver is your gross profit.
For example, 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 is typically a cost of sales. Inbound shipping (receiving inventory from suppliers) is also usually included. However, shipping costs for returning items to suppliers might be treated as an operating expense. Apply your chosen approach consistently.
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.