Skip to content
100% local

Crypto profit and loss calculator

Work out realized and unrealized crypto gains from a list of trades, with FIFO, LIFO or average cost.

Input

Crypto profit and loss calculator

Paste your buy and sell trades, one per line as date;type;quantity;price;fee, and this tool works out what your crypto position actually made or lost. It tracks every lot you bought, matches your sales against them, and reports the average cost of what you still hold, the profit already locked in from selling, and the paper profit on whatever remains at today's price.

The cost basis method controls which units are considered sold first. FIFO (first in, first out) matches sales against your oldest purchases, LIFO does the opposite, and weighted average blends every purchase into one running cost — the three methods can report very different realized profit for the same trades, which matters most once tax is involved. Fees can be entered as a flat amount per trade or as a percentage of that trade's value, and the tax option applies a rate to realized profit only, never to gains you haven't sold. Turning on the target-profit option adds the sell price your remaining holdings would need to reach a chosen return, and the break-even price shows the price at which your realized and paper profit net out to zero.

Transactions are read in the order you paste them, oldest first, so a spreadsheet exported in date order pastes straight in. Windows and Unix line endings both work. Selling more than a coin's running balance at that point, or a line with a field that isn't a plain number, produces a specific error naming the line rather than a blank result — and the live tally under the output updates on every keystroke, so a coin's numbers stay live all the way through editing your trade history.

Every calculation runs in your browser. Your trade history and holdings are never uploaded anywhere, which matters for something this private. Copy the result, download it as a .txt file, or switch to the table format to get the same numbers with column totals ready to paste into a spreadsheet.

FAQ

What do the date, type, quantity, price and fee fields mean?
Each line is one trade: the date (any label you like), "buy" or "sell", how many units traded, the price per unit, and an optional fee for that trade. Leave the fee off and it is treated as zero.
How does the cost basis method change the result?
FIFO matches a sale against your oldest remaining purchases, LIFO against your newest, and weighted average blends every purchase into one running cost per unit. The same trades can show a different realized profit under each method, especially when your buy prices varied a lot.
Where does the unrealized profit come from?
You enter a current price per unit and the tool multiplies it by whatever quantity is still held, then compares that to the cost basis of those remaining units. It only appears once you have holdings left after all your sells.
Does it file or estimate my actual tax bill?
No. The tax option applies the percentage you enter to realized profit as a simple estimate — it is not tax advice and does not account for your jurisdiction's specific rules, holding periods or loss carryforwards.
Is my trade history uploaded anywhere?
No. Every calculation runs locally in your browser — your trades, holdings and prices never leave your device.