how to calculate cost of goods sold

How to calculate cost of goods sold and what goes into COGS

EasyERP Team 13/04/2017

If you have never heard about the Cost of Goods Sold or you are not sure about the methods of how to calculate cost of goods sold – this info is for you.

We hope this article will help you learn all you need to know about COGS, discover popular methods of how to calculate the cost of goods sold, as well as few tips on how to choose the right COGS formula for you.

What is the cost of goods sold (COGS)?

COGS is an abbreviation for “Cost of goods sold”. In other words, it is a sum up of all the expenses involved in making a product, it is the direct cost a company pays to make its product or service. All companies incur costs in the creation of their products, the material, labor, etc.

These also include operating costs such as building rental and utilities, that are expenses contributing to the cost of goods sold equation and the final price of the product. Don’t worry if some terms are unknown to you because we will cover every one of them in this article.

First of all, in the formula of how to calculate the cost of goods sold we only include the costs associated with the actual creation of the product. Such is the industry practice. Therefore, transportation, advertisement or sales expenses are not part of that figure. The accounting rules consider the cost of goods sold as an expense of companies. Thus, one can deduct COGS from the revenue to calculate company’s gross margin.

For example, an ordinary Joe buys a shirt from a local retailer for $30. There, part of the price consists of the COGS which as well includes the costs of the items used to make that shirt. Such as fabric, buttons and thread, sewing machine, electricity to run the sewing machine and the plant, labor to sew the shirt.

How to calculate cost of goods sold: COGS formula

In addition, notice that costs we include in the COGS formula do not cover the indirect expenses, such as office expenses, rent, supervisor salaries and so on. This is crucial to the issue of how to calculate the cost of goods sold. To calculate COGS correctly is a must because it is an allowable deduction for a business income. But the cost of goods sold do not matter to our fellow Joe, it does for the seller company. Why? You may ask.

Don’t forget that when you pay taxes, you pay a part of your income. So when you make a mistake in calculating COGS you will pay more taxes than you should, or you could pay less and risk to get fines and penalties, of course, you don’t want that.

Here is a simple basic chart of how to calculate the cost of goods sold:

Cost of goods sold components

What goes into COGS?

So, to begin the inquiry into how to calculate the cost of goods sold (COGS formula) you need to determine which expenses you include and which are do not. As we have stated before, only the costs associated with the actual creation of the product are included in the COGS accounting. Therefore, these could be:

  • Costs to purchase the merchandise that is involved in production;
  • Costs of raw materials;
  • Packaging costs;
  • Salaries for employees that work on the production line;
  • Supplies for production;
  • Direct costs related to production (for example, utilities and rent for manufacturing facility).

COGS is especially relevant for e-commerce companies. For them the cost of goods sold formula will mostly consist of the purchase value of the product. Also, you may wonder – what items make up the cost of goods sold? It includes shipping costs for that product along with purchase value.

Now, when you have more or less determined how to calculate the cost of goods sold and what expenses you would include into the COGS formula, you may think that the hard part is over. All you have left to do is to sum it up. And you will be close to the truth, actually. But imagine this.

You are the owner of online t-shirt selling the business. You always purchase inventory from the same vendor. In the middle of the month, your vendor raises prices from, let’s say, from $5 to $10 per item. In this month you have sold enough, but how do you know an exact number of those shirts purchased for at different prices?

Also, COGS by definition includes only costs of the inventory that has been sold. You can’t include expenses for the products that are still in your possession. So, to figure out this problem you have to use a certain COGS formula. Meaning you have to define for yourself how to calculate the cost of goods sold.

Methods to calculate COGS

At first, you will have to decide when you are going to calculate COGS. You have two options, in other words, two methods:

  • Periodic
  • Perpetual

Periodic COGS

The periodic inventory method counts inventory at different time intervals throughout the year. If you use this, you would periodically count your inventory during the year, maybe at the end of each quarter. Although this system is inexpensive, it isn’t the ideal inventory system because there are extended lag times in real data.

Hence, if inventory count occurs every three months there might be unseen problems with the inventory or shrinkage. Also, you can’t prepare and accurate income statement until the end of each quarter. When using the periodic method to calculate the cost of goods sold, the COGS formula is the following:

Cost of goods sold caclulation

