COGS Calculator
Calculate COGS step by step: COGS = beginning inventory + purchases − ending inventory.
In short
Formula: COGS = beginning inventory + purchases − ending inventory.
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
- Enter each value in the unit shown next to the box (use the unit converter first if your numbers are in other units).
- Check the breakdown to see every intermediate step.
- 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
- Goods available: 20,000 + 50,000 = $70,000.
- 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.
Calculate Gross Margin step by step: Gross margin % = (net revenue − COGS) ÷ net revenue × 100.
Calculate Contribution Margin Ratio step by step: Contribution margin ratio = (sales − variable costs) ÷ sales × 100.
Calculate Break-Even Revenue step by step: Break-even revenue = fixed costs ÷ contribution margin ratio.
Calculate Target Profit step by step: Target units = (fixed costs + target profit) ÷ (price − variable cost per unit), rounded up to a whole unit.
Calculate Margin of Safety step by step: Margin of safety % = (actual sales − break-even sales) ÷ actual sales × 100.