The site is still being built — nothing on it is final yet.Write to hi@perly.io to hear things first, or wait for the announcement.

← Back to perly.io
Perly

Average cost vs FIFO: Bitcoin cost basis explained

Cost basis answers one question: what did the coins you still hold actually cost you? Every PnL figure downstream depends on how you answer it, and the two most common methods — average cost and FIFO — can give honestly different numbers from the same history.

Average Cost Basis

Every buy pours into one pool. Your cost basis is the pool's total (price × quantity + fee, summed over every buy), and your average cost is that total divided by your total quantity. When you sell, the sold coins carry the average cost — the pool shrinks proportionally, and the average itself does not move.

A toy example, with deliberately round numbers: buy 1 unit at 10, buy 1 unit at 30. The pool holds 2 units at a cost of 40; average cost 20. Sell 1 unit at 25: realized PnL is 25 − 20 = 5, and the remaining unit still has cost basis 20.

FIFO

First in, first out: the coins you sell are deemed to be the oldest ones you bought, at their price. The same toy history under FIFO: the sold unit is the one bought at 10, so realized PnL is 25 − 10 = 15, and the remaining unit carries a basis of 30. Same trades, different split between realized and unrealized — the total is identical, but when profit shows up changes.

Which one is right?

For your own understanding, average cost tends to match how people actually think about a stack they built over years: one position, one average, one number to beat. For taxes, the answer depends entirely on your jurisdiction — some mandate FIFO, some allow average cost, some allow specific identification. Perly is not tax software and nothing here is tax advice; ask a professional who knows your rules.

What Perly does

Perly computes Average Cost Basis, in a pure accounting engine that re-derives the whole position from your transaction history on every edit — including backdated ones, because entries are processed in the order they were executed, not the order they were typed in. Fees are part of basis on the way in and reduce proceeds on the way out. Ready to see yours? Start by exporting your history.

← Back to perly.io

© 2026 Perly. All rights reserved.