Guide

Cost of sales calculation: formula, examples and tips

Learn how cost of sales calculation helps you track margins, price well, and manage your costs.

Image shows cost of sales highlighted on an income statement.

Written by Jotika Teli—Certified Public Accountant with 24 years of experience. Read Jotika's full bio

Published Monday 20 April 2026

Table of contents

Key takeaways

  • Include only direct costs tied to delivering your product or service, such as materials, labour, and shipping, and leave out general overhead like rent or admin salaries.
  • Track your cost of sales regularly so you can spot rising supplier or delivery costs early and decide when to adjust your prices before your profit margins shrink.
  • Use the right formula for your business type: retailers and product-based businesses use the inventory formula (beginning inventory + purchases – ending inventory), while service businesses focus on labour and delivery costs instead.
  • Classify expenses consistently every time so your cost of sales figures stay accurate and you can make meaningful comparisons across different periods.

Key takeaways

  • Include all direct expenses tied to delivering your product or service, such as materials, labour, and shipping, while excluding overhead like rent or admin costs.
  • Track your cost of sales regularly to spot margin pressure early and decide when to adjust pricing.
  • Apply different formulas based on your business type: inventory-based for retailers, labour-focused for service businesses.
  • Stay consistent with how you classify expenses to ensure accurate tracking and meaningful comparisons over time.

What is cost of sales?

Cost of sales is the total direct expense of delivering your product or service to customers. It includes materials, labour, and other costs tied specifically to what you sell. You might also see it called cost of goods sold (COGS).

Understanding your cost of sales helps you set profitable prices and make smart sourcing decisions.

For most small businesses, cost of sales equals your direct costs. Here's the difference:

  • Direct costs: expenses tied to creating your product or service, such as materials and production labour
  • Indirect costs: general expenses not linked to specific sales, such as rent or admin salaries

Only direct costs belong in your cost of sales calculation.

Cost of sales differs from business to business. A bricks-and-mortar retailer will have costs like stock and packaging, while a freelancer offering social media services needs to pay software subscriptions to deliver client work.

Why is cost of sales important?

Cost of sales sets your profit baseline. You need to charge above this amount to make money. Knowing your cost of sales helps you identify which customers and products are most profitable.

Labour costs are usually straightforward to calculate. New business owners benefit from identifying hidden costs early.

For example, e-commerce businesses working from home initially have low overhead costs. They can claim deductions for the portion of their home used for business, which includes a deduction of 50% on the rental of a telephone landline if it doubles as a private line.

For the 2024–2025 tax year in New Zealand, the Inland Revenue Department (IRD) has set the square metre rate at $55.60, marking an increase from the 2023–2024 rate of $53.10 per square metre.

Include both fixed and variable costs that directly relate to delivering your product or service.

Calculate your cost of sales regularly to spot margin pressure early. Rising delivery fees or supplier costs can erode profits quickly. Tracking these changes helps you decide when to raise your prices.

Your cost of sales includes two types of costs:

Fixed costs

Fixed costs stay the same regardless of how much you sell. Examples include:

  • employee salaries
  • equipment leases
  • software subscriptions

Variable costs

Variable costs change based on your production or sales volume. Examples include:

  • shipping fees
  • raw materials
  • transaction processing fees

How to calculate cost of sales

The most common cost of sales formula is:

Beginning inventory + Purchases during the period – Ending inventory = Cost of sales

This formula works for businesses that sell physical goods. Service businesses calculate it differently, as they don't hold inventory.

  • Beginning inventory: the value of inventory you had at the start of the period
  • Purchases: the cost of new inventory bought during the period
  • Ending inventory: the value of inventory remaining at the end of the period

This formula tells you the direct cost of goods you sold.

Cost of sales vs. expenses

Cost of sales covers expenses directly tied to delivering your product or service. Business expenses cover general costs of running your company.

Here's how to tell them apart:

  • Business expense example: PR agency fees for brand coverage, which aren't tied to individual sales
  • Cost of sales example: delivery fees for online orders, which are essential for completing each sale

Track both metrics to make better financial decisions:

  • When sales drop: focus on reducing general business expenses
  • When profit margins shrink: focus on reducing cost of sales

Cost of sales vs. cost of goods sold

