How to calculate cost of sales (with examples provided)


Cost of sales, or cost of goods sold (COGS), can be daunting when running a business. For your company to be profitable, you must be well-versed in managing cash flow and operating at optimum efficiency. 

While the definition of cost of sales is straightforward to understand, the calculation can be complex depending on your products. The cost of sales formula includes various direct and indirect costs, which can make things more complicated. 

In this article, we’ll have a closer look at these costs and show you how to carry out the cost of sales calculations alongside various other metrics. 

Quick Tip: It’s important that you have a general understanding of small business accounting as a whole. This includes how to open a business bank account, track your expenses, calculate your business tax, and more. To gain a high-level overview, we recommend reading our beginner’s guide to small business accounting.

Table of contents

  1. What to include in your cost of sales
  2. Cost of sales formula
  3. Examples of cost of sales
  4. What is excluded from cost of sales?
  5. Other important ratios to consider
  6. Manage your cash flow with ease

What to include in your cost of sales

Before we look at the cost of sales formula, let’s explore the three values you’ll need to complete the calculation: beginning inventory, ending inventory and additional inventory.

how to calculate the cost of goods sold

Beginning Inventory: This is the inventory when you start a new accounting period. It includes the products and raw materials left over from the previous period. 

Additional Inventory: This is the inventory purchased during the specified period.

Ending Inventory: This is the inventory the company has left at the end of the specified period, including the products and raw materials that didn’t sell during that time.

Cost of sales formula

Now that you have a deeper understanding of what contributes to your cost of sales, let’s put all of them together into the final formula:

Cost of sales = (Beginning Inventory + New Inventory) – Ending Inventory.

You’ll need to know the inventory cost method that your business or accountant is using. 

Different approaches are used depending on how your company manages its costs, which impacts the value of cost of sales. 

Businesses use the following three inventory cost methods

  • FIFO (First in, first out)
  • LIFO (Last in, first out)
  • Average cost method

FIFO

In this method, the earliest manufactured or purchased goods are sold first. Considering prices rise over time, you sell your least expensive items first. 

Therefore, the value of cost of sales using FIFO will be relatively lower. You can apply this method when selling items with a shorter shelf life. 

LIFO

This method is the opposite of FIFO, where the most recently manufactured or purchased goods get sold first. During periods of inflation, you will sell your items that came at a higher cost first.

Therefore, the value of cost of sales using LIFO will be relatively higher than when using the FIFO method.

Weighted average cost

In this method, the average cost of all purchased or manufactured inventory is used, regardless of the purchase or production date. 

It prevents inaccurate or extreme values, making it much easier to calculate cost of sales, profitability, and taxes.

cost-of-sales-inventory-methods

Examples of cost of sales

To better understand how to calculate cost of sales, we’ve given an example of a fictional business below. These calculations can look different if there’s inflation in inventory, which brings the inventory cost methods into play. 

1. No inventory inflation

Let’s start with calculating cost of sales for TERRA T-shirts, a company that recently began operating.  

Beginning inventory: 0.

Additional inventory: They bought 500 t-shirts from a wholesaler for £5 each at the beginning of the year. Thus, 500 x £5 = £2,500.

Ending inventory: By the end of the year, they had sold 350 t-shirts for £8, leaving 150 unsold. Thus, (500-350) x £5 = £750.

Next, we plug these numbers into the cost of sales formula: 

Cost of sales = Beginning Inventory + Additional Inventory – Ending Inventory

= 0 + £2,500 – £750

= £1,750

2. Inventory inflation included

Now, let’s see how cost of sales is calculated when applying the three inventory cost methods

This time, TERRA T-shirts bought 250 t-shirts for £5 in January, then another 250 t-shirts for the inflated price of £7 in February. 

Beginning Inventory: 0.

Additional Inventory:

Month Units Purchased Cost per Shirt Value
January 250 £5 £1,250
February 250 £7 £1,750
500 total purchased

Ending Inventory: By the end of the year, they had sold 225 t-shirts for £8, leaving 275 unsold. 

Depending on the inventory cost method used, the cost of sales value will differ:

