Cost of Goods Sold Calculator

Calculate periodic cost of goods sold from opening inventory, net purchases and closing inventory.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Calculate result controls

Showing an example. Edit to see your own.

Enter purchases after returns and allowances, including costs you classify as inventory costs.

Processed in your browser. Your inputs stay on this device.

How to use Cost of Goods Sold Calculator

  1. Enter opening inventory at cost.
  2. Enter net purchases for the same period.
  3. Enter closing inventory and review the calculated cost of goods sold.

Example: Cost of Goods Sold Calculator

Cost of Goods Sold Calculator: Cost of goods sold is 55000.00, after subtracting closing inventory of 15000.00 from goods available for sale of 70000.00.

You add
Opening inventory value: 20000 Net purchases for the period: 50000 Closing inventory value: 15000
You get
Cost of goods sold is 55000.00, after subtracting closing inventory of 15000.00 from goods available for sale of 70000.00. Opening inventory: 20000.00 Net purchases: 50000.00 Goods available for sale: 70000.00 Closing inventory: 15000.00 Cost of goods sold: 55000.00 Opening inventory | 20000.00 Net purchases | 50000.00 Goods available for sale | 70000.00

Options

Inventory at cost
Use opening and closing inventory values measured on the same cost basis. Retail selling prices belong to a different calculation.
Net purchases
Enter the purchase total after the adjustments you intend to include. This page does not decide which shipping, return or discount entries belong in that figure.

Supported inputs and limits

A periodic inventory identity using values you supply at cost. Net purchases should already reflect the adjustments you intend to include. Closing inventory cannot exceed opening inventory plus purchases. No inventory valuation method or accounting entries are chosen. Enter plain decimals with at most 64 characters, 25 digits and 12 fractional places. Monetary inputs are limited to 10^12. Very small or large nonzero amounts use scientific notation. Use one currency throughout; no exchange rates, taxes or fees are added unless you enter them.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Reconcile the period before using the total

Goods available at cost equal opening inventory plus net purchases. The closing balance is then subtracted. A count or valuation error in closing inventory changes the result directly, so keep the calculation with the records supporting all three amounts. It supplies arithmetic for a periodic inventory model, not accounting entries.

Questions about Cost of Goods Sold Calculator

Should I enter sales revenue?

No. These fields use inventory and purchase costs. Revenue belongs in a separate profit calculation.

Where do purchase returns go?

Include their effect in the net purchases figure before entering it. The tool has no separate returns or freight ledger.

Why is a negative result refused?

It means closing inventory exceeds the available cost under this simplified identity. Recheck the figures and any missing adjustments.

Project manager: Tony Hines · Content updated 4 October 2026 · Report a problem