Cost of sales and cost of goods sold (COGS) are often used interchangeably, but they have slightly different meanings depending on your business type.

Cost of goods sold (COGS):

This term has specific characteristics:

  • Used primarily by manufacturers and retailers
  • Focuses on costs to create or purchase products
  • Includes raw materials, production labour, and manufacturing overhead

Cost of sales:

This term has specific characteristics:

  • Used by service businesses and some retailers
  • Includes a broader range of direct costs
  • Covers selling costs, distribution, commissions, and transport fees

Many small businesses and accounting software use these terms interchangeably. Be consistent with whichever term you choose and include all direct costs tied to delivering what you sell.

How to calculate cost of sales in different industries

Different business types calculate cost of sales differently. Here's how to adapt the formula for service businesses, retailers, and manufacturers.

Cost of sales example formula for service businesses

Service businesses operate without inventory, so the calculation focuses on labour and delivery costs instead.

Include in cost of sales:

These costs should be part of your calculation:

  • Wages for employees who deliver services directly
  • Facilities used for service delivery
  • Travel costs for client work
  • Equipment used for service delivery

Exclude from cost of sales:

These costs don't belong in your calculation:

Cost of sales example formula for retailers

Retailers use the standard inventory formula. Their cost of sales typically includes:

  • product purchase price
  • shipping from suppliers
  • transaction processing fees
  • packaging materials

Cost of sales example formula for manufacturing

Manufacturers have more complex calculations because they transform raw materials into finished goods.

Core manufacturing costs:

These are the essential costs to include:

  • Raw materials
  • Production labour
  • Manufacturing equipment usage

Optional costs (varies by business):

You may also include these depending on your operations:

  • Warehousing
  • Freight shipping

Cost of sales examples

Stay consistent with your classification across all similar expenses. Once you classify an expense as cost of sales, use the same classification every time.

For unclear costs, ask yourself: is this expense essential for completing each sale?

Some expenses require judgment to classify correctly. Here are examples of judgment calls:

  • Sales commissions: could be cost of sales or operating expense depending on your business model
  • Equipment maintenance: could be cost of sales if production-specific, or an operating expense if general

Accounting standards also clarify related costs. For instance, you must recognise any proceeds from selling items produced while testing new equipment in profit or loss, and not deduct them from the asset's cost.

Retail business example

Here's how a retail business applies the formula.

A homeware store owner wants to price handmade pottery cups profitably. They calculate the cost of sales per cup:

  • Purchase price: $5 per cup from the supplier
  • Shipping: $2 per cup from supplier to store
  • Labour: $3 per cup for shelving and customer service

Total cost of sales per cup: $10

For a 50% profit margin, the store owner sets a retail price of $15 per cup.

Track your cost of sales with Xero

Business costs change constantly. You need a reliable way to track them so you can protect your margins.

With Xero job costing software, you get a live view of your income and outgoings. You'll know where your money is going.

Xero's analytics and reporting features help you dig deeper:

  • Cash flow projections: see what's coming in and going out
  • Income and expenditure reports: track spending patterns over time
  • Financial statements: access the calculations you need to stay in control

Get one month free to see how Xero can help you track your cost of sales.

FAQs on cost of sales

Here are answers to common questions about cost of sales.

How can I reduce my cost of sales?

Lower your cost of sales by reducing direct expenses without sacrificing quality. This increases profit margins and helps you offer competitive pricing.

Try these strategies:

  • negotiate better terms with suppliers
  • source cheaper raw materials from alternative vendors
  • increase production efficiency with new technology
  • improve inventory management to avoid overstocking with inventory software
  • outsource specific functions instead of hiring permanent staff

How does the cost of sales affect profitability?

Cost of sales directly determines your gross profit. The gap between your selling price and cost of sales is the money you keep.

Example: $100,000 sales revenue – $90,000 cost of sales = $10,000 gross profit (only 10% margin)

Lower cost of sales means higher margins and more cash to reinvest in your business. Aim for a cost of sales that leaves room for healthy profit while letting you set competitive prices.

Is cost of sales an expense or income?

Cost of sales is an expense. It represents the direct costs of producing goods or services you've sold. Subtract it from your revenue to calculate your gross profit.

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.

Get one month free

Purchase any Xero plan, and we will give you the first month free.