FIFO (first in, first out) LIFO (last in, first out) Avg weight cost
Units Sold 225 225 225
Cost per Shirt £5 £7 £6
Additional Inventory
(total units purchased x cost per unit)
500 x £5
= £2,500
500 x £7
= £3,500
500 x £6
= £3,000
Ending Inventory
(total units purchased – total units sold
x cost per unit)
(500-225) x £5
=£1,125
(500-225) x £7
=£1,575
(500-225) x £6
=£1,350
Cost of sales formula
(beginning inventory + additional inventory – ending inventory)
0 + £2,500 –
£1,125
0 + £3,500 – £1,575 0 + £3,000 – £1,350
Cost of sales total £1,375 £1,925 £1,650

What is excluded from cost of sales?

According to the Generally Accepted Accounting Principles (GAAP), cost of sales is the cost of inventory sold during any given period.

But what about companies that don’t have any inventory at all? These could include:

  • SaaS businesses
  • Business consultants
  • Professional dancers
  • Accounting firms

As they have zero cost of sales, this won’t be visible on income statements.

That doesn’t mean they don’t have any expenses. Such companies may still be subject to operating expenses (OpEx)

Examples of typical operating expenses for small business owners:

  • Rent
  • Office stationery and equipment
  • Payroll
  • Utility bills

Cost of revenue refers to all expenses involved in delivering a product or service to customers. As such, it extends beyond the manufacturing costs covered by COGS to include marketing and distribution expenses.

Examples of cost of revenue expenses:

  •  Direct labour
  •  Cost of shipping
  • Raw materials
  • Marketing

Other important ratios to consider

Cost of sales are used in various other metrics and ratios to help you keep the financial health of your business on track. Here are a few ratios where cost of sales is used:

1. Gross Margin 

What is it? The percentage of sales revenue a company retains after incurring all cost of sales.

Formula: Gross margin = (Sales Revenue – Cost of Sales) / Sales Revenue x 100

Example: In 2021, Company X reported their total revenue at £800,000 and cost of sales at £400,000. 

Gross margin = (£800,000 – £400,000) / £800,000 x 100 → 50%

2. Cost of Sales Ratio

What is it? It shows the percentage of sales revenue used to pay for expenses that vary directly with sales.

Formula: Cost of sales ratio = Cost of Sales/ Net Sales x 100

Example: At the end of the year, Company X’s total net sales are £700,000, and their cost of sales is £500,000.

Cost of sales ratio = (£500,000 / £700,000) x 100 → 71.4%

3. Inventory Turnover

What is it? It shows how often a company has sold and replaced inventory during a given period. 

Formula: Inventory turnover = Cost of Sales / Average Inventory

Example: At the beginning of the year, Company X had £350,000 worth of inventory. They bought £500,000 worth of additional inventory. By the end of the year, they had £250,000 worth of inventory left.

Cost of sales = 350,000 + 500,000 – 250,000 → 600,000
Inventory turnover
= 600,000/(350,000+250,000/2) → 2

In our adjoining article Cost of sales: what you need to know for your business, we dive deeper into why it’s important to know these costs, and how they can optimise your cash flow.

Manage your cash flow with ease

The formulas and calculations in this article are stellar for figuring out your profit margins, forecasting your cash flow and maintaining profitability. Keeping track of your cost of sales will help you better understand which areas of production are eating up most of your money and where you can increase efficiency. 

At Tide, we automate your small business accounting. 

Our accounting software takes care of bookkeeping and taxes, so you can go back to doing what you love. Access P&L reports, insights and more in real-time, giving you a greater understanding of your business’s financial health.

Photo by Andrea Piacquadio, published on Pexels

Subscribe to our FREE business tips newsletter

    I am a:

    By subscribing you agree to receive marketing communications from Tide.
    You can unsubscribe anytime using the link in the footer of any of our emails.
    See our privacy policy.

    Thanks for signing up.

    Related Articles

    Image of Tide card

    A business bank account that's free, easy to open, and helps you start doing what you love.

    Tide is about doing what you love. That’s why we’re trusted by 575,000+ sole traders, freelancers and limited companies throughout the UK.

    Open an account
    Image of App Store 4.7, 27k
    Image of Google Play 4.6, 3.7k