Cost of Goods Sold Calculator

Calculate cost of goods sold from entered opening stock, purchases and closing stock.

On-device No sign-up Free to use

Calculate result controls

Showing an example. Edit to see your own.

?

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

More options
?

Labels the amounts you enter. It does not convert currencies or fetch rates.

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

Result

Showing an example.

Opening stock of $20,000 plus $50,000 net purchases gives $70,000 goods available at cost. Keeping $15,000 as closing inventory leaves $55,000 COGS.

Cost of goods sold is $55,000.00, after subtracting closing inventory of $15,000.00 from goods available for sale of $70,000.00.

https://usefreetools.net/cost-of-goods-sold-calculator · 20 November 2026

Was this helpful?

How to use Cost of Goods Sold Calculator

  1. Enter Opening inventory value at cost for the beginning of your period.
  2. Enter Net purchases for the same period after the returns, allowances and inventory-cost adjustments you intend to include. This field is a prepared total, not a purchase ledger.
  3. Enter Closing inventory value at cost at the end of that period, using the same valuation basis. Do not substitute sales revenue or retail selling prices.
  4. Select Calculate result. Goods available is opening inventory plus net purchases; Cost of goods sold subtracts closing inventory. Review the cost-share table and copy the result if needed. There is no download file.

Example: Cost of Goods Sold Calculator

Opening stock of $20,000 plus $50,000 net purchases gives $70,000 goods available at cost. Keeping $15,000 as closing inventory leaves $55,000 COGS.

You add
Currency used for display: USD; Opening inventory value: 20000; Net purchases for the period: 50000; Closing inventory value: 15000
You get
Cost of goods sold is $55,000.00, after subtracting closing inventory of $15,000.00 from goods available for sale of $70,000.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.
Currency display
Choose a monetary label for the three entered balances and calculated cost amounts. Percentage shares use Goods available as their denominator and do not change with the currency label.

Supported inputs and limits

  • Inputs must be nonnegative and no more than 1,000,000,000,000 each, with up to 25 digits and 12 decimal places.
  • Grouping commas and a leading $ are accepted; use a period for decimals and one currency throughout.
  • Closing inventory cannot exceed opening inventory plus net purchases.
  • This is a periodic cost identity.
  • Net purchases must already contain the adjustments you want; the page does not choose a valuation method, determine allowable tax costs, calculate freight/returns separately or create accounting entries.
More details

Each share divides by Goods available.

When that amount is zero, shares are undefined rather than 0% or 100%.

Monetary table amounts round to two places; very small copied-text amounts may use scientific notation.

The result does not import stock movements, connect to accounts or automatically save records.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved 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.

Page updated · Project managed by Tony Hines · Report a problem with Cost of Goods Sold Calculator