How to Calculate Cost of Goods Sold (and Save on Your Taxes in the Process)

By Bryce Warnes on March 14, 2018

If your small business sells a physical product, you’ve probably heard the term “Cost of Goods Sold” (or “COGS”) thrown around. Knowing how to properly calculate COGS can help you deduct the business expenses you incurred while getting or making the inventory you sold. And who doesn’t love a good tax deduction?

Below, we explain exactly what COGS is, how to calculate it, and why that matters for your business.

What is Cost of Goods Sold?

Cost of Goods Sold (COGS) is the total cost associated with making or acquiring any goods sold during the reporting period.

There are two important things to note about calculating Cost of Goods Sold:

  1. COGS is calculated based only on products you actually sold to customers and doesn’t include inventory you still have on hand.
  2. It’s all about the production costs you incurred, and doesn’t include overhead expenses for the general operation of your business.

Here’s why you should care about COGS

Cost of Goods Sold is important for your taxes. It’s the sum total of the money you spent getting your goods into your customer’s hands—and that’s a deductible business expense. The more eligible items you include in your COGS calculation, the lower your small business tax bill.

Your COGS can also tell you a lot about the overall health of your small business. When you subtract COGS from revenue, you’re left with your gross margin—how much money you’re making from each product you sell.

Gross margin is one of the most helpful numbers to study, it can tell you whether your prices are too low, or if you’re spending too much on production. That alone is reason enough to calculate COGS.

Accounting 101: Set Your Finances up the Right Way

Learn the fundamentals of small business accounting, and set your finances up for success with this free guide.

First, you need to know the value of your inventory

Before you can calculate your COGS, you need to know the value of your inventory. To figure this out, you need to add up all the costs that you incurred getting your product ready to sell to your customer (if you use Bench, we’ll do this for you).

Here are common costs to include when valuing your inventory:

  • Cost of raw materials
  • Cost to purchase inventory for resale
  • Packaging or repackaging costs
  • Labour costs for anyone who worked on the goods during production
  • Utilities and rent for your manufacturing facility
  • Production supplies
  • Freight in and out (but not shipping to a customer)

There are also some less obvious costs to consider that could help to lower your tax bill:

  • Costs to store or wholesale the goods
  • Depreciation of equipment used to produce, package or store the goods
  • Salaries of administrators or managers overseeing production
  • Equipment used for administrative work during production
  • Commission expenses

What you can and can’t include when calculating inventory costs will vary by industry and product. The IRS has a long article about COGS, but it’s always a good idea to consult a CPA to ensure you’re not missing out on any deductions. They can look at complex things like rent, mortgage interest and utilities, and figure out how to assign a percentage to each of the products in your inventory.

Let’s imagine your small business sells wool socks. You buy them from a distributor for a certain price, but in order to determine the cost of your inventory, you also need to factor in shipping them from the factory to the warehouse, storing them, repackaging them, etc. Once all this is factored in, you know the total cost of your inventory.

When you have a clear picture of the total cost of your inventory, next you look at how much you actually sold. Then, voila! You are ready to calculate your COGS.

Doing your COGS calculation

Here’s the formula for calculating COGS:

Beginning Inventory
+ Inventory Purchases Made During the Reporting Period
- Ending Inventory

= COGS

The three numbers involved in your COGS calculation are:

  1. Beginning inventory: The value of the product you started with. This should be the exact same number as your ending inventory from the previous reporting period.
  2. Inventory purchases made (during the reporting period): The value of what you added throughout the year.
  3. Ending inventory: The value of what’s left over at the end. If you have a smaller business, you will physically count everything that’s leftover. If you have a bigger operation, you’ll perform spot checks on your stock.

Let’s say your wool sock company has a beginning inventory of $50,000 for the year. Inventory purchases made during the reporting period are $75,000, and you have $35,000 left over at the end. Here is how you would calculate COGS:

$50,000 (beginning inventory)
+ $75,000 (inventory purchases made)
- $35,000 (ending inventory)
= $90,000 (COGS)

Most bookkeeping software will help you determine COGS if you track your inventory and sales. COGS numbers are usually included in your Profit & Loss reports. And if you use Bench, we’ll calculate it for you.

If your inventory costs change throughout the year, this will also have implications for calculating your COGS, but there are a few ways you can account for that when doing your calculations.

What to do if a meteor strike (or something less dramatic) changes your inventory costs

If a meteor struck New Zealand and wiped out half the sheep population, the price of wool would skyrocket. Suddenly, your wool sock inventory is split into pre-meteor and post-meteor values. You can account for the changing costs in one of three ways: average cost, FIFO, or LIFO.

Pre-meteor batch: 200 pairs for $5 each = $1,000

Post-meteor batch: 300 pairs for $10 each = $3,000

Let’s look at the cost of socks sold under the three different methods, if you sold only 400 out of the 500 mixed-value inventory.

The average cost method

Average cost is the most straightforward. You’d look at all the socks purchased and figure out the average cost per pair. In this case you have 500 pairs of socks for $4,000, so each pair is $8. The cost of the 400 pairs of socks you sold is $3,200.

FIFO, or “first-in, first-out”

FIFO assumes that the first socks you sell are the first socks you purchased. So if you sold 400 pairs, the first 200 cost $5 each, and the next 200 cost $10 each. The total cost of products sold using FIFO is $3,000. FIFO is generally preferable in times of rising prices, because costs are recorded as lower and income is recorded as higher.

LIFO, or “last-in, first-out”

LIFO assumes that the first socks you sell are the last socks you purchased. Since you sold 400 pairs, the first 300 cost $10 each, and the next 100 cost $5 each. The total cost of your products sold using LIFO is $3,500.

LIFO is generally preferable in times when tax rates are high, because costs assigned will be higher and income will be lower (which gives you a bigger break on your taxes). Just beware: using LIFO can result in the IRS making adjustments to your taxable income.

If your business is U.S.-based, you’ll need to fill out IRS Form 970 before switching to LIFO (you can’t use LIFO in Canada or any other IFRS country).

You should talk to your CPA about which method to select, and remember that you can’t switch between methods whenever you want. You need to apply to the IRS with Form 3115 for a change.

You know your COGS. Now what?

After you’ve calculated your COGS, you’ll include the final number on your small business tax return. Depending on what kind of business entity you are, the process will look different.

For sole proprietors and single-member LLCs using Schedule C, your COGS is calculated in Part III and included in the income section of Part I.

For partnerships, multiple-member LLCs, C corporations, and S corporations, your COGS is calculated separately on Form 1125-A. This one is a little tricky, so most businesses of this type have a professional handle it.

The better your records and bookkeeping, the easier it will be to cost out your inventory and determine your COGS. Accurate records will also make it easier to spot extra deductions for your tax return. And if accounting isn’t your strong suit, our bookkeeping team here at Bench is always ready to help.

Accounting 101: Set Your Finances up the Right Way

Learn the fundamentals of small business accounting, and set your finances up for success with this free guide.


This post is to be used for informational purposes only and does not constitute legal, business, or tax advice. Each person should consult his or her own attorney, business advisor, or tax advisor with respect to matters referenced in this post. Bench assumes no liability for actions taken in reliance upon the information contained herein.

Friends don’t let friends do their own bookkeeping. Share this article.

Want a free month of bookkeeping?

Sign up for a trial of Bench. We’ll do one month of your bookkeeping and prepare a set of financial statements for you to keep. No pressure, no credit card required.

Decorative patterns