For business owners
Free COGS calculator
Use the COGS calculator to reconcile beginning inventory, inventory purchases and ending inventory, then check gross profit against optional revenue.
- Free to use
- No account needed
Your result
Starting example. Replace these figures with your own.
$27,000.00Cost of goods sold for the entered period
- Beginning inventory
- $10,000.00
- Net additions
- $25,000.00
- Goods available for sale
- $35,000.00
- Ending inventory
- $8,000.00
- Gross profit
- $18,000.00
- Gross margin
- 40%
Calculation
COGS = beginning inventory + net inventory additions − ending inventory.
Read with the result
USD. Inventory values use cost, not retail selling prices. Keep period and valuation policy consistent.
This reconciles valuations you enter. It does not calculate FIFO, LIFO or weighted-average inventory values.
Gross profit is revenue less COGS, before operating expenses, financing costs and tax.
More options
Compare another scenario
Scenario B has its own inputs and result. Changes here do not replace Scenario A.
Use it from an AI browser
This page has site tools: actions an AI agent can call directly, with no plugin or API key. The ChatGPT desktop app’s browser can use them where site tools are available, and so can Chrome with WebMCP turned on. The agent works on this page, with the same steps and limits as its buttons, so you can check the result before you use it.
Open doany.ai/tools/cogs-calculator and calculate COGS from USD 10,000 beginning inventory, USD 8,000 net additions and USD 6,000 ending inventory, all at cost. Use USD 20,000 revenue for the same period.
Site tools work only while this page is open. They never send messages, invoices or payments for you.
Reconcile the inventory cost of goods sold
Use inventory values at cost for a single accounting period. This roll-forward is a planning check; it does not choose an inventory valuation method or prepare a tax return.
Start with inventory at cost
Enter the value of beginning inventory for the period. Use your chosen consistent cost basis, not its expected retail selling value.
Add purchases and subtract what remains
Enter inventory purchases for the period and the ending inventory value. The difference is the modeled cost of goods sold; reconcile unusual results against your records.
Compare with period revenue
Optionally add revenue from the same period to see gross profit and gross margin after COGS. Compare a second scenario, then copy or download the reconciliation.
Use a consistent inventory basis
The arithmetic is simple; the values you classify as inventory determine what the result means.
A retail stock period
What to change
Beginning inventory of 5,000 plus 12,000 purchases less 4,000 ending inventory gives 13,000 COGS.
Before you use it
All three inventory values use cost and the same currency.
Check gross profit
What to change
If that period has 20,000 revenue and 13,000 COGS, gross profit is 7,000 and gross margin is 35%.
Before you use it
Gross profit still has to cover operating expenses, financing and any other costs outside the entered COGS.
Investigate a mismatch
What to change
Ending inventory above beginning inventory plus purchases cannot produce ordinary nonnegative COGS in this simplified model.
Before you use it
Review adjustments, omitted purchases, production costs and inventory valuation before changing a figure to force agreement.
Reconcile the inventory and revenue period
- Beginning and ending inventory refer to the boundaries of the same period.
- Inventory is valued at cost rather than selling price.
- Purchases and required cost adjustments use a consistent accounting basis.
- Optional revenue belongs to the same period.
- Gross profit is not net profit or a tax calculation.
Find the goods available at cost
Beginning inventory + inventory purchases gives the cost pool available in the simplified roll-forward. Include relevant inventory costs in your entered basis rather than adding sales or retail markups.
Remove the cost still on hand
COGS = beginning inventory + purchases − ending inventory. Goods remaining at the period end are kept in ending inventory rather than automatically expensed as if sold.
Compare COGS with sales
Gross profit = revenue − COGS, and gross margin = gross profit ÷ revenue × 100. At zero revenue the dollar difference can be shown, but gross margin has no defined denominator.
Sources checked on October 9, 2026: IRS Publication 334: figuring cost of goods soldopens in a new tab
Questions about this tool
What is the COGS formula?
For this simplified inventory roll-forward, cost of goods sold equals beginning inventory plus inventory purchases minus ending inventory. Use cost values from the same period and currency.
Should inventory be entered at cost or selling price?
Use the cost basis in your inventory records. Selling price includes an intended markup and does not represent the cost of goods held or sold. Mixing the two bases distorts both COGS and gross profit.
Are purchases the same as cost of goods sold?
No. Some goods purchased during the period may still be on hand at its end. Ending inventory removes that remaining cost from the simplified goods-sold calculation.
Does this support manufacturing and inventory adjustments?
The tool uses three entered inventory totals. Manufacturing, freight, returns, write-downs and other adjustments must already be reflected correctly in your chosen cost basis. It does not maintain an inventory ledger or choose which costs your accounting requires.
What is the difference between gross profit and net profit?
Gross profit subtracts COGS from revenue. Net profit also depends on the other business expenses and applicable accounting treatment. The optional revenue comparison does not add operating costs, financing costs or tax.
Why is a negative COGS result a problem?
It means ending inventory exceeds beginning inventory plus entered purchases in this simplified model. That calls for reconciliation of the records or missing adjustments; it should not be presented as a normal negative inventory expense.
Does the calculator choose FIFO, LIFO or weighted average?
No. Use consistent values produced by the method appropriate to your records. The calculator checks the roll-forward and optional gross-profit arithmetic; it does not select an inventory or tax method.
Can I use it without uploading accounting records?
Yes. Enter totals and calculate in your browser without signup or an accounting connection. You can compare a second scenario, copy or download the result, and then reconcile it with your actual records.