How to use the crypto tax calculator
- Enter every purchase of the coin with its date (YYYY-MM-DD), the number of coins, the price per coin and the fee in dollars. Coins you received as staking or mining income count as purchases at their dollar value on the day you received them, because that value was already taxed as income.
- Enter every sale or other disposal. Selling for dollars is the obvious one, but swapping one coin for another and paying for goods with crypto are disposals too. For a swap, use the dollar value of what you received as the sale price.
- Choose a matching method: FIFO, LIFO or HIFO. The results show your choice, and the comparison table shows all three.
- Enter your filing status and other taxable income, meaning taxable income after deductions without these gains. The calculator stacks the crypto gains on top to find the rate that applies.
- Include or leave out the 3.8% net investment income tax. It only applies at higher incomes, and the calculator estimates your modified adjusted gross income to check.
Enter one coin per calculation, and only lots held in the same wallet or exchange account. If your sales cover more than one calendar year, the estimate covers the latest year; earlier sales still use up lots.
How crypto gains are calculated
Proceeds = Coins sold × Sale price − Sale fee
Gain = Proceeds − Cost basis of the lots matched to the saleWhen one sale uses several lots, the proceeds are split across the lots in proportion to the coins taken from each. A gain is long-term when the coins were held for more than one year: sold after the anniversary of the purchase date.
The tax estimate follows the order in which the tax code applies:
Net long-term = long-term gains − long-term losses
Tax on short-term = Income tax(other income + short-term) − Income tax(other income)
Tax on long-term = 0%, 15% or 20% on long-term gains stacked above ordinary incomeIf one net figure is a loss, it offsets the other first. A net loss for the year offsets up to $3,000 of ordinary income, with the rest carried forward. Brackets are federal figures for 2026.
A worked example
The example buys a coin four times between March 2024 and January 2026, 270 coins in total, and sells 210 of them in two sales during 2026. With FIFO, each sale uses the oldest coins first.
The two sales bring in $12,279.00 after fees. The coins they used cost $8,822.50 including purchase fees, so the net gain is $3,456.50. Every lot FIFO reached for was bought more than a year before the sale, so the whole amount is a long-term gain: $3,456.50.
With $85,000 of other taxable income as a single filer, the long-term gain falls in the 15% bracket and the estimated federal tax is $518.48. You still hold 60 coins with a cost basis of $2,806.50.
FIFO, LIFO and HIFO compared
The method decides which lots a sale uses, and therefore both the size of the gain and how much of it is short-term. For the same trades:
| Method | Short-term gain | Long-term gain | Estimated tax | Basis left in coins held |
|---|---|---|---|---|
| FIFO: oldest coins first | $0.00 | $3,456.50 | $518.48 | $2,806.50 |
| LIFO: newest coins first | $782.25 | $2,273.75 | $513.16 | $2,406.00 |
| HIFO: most expensive coins first | -$209.00 | $2,663.50 | $368.18 | $1,804.50 |
HIFO gives the smallest gain here because it sells the costliest coins first, and its short-term loss offsets part of the long-term gain. LIFO produces a smaller total gain than FIFO but turns part of it short-term, taxed at ordinary rates, which is why its tax ends up close to FIFO’s despite the lower gain.
Two cautions. First, a lower gain now usually means a higher gain later: the last column shows that HIFO leaves the least basis in the coins you keep, so their eventual sale will be taxed more. The method mostly moves tax between years, which still has value, but it is not the same as eliminating it. Second, HIFO does not always win. When the highest-cost lots are recent, it can swap long-term gains at 15% for short-term gains taxed at your full income rate.
LIFO and HIFO are specific identification. In the US you need records showing which units you sold, made no later than the sale itself; for coins held at a broker, the identification generally has to be given to the broker. Without that, FIFO is the default, applied account by account. Since 2025 the IRS expects basis to be tracked separately for each wallet or exchange account, which is why the lots you enter should come from one account.
Short-term versus long-term gains
The holding period often matters more than the method. The same gain can be taxed at very different rates:
- Short-term (one year or less): taxed as ordinary income, at rates from 10% to 37%.
- Long-term (more than one year): taxed at 0%, 15% or 20% depending on your taxable income.
With only $30,000 of other taxable income, the example’s long-term gain would sit entirely in the 0% band and the federal tax would be $0.00. For a married couple with $300,000 of other taxable income, the tax would be $649.82, which includes $131.35 of net investment income tax: the 3.8% surtax on investment income above a modified adjusted gross income of $200,000 (single) or $250,000 (married filing jointly).
If a sale is close to the one-year mark, checking the date before selling can be worth a lot. Selling on the anniversary itself still counts as short-term; the day after is long-term.
What counts as a taxable event
In the US, these generally create a capital gain or loss:
- Selling crypto for dollars or another currency.
- Swapping one coin for another, including stablecoins.
- Paying for goods or services with crypto.
These generally do not:
- Buying crypto with dollars and holding it.
- Moving coins between wallets or accounts you own (network fees may be treated differently; keep records).
- Giving crypto as a gift, although the recipient generally takes over your cost basis and large gifts can require a gift tax return.
Income is a separate category. Staking rewards, mining income and coins received as pay are taxed as ordinary income at their value when received, and that value becomes their cost basis for a later sale. Our staking rewards calculator and mining calculator cover how that income is earned.
Losses, wash sales and broker reporting
Losses offset gains of either type, and up to $3,000 of a net loss can reduce ordinary income each year, with the rest carried forward. Under current law, the wash sale rule applies to stock and securities, not to crypto, which the IRS treats as property. That means selling a coin at a loss and buying it back soon after does not disallow the loss today, but proposals in Congress have tried to change this more than once, so check the rules for the year you file.
Brokers now report crypto sales on Form 1099-DA, starting with gross proceeds for sales in 2025, with cost basis reporting phasing in for coins acquired from 2026 onward. Coins moved in from another platform or a private wallet may show no basis on the form, so your own purchase records are what make the gain correct.
What this calculator does not include
- State income tax, which most states charge on capital gains at ordinary rates.
- Several coins, wallets or accounts at once. Run one coin and one account per calculation.
- Other capital gains and losses from stocks or funds, which are netted together with crypto on your return.
- Carryover losses from earlier years and the alternative minimum tax.
- Special cases such as gifts, inheritances (stepped-up basis), airdrops, hard forks, lost or stolen coins, NFTs taxed as collectibles and business or dealer activity.
The result is an estimate for planning, not a tax return. Brackets come from 2026 federal tables; a tax professional can confirm the treatment of unusual transactions.