← Crypto cost basis calculator

Crypto tax-loss harvesting, with a worked example

Tax-loss harvesting means selling coins that are worth less than you paid so the loss offsets gains you have already realized this year. This page walks one invented portfolio through it with the same arithmetic the free calculator runs, so you can check the logic before you trust it with your own numbers.

Open the free calculator

The example

An investor bought 0.5 BTC on 2023-02-01 for $10,000 and sold it on 2024-09-15 for $30,000: a $20,000 long-term gain, taxed at an assumed 15%, so $3,000 of estimated tax. They still hold three positions, all bought in 2024 and all under water. Prices typed in on 2024-12-10: BTC $60,000, ETH $3,000, SOL $150.

LotCost basisValue at typed priceUnrealizedHeldTax saved if sold alone
10 ETH, bought 2024-03-01$40,000$30,000-$10,000short-term$1,500
100 SOL, bought 2024-05-10$20,000$15,000-$5,000short-term$750
0.2 BTC, bought 2024-04-01$14,000$12,000-$2,000short-term$300

Selling all three realizes $17,000 of short-term losses. Short-term losses are netted against long-term gains when there are no short-term gains, so the year's net gain falls from $20,000 to $3,000 and the estimated tax from $3,000 to $450: $2,550 saved. The saving per lot is ranked on its own against the current result; it is a guide to which lots matter most, not a number that adds up exactly once losses start cancelling each other.

What the calculator does with it

  1. You give it your transactions and, for each coin you still hold, a price you typed. It fetches no prices, so it cannot be wrong about them in the background.
  2. It values every open lot, ranks the ones under water by tax saved, and shows how much of the year's estimated tax selling them would remove.
  3. It also lists gains that turn long-term within 90 days, with the tax saved by waiting and how far the price can fall before selling now would have kept more cash.

The wash-sale question

The wash-sale rule disallows a loss if you buy the same asset within 30 days before or after the sale. Today it is written for stocks and securities, and crypto has generally been treated as property outside it, but that can change and tax advisers differ on edge cases. The calculator never applies the rule to your numbers. It does show, for each losing sale, the same coin bought or received within 30 days either side, and how much loss a stock-style rule would have deferred, so you can see whether your plan still works if the rule is extended.

Before you sell

Common questions

Is crypto subject to the wash-sale rule?

As the rule is written today it applies to stock and securities, and crypto has generally been treated as property outside it. Proposals to extend it have been discussed, so the calculator shows how much loss a stock-style rule would defer without applying it. Ask a tax professional about your situation.

Which losing lots should I sell first?

The ones that remove the most estimated tax. Short-term losses offset short-term gains, which are taxed at higher rates, so they are usually worth more per dollar than long-term losses. The calculator ranks lots under water by the tax each would save against your current result.

Does the calculator fetch prices?

No. You type today's price for each coin, so nothing leaves your browser and no price feed can be wrong without you seeing it.