Skip to content
Free Calculator

COGS Calculator

Calculate COGS step by step: COGS = beginning inventory + purchases − ending inventory.

In short

Formula: COGS = beginning inventory + purchases − ending inventory.

Press Calculate, or Enter in any field.

A retail quarter

$20,000 opening stock, $50,000 bought, $15,000 left at the end.

Complete the required fields to see the result.

What this calculator does

Calculate COGS step by step: COGS = beginning inventory + purchases − ending inventory. Worked example, questions and limitations included.

Use it to turn Currency (symbol only, never converted), Beginning inventory, Purchases (net, including freight-in), Ending inventory into a checked result you can compare, copy, or rerun with different assumptions.

The page shows the formula, a numeric worked example, and the assumptions that affect this accounting & costing calculation.

Inputs and what they mean

Currency (symbol only, never converted)
— choice value.
Beginning inventory
— number value.
Purchases (net, including freight-in)
— number value.
Ending inventory
— number value.

How to use it

  1. Enter each value in the unit shown next to the box (use the unit converter first if your numbers are in other units).
  2. Check the breakdown to see every intermediate step.
  3. Read the limitations before relying on the result.

Formula

Periodic inventory method, as in OpenStax Principles of Accounting Vol. 1.

Purchases should be net of returns and discounts, plus freight-in.

Inventory values must use the same costing method (FIFO, LIFO or weighted average) at both ends.

COGS = beginning inventory + purchases − ending inventory.

Inputs used: Currency (symbol only, never converted), Beginning inventory, Purchases (net, including freight-in), Ending inventory.

Worked example

A retail quarter

  1. Goods available: 20,000 + 50,000 = $70,000.
  2. COGS: 70,000 − 15,000 = $55,000.

Reading the result

The headline figure is the main answer. Any breakdown underneath shows the parts that make it up, so you can check the working and see what changes when you adjust an input.

Limitations and assumptions

  • Periodic method only.
  • Does not value inventory for you.
  • Shrinkage is hidden inside the ending count.
  • Results are educational estimates built only from the figures you enter. They are not personalised investment, tax, legal or accounting advice. Rates, growth and discount assumptions are always yours to choose.
  • The result depends on the values you enter for this cogs calculator; it does not supply missing rates, rules, prices, dates, or assumptions for you.

Common questions

Does COGS include overheads?

For a manufacturer, product cost includes direct materials, direct labor and manufacturing overhead. Selling and admin costs are never part of COGS.

Which inventory method should I use?

Use whatever your books use. This calculator does not choose FIFO, LIFO or average cost for you.

What if I use a perpetual system?

Your system records COGS with each sale. This formula is still a useful cross-check at period end.

How do I use the COGS Calculator?

Enter the required values for Currency (symbol only, never converted), Beginning inventory, Purchases (net, including freight-in), Ending inventory. The calculator applies the formula on this page and shows the main result with any supporting breakdown so you can check the arithmetic.

What formula does the COGS Calculator use?

COGS = beginning inventory + purchases − ending inventory. The visible formula section above lists the calculation path and the edge cases the page handles, so the result can be checked without relying on the form alone.

Can the COGS Calculator be used for exact decisions?

Use it as a calculation aid, not as a substitute for checking the underlying rule, contract, policy, or professional advice that applies to your situation. When a result depends on local rules, personal details, prices, or dates, enter those values yourself and confirm them before acting.

Related tools

Calculate Gross Profit step by step: Gross profit = net revenue − cost of goods sold.

Accounting & Costing

Calculate Gross Margin step by step: Gross margin % = (net revenue − COGS) ÷ net revenue × 100.

Accounting & Costing

Calculate Contribution Margin Ratio step by step: Contribution margin ratio = (sales − variable costs) ÷ sales × 100.

Accounting & Costing

Calculate Break-Even Revenue step by step: Break-even revenue = fixed costs ÷ contribution margin ratio.

Accounting & Costing

Calculate Target Profit step by step: Target units = (fixed costs + target profit) ÷ (price − variable cost per unit), rounded up to a whole unit.

Accounting & Costing

Calculate Margin of Safety step by step: Margin of safety % = (actual sales − break-even sales) ÷ actual sales × 100.

Accounting & Costing

People also use