COGS Calculator

This COGS calculator works out cost of goods sold from your beginning inventory, your purchases during the period and your ending inventory. With $100,000 of beginning inventory, $600,000 of purchases and $100,000 of ending inventory, the cost of goods sold is $600,000.

Finance: Business & Investing Calculators

COGS Calculator

Cost of goods sold for a period, from beginning inventory, purchases made during the period, and ending inventory.

$
$
$

Starting values: $100,000 of beginning inventory, $600,000 of purchases and $100,000 of ending inventory give a COGS of $600,000. The numbers are examples.

How to use the calculator

  1. Enter the value of the inventory at the start of the period.
  2. Enter the purchases made during the period.
  3. Enter the value of the inventory at the end of the period.

The formulas

COGS = Beginning Inventory + Purchases − Ending Inventory

The result never goes below zero.

Where:

  • Beginning Inventory = the value of stock at the start of the period
  • Purchases = what you bought during the period
  • Ending Inventory = the value of stock at the end of the period

Worked examples

Example 1: the default

Beginning inventory $100,000 + purchases $600,000 − ending inventory $100,000 = $600,000.

Example 2: growing stock

$100,000 + $600,000 − $150,000 = $550,000. Stock rose, so less of the purchases counts as cost of goods sold.

Example 3: shrinking stock

$150,000 + $500,000 − $80,000 = $570,000. Stock fell, so more than the purchases counts as cost of goods sold.

Example 4: a result below zero

Beginning $20,000 + purchases $10,000 − ending $50,000 would be negative. The calculator shows $0, so check your figures if you see that.

Why the formula works

At the start of the period you had some stock, and during the period you added more by buying. Together, that is the goods that were available to sell. What is left at the end was not sold, so subtracting the ending inventory leaves the cost of the goods that were sold. In Example 1, the goods available are $700,000 and $100,000 remain, so $600,000 was sold at cost.

What to include in purchases

Use the cost of the goods that you bought for resale, including any costs that your accounting rules treat as part of the cost of inventory. Rules differ by country and by the type of business, and your accountant can tell you what applies to you. The calculator takes the three numbers as they are, and it does not apply an accounting rule.

Using COGS for other results

COGS is an input to other calculations. Gross profit is sales less COGS, and the inventory turnover ratio is COGS divided by average inventory. With the default numbers, a COGS of $600,000 and an average inventory of $100,000 give a turnover of 6.00, which the inventory turnover calculator shows.

Checking the result

If the result is $0 or looks too low, check that the beginning and ending values are on the same basis and that the ending value is not larger than the goods that were available. A count of the inventory at the end of the period gives the most reliable ending figure.

Common mistakes

  • Entering the selling price of inventory, not its cost.
  • Using the ending inventory of a different date.
  • Leaving out purchases that were made late in the period.
  • Mixing up the beginning and the ending inventory.

Limits

The calculator adds and subtracts three numbers. It does not apply any accounting method, and it is not accounting or tax advice.

A short example from start to finish

Suppose a shop starts a quarter with $40,000 of stock, buys $90,000 of goods during the quarter and ends it with $35,000 of stock. COGS is 40,000 + 90,000 − 35,000 = $95,000. If the shop sold those goods for $150,000, the gross profit is 150,000 − 95,000 = $55,000. The calculator performs the first step, and the second is a subtraction that you can do on your own.

How stock changes affect COGS

When stock grows during the period, part of what you bought is still on the shelf, so COGS is lower than your purchases. When stock shrinks, you sold more than you bought, so COGS is higher. The two cases are in Examples 2 and 3. This is one reason that a purchase total on its own is a poor guide to the cost of what you sold.

A short checklist

  • Use the same period for all three numbers.
  • Value the beginning and ending inventory on the same basis.
  • Include all purchases made in the period, even late ones.
  • Ask your accountant about costs that count as part of inventory in your country.

Common questions from the books

If your ending inventory is a count and your purchases come from invoices, differences between the two sources are normal. Reconcile them before you rely on the result. A quarter-end count, a list of open orders and a check of the last invoices of the period catch most errors. Keep the working with the result, so that the numbers can be checked again later.

Keep the three inputs with the result, so that the working can be checked.

Where you can, use a physical count at the end of the period for the ending inventory.

Round only at the end of the calculation.

Working on something related? Try the freelance hourly rate calculator, ROI calculator or ROAS calculator.

Frequently asked questions

How do I calculate COGS?

Add the beginning inventory and the purchases, and subtract the ending inventory. $100,000 + $600,000 − $100,000 = $600,000.

Why can the result be $0?

The calculator never shows a negative number. If the ending inventory is larger than the goods available, check your figures.

What do I count as purchases?

The cost of goods bought for resale in the period. Ask your accountant what else counts as inventory cost.

Is COGS the same as expenses?

No. It covers the cost of the goods sold, not other business expenses.

How do I use COGS for inventory turnover?

Divide it by the average inventory.

Mark Danny

Mark Danny

Mark Danny builds and maintains the free calculators and guides on Area of Irregular Shapes Calculator. Every calculator page explains its formula and shows a worked example, so you can check the working yourself. Spotted a mistake or have a suggestion? Email gulsher.hingoro101@gmail.com.

Articles: 836