COGS calculator: what the stock you sold cost you.
Enter your stock at the start, what you bought and your stock at the end, all at cost. The page works out the cost of goods sold, with the gross profit and margin, or estimates the closing stock when you have not counted. Further down, compare FIFO, LIFO and average cost on one item. It runs in your browser: nothing is uploaded.
- Goods available to sell
- $105,000
- Gross profit
- $42,000
- Gross margin
- 37.5%
- Markup on cost
- 60%
What cost of goods sold is
Cost of goods sold, or COGS, is what the stock you sold in a period cost you. On a profit and loss statement it sits under sales: sales minus cost of goods sold is the gross profit. For a business that keeps stock, it comes from three figures, all at cost, which is what you paid, not what you sell for:
- Stock at the start. What you held on the first day of the period: last period's closing figure.
- Purchases. What you bought in the period, with the delivery charges to get it to you, less what you sent back and any discounts.
- Stock at the end. What you held on the last day, from a count, valued at what you paid. It becomes the next period's stock at the start.
In accounts, the stock at the start and the stock at the end are called beginning inventory and ending inventory.
If you make what you sell, cost of goods sold also takes in the labor and overhead that went into it, and the stock includes work in progress. Ask your accountant which costs count for you.
How it is worked out
- goods available = stock at the start + purchases
- cost of goods sold = goods available - stock at the end
- gross profit = sales - cost of goods sold
- gross margin = gross profit / sales
- markup on cost = gross profit / cost of goods sold
Worked example, with the figures the page loads. You start the quarter with $40,000 of stock at cost and buy $65,000 more, so $105,000 was available to sell. The count at the end comes to $35,000. The stock that went out cost $105,000 - $35,000 = $70,000: that is the cost of goods sold. Sales were $112,000, so the gross profit is $42,000, a gross margin of 37.5% and a markup on cost of 60%.
Because it is worked out from what is left, cost of goods sold this way also takes in stock that was lost, stolen, damaged or thrown away. To see those apart, they have to be recorded as they happen. The turnover calculator takes the same three figures: the cost of goods sold, the stock at the start and the stock at the end.
Estimating closing stock without a count
When you need a figure between counts, for a monthly report or after a fire or a theft, the gross profit method estimates it from your usual gross margin. Switch the calculator to Closing stock and enter your sales and the margin.
In the example, the margin is usually 37.5%, so $112,000 of sales cost about 62.5% of that: $70,000. Take that from the $105,000 available, and about $35,000 should be left, the same as the count.
It is only as good as the margin. It cannot see stock that was lost or stolen, a change in prices or a different mix of what sold, so it does not replace a count. The inventory count sheet prints a sheet to count from, grouped by location.
FIFO, LIFO and average cost
When you buy the same item at different prices, the cost of goods sold depends on which prices the units sold are taken to carry. There are three common ways to decide:
- FIFO, first in, first out: the units sold carry the oldest prices, and what is left carries the newest. It matches the order most stock is used in.
- LIFO, last in, first out: the units sold carry the newest prices. When prices are rising, that gives a higher cost of goods sold and a lower profit, and leaves the old prices in the stock.
- Weighted average: every unit carries the average price of all the units.
Enter the lots one item came in, oldest first, and how many units sold.
- Cost of goods sold
- $2,650
- Left on the shelf
- $1,800
- Cost of goods sold
- $2,900
- Left on the shelf
- $1,550
- Cost of goods sold
- $2,781.25
- Left on the shelf
- $1,668.75
In the example, 250 of 400 units sold. FIFO takes 100 at $10 and 150 at $11: $2,650. LIFO takes 100 at $12.50 and 150 at $11: $2,900. The average is $4,450 / 400 = $11.125 a unit, so 250 cost $2,781.25. Whatever the method, the cost of goods sold and what is left add up to the $4,450 paid.
The calculator treats every lot as on hand before the sales, as at a count at the end of a period (the periodic method). Worked out sale by sale as stock arrives (the perpetual method), LIFO and average can come out different, because a sale can only take from lots already received. FIFO comes out the same either way. LIFO is allowed in the US but not under IFRS, the standard most other countries use. Which method to use for your accounts and taxes is a question for your accountant; once chosen, it is usually kept from year to year.
Cost of goods sold and InventoryQuick
InventoryQuick does not work out cost of goods sold, or what your closing stock cost. It holds the figures to work them out from.
- Stock at cost on the day: on the Items screen, open Import/Export, go to the Export tab and click Export Items to CSV. The file has each item's Quantity, Price and Cost. Multiply Quantity by Cost on each row and add them up. The file holds what is on hand when you export it, so export on the day you count or close the period. Exporting is on every plan.
- Where Cost comes from: the Cost column is the item's Last cost. Receiving stock on a purchase order with a price sets it to that price. You can also type it in, and the next receipt replaces it. An item with no Cost is blank in the file, so fill those in or the total will come out low. Purchase orders are included from Starter up.
- Last cost and FIFO: valuing everything at the last price paid comes close to FIFO when most of what is on the shelf came in on the latest orders. When prices have moved and some stock is old, the two drift apart.
- Average cost: each receipt on a purchase order with a price also updates the item's Average cost, weighted by what was on hand and what came in. It starts at the first such receipt, so stock held before then is not in it, and if the item had run out when stock arrives, it starts again at that price. It shows under Last cost when you edit an item in the web app, and on the item's page in the iPhone and Android apps. It is not in the export file.
- Not the dashboard figure: Total Inventory Value on the dashboard is each item's quantity times its Unit Price, the price a sales order uses unless you type another. That is a selling value, not a cost.
Flat monthly plans from $19/mo, with no per-user fees. Every plan starts with a 7-day free trial, and you won't be charged for 7 days. On the web you pick a plan and enter a card.
Frequently asked questions
Is the COGS calculator free?
Yes. There is no sign-up and no email is asked for. The sums are done in your browser. What you type is not sent to InventoryQuick and it is not stored.
What is the formula for cost of goods sold?
Stock at the start, plus purchases, minus stock at the end, all at cost. In the example on this page, $40,000 + $65,000 - $35,000 = $70,000.
Is cost of goods sold the same as what I bought?
No. Purchases are what came in during the period; cost of goods sold is what went out. The two are the same only when the stock at the end is worth the same as the stock at the start. In the example, $65,000 was bought but $70,000 went out, because the stock on hand fell by $5,000.
How do I work out closing stock without counting?
Use the gross profit method. Take your usual gross margin off the sales to estimate the cost of goods sold, then take that from the stock at the start plus purchases. At a 37.5% margin, $112,000 of sales cost about $70,000, which leaves about $35,000 of the $105,000 available. It is an estimate: it cannot see stock that was lost or stolen, or a margin that changed, so it does not replace a count.
What is the difference between FIFO, LIFO and average cost?
They are three ways to decide which purchase prices the units sold carry. FIFO uses the oldest prices first, LIFO the newest, and average cost the average of all of them. When prices are rising, FIFO gives the lowest cost of goods sold and the highest closing stock, and LIFO the reverse. In the example on this page, 250 units sold cost $2,650 under FIFO, $2,900 under LIFO and $2,781.25 at average cost.
What is the difference between gross margin and markup?
Both compare the gross profit with something else. Gross margin is gross profit divided by sales; markup is gross profit divided by cost. In the example, a $42,000 gross profit on $112,000 of sales is a 37.5% margin, and on $70,000 of cost it is a 60% markup. Both describe the same prices.
Does InventoryQuick work out cost of goods sold?
No. It holds the figures to start from. On the Items screen, open Import/Export, go to the Export tab and click Export Items to CSV. The file has each item’s Quantity and Cost, which is the price last paid on a received purchase order, or one you typed in. Multiply the two on each row and add them up for the stock at cost on the day you export. The dashboard’s Total Inventory Value uses each item’s Unit Price, a selling price, so it is not the figure to use here.
More free tools: turnover calculator, EOQ calculator, inventory count sheet, safety stock calculator.