Crypto tax is the capital-gains tax owed when a digital asset is sold or exchanged for more than its cost basis, with the rate depending on how long it was held.

Formula: gain = proceeds − cost basis; tax = gain > 0 ? gain × (held > 365 days ? long-term rate : short-term rate) : 0

Example: $20,000 − $8,000 = $12,000 long-term gain × 20% = $2,400 tax

Finance

Instant, private, and free

Crypto Tax Calculator.

Estimate capital-gains tax on a crypto sale using short- and long-term rates.

On-device calculationNo signup
01

Set your values

Results update as you type.

More than 365 days is taxed at the long-term rate.

Crypto tax owed: $2,400.00 USD

Crypto tax owed

Long-term
$2,400.00USD
$20,000 − $8,000 = $12,000 long-term gain × 20% = $2,400 tax

Breakdown

Capital gain$12,000
Holding period400 days
Tax rate applied20%
After-tax proceeds$17,600

FAQs

How is crypto taxed when I sell?

The taxable gain is the sale proceeds minus your cost basis. You owe tax at the short-term rate if you held the asset for 365 days or fewer, and at the long-term rate beyond that.

What counts as cost basis?

Cost basis generally includes what you paid for the crypto plus purchase fees and certain acquisition costs. Transfers between your own wallets do not change it.

Can I deduct a crypto loss?

Capital losses can usually offset capital gains and up to $3,000 of ordinary income per year, with the rest carried forward. This calculator shows $0 tax on a loss but does not apply the deduction.

Cite this calculator

Canonical URL: https://mathify.one/en/finance/crypto-tax

Cite as: Mathify. (2026). Crypto Tax Calculator. https://mathify.one/en/finance/crypto-tax

Use Cases

Planning a sale

See the tax bill before selling a position so you can set cash aside.

Example: Selling for $20,000 with an $8,000 basis at a 20% long-term rate owes $2,400.

Deciding when to sell

Compare selling just before and just after the one-year mark.

Example: At 365 days the $12,000 gain is short-term at 32%, or $3,840; a day later it drops to $2,400.

Tracking gains across trades

Run each disposal separately to total the year's liability.

Example: Two long-term sales of $12,000 each at 20% total $4,800 of tax.

Frequently Asked Questions

How is crypto taxed when I sell?
The taxable gain is the sale proceeds minus your cost basis. You owe tax at the short-term rate if you held the asset for 365 days or fewer, and at the long-term rate beyond that.
What counts as cost basis?
Cost basis generally includes what you paid for the crypto plus purchase fees and certain acquisition costs. Moving coins between your own wallets does not change it.
Can I deduct a crypto loss?
Capital losses can usually offset capital gains and up to $3,000 of ordinary income per year, with the remainder carried forward. This calculator shows zero tax on a loss but does not apply the deduction.
Are short-term crypto gains taxed as ordinary income?
Yes. Gains on crypto held 365 days or fewer are short-term and taxed at ordinary income rates, so enter your marginal rate as the short-term rate.

Tips & Common Mistakes

Tips

  • Use specific identification to choose high-basis lots and reduce the taxable gain.
  • Keep records of every buy, transfer, and fee so cost basis is defensible.
  • Remember that swapping one crypto for another is generally a taxable disposal.
  • Check your state's treatment, because some states tax gains as ordinary income.

Common Mistakes to Avoid

  • Using the current market price as cost basis instead of what you actually paid.
  • Treating exactly 365 days as long-term; the threshold is more than one year.
  • Forgetting that staking rewards and airdrops create income with their own basis.
  • Ignoring the net investment income tax surcharge on higher incomes.

Last updated: September 11, 2026