On this page
What is cost of goods sold?
Cost of goods sold, often shortened to COGS, is what you paid for the products you sold during a period. If you run a shop, sell online or work a table at shows, it's usually your biggest cost, and the one most small sellers get wrong. Sales minus cost of goods sold is your gross profit: what is left to pay rent, fees and yourself.
The key idea is timing. When you buy stock, you have swapped cash for inventory, and inventory is something you own. It becomes a cost only when it sells.
How to use this calculator
The calculator has two methods. Use whichever matches the records you have.
For a period
Use this for a month, a quarter or a year.
- Beginning inventory: the cost of the stock on hand at the start of the period. It should be the same number as last period's ending inventory.
- Purchases: the cost of stock you bought to resell during the period.
- Other costs of the stock (optional): inbound shipping and similar costs of getting stock ready to sell. Some sellers also include grading fees on cards they intend to resell; follow whatever method you use consistently.
- Ending inventory: the cost of everything still on hand at the end, from a count.
- Net sales (optional): your sales before sales tax, if you want gross profit and gross margin too.
Item by item
Use this when you know what each sold item cost you, for example from a purchase log. Enter each item sold with the quantity, what it cost you each, and any extra cost per unit such as grading or inbound shipping. The calculator adds up the cost of every line.
Everything runs in your browser and nothing is saved or sent.
The cost of goods sold formula
Cost of goods sold = beginning inventory + purchases minus ending inventory
It works because of a simple bit of logic. Everything you had available to sell was either sold or is still on the shelf. Take away what is still on the shelf, and what is left is what you sold.
| Line | Example |
|---|---|
| Beginning inventory, at cost | $10,000 |
| Plus purchases | $25,000 |
| Goods available to sell | $35,000 |
| Minus ending inventory, at cost | ($12,000) |
| Cost of goods sold | $23,000 |
If the shop's sales for the year were $40,000, gross profit is $40,000 minus $23,000 = $17,000, and gross margin is $17,000 ÷ $40,000 = 42.5%.
Why inventory isn't an expense when you buy it
Picture a card shop that spends $8,000 on sealed product in December, sells a quarter of it before December 31, and sells the rest in January.
If the shop treated the full $8,000 as a December expense, December would look like a terrible month and January would look amazing, even though nothing about the business changed. Worse, if December is the last month of the tax year, the books would claim a cost for $6,000 of product that's still sitting on the shelf.
Matching cost to the sale fixes this. Only the $2,000 of product that sold in December becomes cost of goods sold in December. The other $6,000 stays on the balance sheet as inventory and becomes cost of goods sold in January, when it sells. Each month's profit then reflects what actually happened that month.
Worked example: a card seller's year
A part time seller tracks the year like this:
- January 1 count, at cost: $3,200
- Collections, boxes and singles bought to resell during the year: $14,800
- Inbound shipping on purchases: $350
- December 31 count, at cost: $4,100
- Sales for the year, before sales tax: $22,500
Goods available to sell: $3,200 + $14,800 + $350 = $18,350. Cost of goods sold: $18,350 minus $4,100 = $14,250. Gross profit: $22,500 minus $14,250 = $8,250, a 36.7% gross margin.
Table fees, marketplace fees, supplies and postage come out of that $8,250 as operating expenses. They're real costs, but they aren't part of cost of goods sold.
Splitting the cost of a collection
Resellers often buy a whole collection for one price. To track cost per item, split the price in proportion to what each part is expected to sell for. Suppose you pay $600 for a collection you expect to sell for about $1,000 in total:
| Part of the collection | Expected sale value | Share | Cost assigned |
|---|---|---|---|
| Three key cards | $500 | 50% | $300 |
| Graded slabs | $300 | 30% | $180 |
| Bulk lots | $200 | 20% | $120 |
| Total | $1,000 | 100% | $600 |
Write the split down on the day you buy. When the key cards sell, $300 of cost goes to cost of goods sold, no matter what the cards sell for.
Common mistakes
- Expensing stock the day you buy it. It makes profit swing month to month and overstates costs in a heavy buying period.
- Valuing inventory at retail or market value. Inventory counts at cost. A card that cost $40 and now sells for $150 is $40 of inventory.
- Skipping the count. The period formula is only as good as the ending inventory number. A rough guess at year end flows straight into profit.
- Putting the wrong costs in purchases. Rent, table fees, selling fees and outbound shipping are operating expenses. Purchases are stock you bought to resell and the costs of getting it to you.
- Forgetting personal use. Items you take out of stock for your own collection aren't sold. Remove their cost from inventory instead of counting them as cost of goods sold.
- Changing methods every year. Pick a method for counting and costing inventory and stick with it, so year to year numbers compare fairly.
Cost of goods sold in your books
Cost of goods sold sits right under sales on the profit and loss statement, and inventory sits on the balance sheet as a current asset. Every sale moves cost from one to the other. If your books treat all stock purchases as expenses, both reports are off.
Sum & Done, our free small business accounting software, keeps inventory at cost and moves it to cost of goods sold as items sell, so gross profit is right every month instead of only after a year end count. Until it opens, this calculator and an honest count will get you a sound number.
Frequently asked questions
What is the formula for cost of goods sold?
Cost of goods sold equals beginning inventory plus purchases minus ending inventory, all valued at what you paid. If you started the year with $10,000 of stock, bought $25,000 more and ended with $12,000, your cost of goods sold is $23,000.
Is inventory an expense when I buy it?
Generally no. Stock you buy to resell is an asset until it sells. Its cost becomes an expense, cost of goods sold, in the period the item sells. Stock still on hand at year end stays on the balance sheet as inventory.
Do I value ending inventory at cost or at what it would sell for?
At cost, meaning what you paid, including costs to get it ready to sell such as inbound shipping. Valuing inventory at retail or market value overstates it and understates cost of goods sold. Ask a tax professional about write downs for damaged or unsellable stock.
What counts as a purchase for cost of goods sold?
Stock you bought to resell, plus costs of getting it to you and ready to sell, such as freight in. Rent, wages, table fees, selling fees and outbound shipping are operating expenses, not cost of goods sold.
How do I find the cost of each item when I buy a whole collection?
Split the price you paid across the items in a reasonable, consistent way, often in proportion to what each item is expected to sell for. Write down the method and the split when you buy, so the cost is on record when each item sells.
Where does cost of goods sold go on my tax return?
For sole proprietors and single member LLCs filing Schedule C, cost of goods sold is worked out in Part III and carried to the first section of the form. Other business types report it on their own returns. A tax professional can confirm the details for your situation.
General information for small businesses in the United States, not tax, legal or accounting advice. Rules differ by state and change over time; check with your state revenue department or a tax professional before you file. Last reviewed December 3, 2026.