This equation is very simple, hence, all you have to do to understand it is to look at it piece by piece. Beginning with inventory, plus the amount of inventory purchased during the period gives you the total amount of inventory that has been sold. Then, we assume that every item that isn’t in inventory has been sold. So, if we sum up inventory that we had at the start of our period and purchases, then subtract the remaining inventory – we’ll get the COGS.

Perpetual COGS

This method of how to calculate the cost of goods sold counts merchandise in real time. As soon as something is purchased, it is recorded in the system. As soon as something is sold, it is removed from the system keeping in real time count of inventory. Furthermore, the formula is the same as the one in the periodic method. Only we do these calculations after every sale or purchase.

Using a perpetual method to calculate the COGS, you would be able to keep more accurate records of merchandise. As well as to produce an income statement at any point during the period. The only downside to a perpetual COGS formula is that it is very time and cost consuming.

Though, a third-party business application, like EasyERP for instance, can take care of this task for you and provide all kinds of financial statements by the click of the button.

We think the choice of how to calculate the cost of goods sold is on the surface. The perpetual method of cost of goods sold accounting is much more accurate and informative. Also, it is not hard or time-consuming if you pair it with EasyERP.

Inventory evaluation methods for COGS

Moving on, now, you must again select a method of inventory evaluation. There are three main methods:

  • FIFO;
  • LIFO;
  • Average.

What is FIFO? What is LIFO? Why are these important? Let’s elaborate.

FIFO

FIFO stands for “first in first out”. Basically, this is the assumption that the first item we have sold is the first item we have produced or purchased. Using this method of COGS accounting you find a solution to the problem we’ve described before when your vendor raises the price. This is the assumption that, at first, we have sold all of the shirts that we have bought for $5, and then began to sell shirts purchased for $10.

Also, this is the most used method of calculating COGS and the one that is implemented in the EasyERP.

The downside to FIFO

The downside of this method is that inflation has a negative influence. Assume you are using the FIFO method to calculate COGS formula and there is a noticeable level of inflation in your country. This means that all prices are rising over time, including all your expenses and production. At the end of the month, you decide to calculate COGS.

With FIFO method you add purchase prices to a number of items that you have sold this month. But these prices are outdated and noticeably lower because of the inflation. Eventually, you subtract COGS from your revenue to see your net income. At first, you may be happy as the net income rises. But then you realize you have to pay taxes based on that.

However, this effect takes place only for the short period of time, in the long run, this effect diminishes. To sum up, the information, let’s have a closer look at the example:

Date Details Stock level Price per item Value
March 1 Purchased 100 shirts for $5 to sell on Magento 100 $5 $500
March 15 Purchased 70 shirts for $10 to sell on Shopify 100
+
70
=
170
$5

$10
$500
+
$700
=
$1200
March 20 Sold 150 shirts for $15 per item 170

150
=
20
$15 $2250
Sales 150 $15 $2250
Cost of goods sold 100
+
50
$5

$10
$500
+
$500
=
$1000
Gross profit 1250$

FIFO case breakdown

So, let’s break it down day by day. On March 1 we have bought 100 shirts for $5 and stored them on the Magento warehouse. As result, the total amount that we have paid is $500. 15 days later, our vendor has raised the price and we had to buy 70 shirts for $10 for our Shopify warehouse. Thus, we have paid $700.

One extra cool feature of EasyERP is the multi warehouse support. It means you can manage as many warehouses as your business needs. For example create a separate warehouse for each of your E-Commerce marketplaces, like Magento, Shopify or Etsy.

To sum up, we have 170 shirts in our warehouse and we have spent $1200. So far everything is simple, right? Now, on March 20 we have sold 150 shirts, therefore charged $15 for every shirt. As a result, the total revenue is $2250.

Here’s how this would look in the EasyERP accounting module. Remember all of these journal entries are generated automatically:

Journal entires for FIFO method of COGS calculation

To calculate gross profit we have to figure out how to calculate the cost of goods sold. With the FIFO method, we have sold the first batch of shirts first. It means 100 shirts that were bought for $5 each were sold. Then we have sold 50 shirts of the second batch, we have bought them for $10 each. Finally, sum them up and you get:

(100 * $5) + (50 * $10) = $1000.

So our gross profit equals $2250 – $1000 = $1250.

LIFO

As you may already guess, LIFO stands for “last in first out”. This means we assume that the last item purchased or produced is the first item to be sold. Hence, it is the complete opposite of the FIFO formula of calculating COGS. Let’s take a look at the example, so we can clear everything up to you.

