COGS calculator for online stores.
Enter the inventory you started with, what you bought and what is still on hand. Get cost of goods sold for the month or the year, and your COGS percentage and gross margin when you add net sales.
Works in your browser · pre-filled with a demo store's September
Cost of goods sold
| Beginning inventory | |
|---|---|
| Purchases, freight, duty & other costs | |
| Goods available for sale | |
| Ending inventory | |
| Cost of goods sold | |
| Net sales | |
| COGS as % of net sales | |
| Net sales less COGS | |
| Gross margin before fees |
DEMO OUTDOOR CO. FIGURES UNTIL YOU CHANGE THEM · NOT A CLIENT
Cost of goods sold: 23,190.40, 36.0% of net sales.
How the calculator works it out.
Cost of goods sold = beginning inventory + purchases + inbound freight & duty + other product costs − ending inventory
Start with what was on the shelf when the period opened. Add everything you bought to sell, with the cost of getting it to you. That total is what you could have sold. Take away what is still on hand at the end, and what is left is the cost of what actually went out the door.
With the demo store's September: 52,300.00 + 24,890.40 = 77,190.40 available, less 54,000.00 still on hand, gives 23,190.40 cost of goods sold.
COGS % = cost of goods sold ÷ net sales
Gross margin = (net sales − cost of goods sold) ÷ net sales
23,190.40 ÷ 64,490.00 = 36.0% of net sales, which leaves a gross margin of 64.0% before selling costs such as marketplace fees, advertising and shipping to customers. Those come off next on the profit and loss.
Ending inventory is the number most often wrong for online sellers: it means every unit you own, including stock held at a fulfillment center or a 3PL. Count it, or take it from your inventory records, at the same point in time as the period end.
COGS in your books, every month.
Our monthly e-commerce bookkeeping keeps inventory and cost of goods sold current, so your gross margin is a real number every month, not only at year end.
AnswerCOGS formula: how to calculate cost of goods sold online
The formula worked through, why it goes wrong for sellers, and what it costs to get wrong.
Read the answer →See where your books stand — free.
Get a written review of every channel: what's reconciled, what's missing, and the exact price to fix it. No card, no commitment.
Get my free books review