Skip to content
Cash Calculator Hubby cashcalchub

Cost of Goods Sold Calculator

Calculate COGS from beginning inventory, purchases and ending inventory.

Change any value: results update instantly
Results
Cost of goods sold$168,000.00
Gross profit$152,000.00
Gross margin47.5%
Goods available for sale$220,000.00

Please do not make financial decisions based on these results.

What is the Cost of Goods Sold Calculator?

Calculate COGS from beginning inventory, purchases and ending inventory. To use the Cost of Goods Sold Calculator, enter beginning inventory, purchases during period, ending inventory, net sales; it returns cost of goods sold, gross profit, gross margin, goods available for sale, and shows them instantly as you type.

Where the Cost of Goods Sold Calculator fits

Calculate COGS from beginning inventory, purchases and ending inventory. The main figure it returns is the Cost of goods sold, worked out from the values you enter.

It belongs with the other business planning tools. If you are comparing options or checking a result from another angle, try the FIFO Calculator for Inventory, Average Fixed Cost Calculator or the Cost of Doing Business Calculator.

How to use the Cost of Goods Sold Calculator

  1. Enter your numbers. The inputs are Beginning inventory ($), Purchases during period ($), Ending inventory ($), Net sales ($). Use figures from the same period (same month, quarter or year) for every field. Fields marked optional can stay at zero.
  2. Read the result. The highlighted box gives the Cost of goods sold, and the cards below show Gross profit, Gross margin, Goods available for sale. Tables and charts break it down further.
  3. Test other scenarios. Results update as you type. Change one value at a time to see what drives the answer, and press Reset to go back to the defaults.

Formula and how it works

COGS = beginning inventory + purchases − ending inventory.

Example with real numbers

Here is the Cost of Goods Sold Calculator using the default values shown in the calculator above:

Inputs

Beginning inventory ($)40,000
Purchases during period ($)180,000
Ending inventory ($)52,000
Net sales ($)320,000

Results

Cost of goods sold$168,000.00
Gross profit$152,000.00
Gross margin47.5%
Goods available for sale$220,000.00

With these inputs the calculator returns Cost of goods sold: $168,000.00. Change any value in the calculator to see how the result moves.

What if you change one input?

Sensitivity check: raising Beginning inventory ($) from 40,000 to 48,000 (about 20% higher) and leaving everything else as in the example above changes the results like this:

ResultExampleAfter the changeChange
Cost of goods sold$168,000.00$176,000.00+4.8%
Gross profit$152,000.00$144,000.00-5.3%
Gross margin47.5%45%-5.3%
Goods available for sale$220,000.00$228,000.00+3.6%

The input that moves the result most is the one to check twice. Change it in the calculator above to test your own case.

What the results tell you

The results panel of the Cost of Goods Sold Calculator reports Cost of goods sold, gross profit, gross margin and goods available for sale. Compare these figures while changing one input at a time, and use the related calculators below to look at the same situation from another angle.

Method and limits. This calculator applies the formula in the section above to your inputs, in your browser; nothing you enter is stored on our servers. The result is only as accurate as the numbers you enter and the formula shown above. It is for information, not financial, tax or legal advice.

Frequently asked questions

Which costs are in COGS?

Direct materials, direct labor and production overhead tied to goods sold, not marketing or office salaries.

Can I use these for a business plan?

Yes. They give quick estimates for break-even, valuation, budgets and project returns. Confirm important figures with your accountant before relying on them.

Are the results forecasts?

No. They apply the formula shown to the numbers you enter, so the output is only as realistic as your assumptions.

Are the results guaranteed?

No. Results depend entirely on the numbers you enter and the formulas shown on this page. Please do not make financial decisions based on them alone; confirm important figures with a licensed professional.

All Business Planning calculators →

Disclaimer: Please do not make financial decisions based on these results. These calculators are for general information only. Talk to a licensed professional before making any financial, tax or legal decision. Read the full disclaimer.
HomeAll ToolsMortgage & Real EstateAutoInvestmentRetirementTax & SalaryBudget & PlanningLoans & DebtCurrency & InflationBusiness PlanningMarketing & SaaS MetricsHR & WorkforceStocks & Equity AnalysisBonds & Credit RatiosOptions & DerivativesAccounting & MicroeconomicsSales, Discounts & PricingMacroeconomicsUK FinanceIndia & Pakistan FinanceBusiness & Everyday Tools
Privacy PolicyDisclaimerAboutContact
© 2026 Cash Calculator Hub. Please do not make financial decisions based on these results.