Free calculator
FIFO Calculator for Cost of Goods Sold
When you buy the same item several times at different prices, FIFO decides which cost belongs to each sale.
How FIFO works
FIFO means first in, first out: the units you bought first are treated as sold first. When you sell, you take the cost of the oldest units still in stock until you have counted every unit sold. What remains is valued at the newer purchase prices.
How to use it
Enter up to five purchases, oldest first, with the number of units and the cost per unit, then the number of units sold. The calculator shows the cost of goods sold, the average cost per unit sold and the units and value left in stock.
Example
You bought 3 identical lamps at $10 each in January and 2 more at $14 each in March. You sell 4.
- First 3 units: 3 × $10 = $30
- Fourth unit: 1 × $14 = $14
- Cost of goods sold: $44, an average of $11 per unit sold
- Left in stock: 1 unit worth $14
Why it matters
Cost of goods sold decides your profit and the income you report. Whatever method you use, apply it the same way every time and keep your purchase records; see the reseller bookkeeping guide. Huuli applies FIFO to every sale automatically and splits lot prices to the cent in its FIFO inventory feature.
Estimates for planning only, not tax, legal or financial advice. Fees vary by category, store subscription, promotions and account status; check your marketplace's fee page and ask a tax professional about your situation.
Frequently asked questions
What is FIFO in reselling?
First in, first out: the oldest units you bought are treated as sold first, so their cost is used for the sale.
Is FIFO required by the IRS?
FIFO is one of the accepted methods for identifying the cost of inventory. Ask a tax professional which method fits your business and keep using it consistently.
What if I bought a lot with mixed items?
Split the lot price across its items first, for example evenly or by expected value, then use those costs as purchases.
Can I use average cost instead?
This calculator uses FIFO only. Its average cost per unit sold is the result of FIFO, not the average cost method.
Track every sale automatically
Huuli records costs, fees and profit for each item across your marketplaces. Free for up to 25 items, no credit card.