Date Details Stock level Price per item Value
March 1 Purchased 100 shirts for $5 to sell on Magento 100 $5 $500
March 15 Purchased 70 shirts for $10 to sell on Shopify 100
+
70
=
170
$5

$10
$500
+
$700
=
$1200
March 20 Sold 150 shirts for $15 per item 170

150
=
20
$15 $2250
Sales 150 $15 $2250
Cost of goods sold 70
+
80
$10

$5
$700
+
$400
=
$1100
Gross profit $1150

So, the starting point is the same, as with the FIFO method to calculate COGS. We have bought 100 shirts for $5 and, two weeks later, bought 70 more for $10. In addition, thanks to EasyERP multi warehouse capabilities, we can show you an example.

LIFO case breakdown

Afterward, we have sold 150 shirts for $15 each, as a result, $2250 revenue. And now, let’s move to the interesting part, to calculate COGS formula with the LIFO method. As we have stated before, last item bought will be the first one to be sold. Therefore, we have sold 70 shirts for $10 and 80 shirts for $5.

Let’s calculate: (70 * $10) + (80 * $5) = $1100.

To compare, this is $100 more than we had in the FIFO method. In addition, here’s a look of all of these operations made in EasyERP accounting module:

 Journal entires for LIFO method of COGS calculation

Quick note: EasyERP doesn’t not support LIFO method of calculating COGS formula, this is only an example.

You may think that higher costs are a bad thing, but somebody may disagree. Because higher costs result in lower gross profit, let’s sum up:

$2250 – $1100 = $1150

As a result, you pay less tax. Assuming that prices rise over time, you’d have to pay more for the previous month inventory. And LIFO method would increase your current costs and decrease net income, compared to FIFO.

That’s why the Last-In-First-Out method of inventory valuation, while permitted under the US Generally Accepted Accounting Principles, is prohibited under the International Financial Reporting Standards (IFRS).  Risks of LIFO lie in potential distortions it may have on a company’s profitability and financial statements.

That’s why EasyERP also uses the FIFO method of inventory evaluation.

Average Cost

The average method of inventory evaluation is aiming to smooth out price changes during the period. Because of that, it is something between FIFO and LIFO methods of how to calculate the cost of goods sold. So, average COGS is calculated by taking the total cost of all inventory and dividing it by the total item count. In conclusion, it is quite simple, isn’t it?

Therefore, the average cost method is just what it sounds like. Therefore, it uses the beginning inventory balance and the purchases over the period to determine an average cost per unit. That average cost per unit then determines both the COGS and the ending inventory balance.

Date Details Stock level Price per item Value
March 1 Purchased 100 shirts for $5 to sell on Magento 100 $5 $500
March 15 Purchased 70 shirts for $10 to sell on Shopify 100
+
70
=
170
$5

$10
$500
+
$700
=
$1200
March 20 Sold 150 shirts for $15 per item 170

150
=
20
$15 $2250
Sales 150 $15 $2250
Cost of goods sold 100
+
50
$7.06 $1059
Gross profit $1191

Average method  breakdown

The beginning is the same as in the FIFO and LIFO examples: we have purchased 100 shirts for $5 and 70 shirts for $10. Then we’ve sold 150 shirts for $15 each earning $2250. Furthermore, thanks to the accounting module and multi warehouse capabilities of the EasyERP we can show you an example using journal entries:

Journal entires for average COGS calculation

Quick note: EasyERP doesn’t not support average cost method to calculate COGS, this is only an example.

So, how to calculate the cost of goods sold using the average cost method? At first, we must figure out the total value of our inventory. We have 170 shirts with the full value of $1200. Let’s find the average value $1200 / 170 = $7,06.

The final step will be multiplying this value by the total number of units sold, $7,06 * 150 =  $1059. As you can see, this value is between costs calculated by FIFO and LIFO methods, justifying the name of the method.

To finish up, let’s calculate the gross profit:
$2250 – $1059 = $1191

Summary

  • The perpetual method of inventory evaluation is tracking each individual item of inventory after every operation. It can be pricey to realize, but it enhances accounting and makes it easier to keep it up to date.
  • The periodic method of inventory evaluation is counting your inventory at the end of each period, then calculating Cost of Goods Sold using one of the following methods.
  • FIFO (first in, first out) method assumes that you sell the oldest items first;.
  • LIFO (last in, first out) method assumes the opposite, you sell the newest items first;
  • The average cost method dictates that you calculate your COGS using the average cost.
Chatra