Skip to content
FiftyCalc Free calculators for all 50 states

COGS Calculator (Cost of Goods Sold)

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter the inventory at the start and end of the period and what you bought in between to find the cost of goods sold, then add sales to see gross profit.

Result

Sample figures

Cost of goods sold—

Gross profit ($) —

  • Gross margin—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

COGS Calculator (Cost of Goods Sold)

Beginning inventory, in dollars: enter 0 or more. Prefilled example: 50,000.

Purchases during the period, in dollars: enter 0 or more. Prefilled example: 120,000.

Ending inventory, in dollars: enter 0 or more. Prefilled example: 40,000.

Net sales for the period, in dollars: enter 0 or more. Prefilled example: 250,000.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Beginning inventory, in dollars: enter 0 or more.
  2. Purchases during the period, in dollars: enter 0 or more.
  3. Ending inventory, in dollars: enter 0 or more.
  4. Net sales for the period, in dollars: enter 0 or more.
  5. Read the result: Cost of goods sold; the panel also shows Gross profit ($) and Gross margin.

How this calculator works

Cost of goods sold = beginning inventory + purchases − ending inventory (the periodic inventory method). Purchases include freight-in and other costs of getting goods ready for sale.

Gross profit = net sales − COGS, and gross margin = gross profit ÷ net sales × 100.

The formula

  1. C=beg+p−end
Symbols used in the formula
SymbolMeaningUnit
begBeginning inventory$
pPurchases during the period$
endEnding inventory$
CCost of goods sold$

Worked example

Beginning inventory$50,000
Purchases during the period$120,000
Ending inventory$40,000
Net sales for the period$250,000
Gross profit ($)$120,000
Gross margin48%
  1. C=50,000+120,000−40,000=130,000

Cost of goods sold $130,000

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What is COGS with $50,000 opening stock, $120,000 of purchases and $40,000 closing stock?

$130,000. On $250,000 of sales that leaves $120,000 of gross profit, a 48% gross margin.

Are wages part of COGS?

Only direct labor that goes into making the product. Sales, office and administrative wages are operating expenses.

Related calculators