How to Calculate Crypto Taxes for Gains and Losses 2025

How is cryptocurrency taxed?

The IRS treats crypto as property. Selling, trading, or using crypto creates taxable events, which are categorized by holding periods:

  • Short-term gains: Assets held for one year or less, taxed at ordinary income rates (10%-37%).

  • Long-term gains: Assets held for more than a year, taxed at preferential rates (0%, 15%, or 20%).

Crypto income, such as staking rewards, is taxed at its fair market value upon receipt and treated as ordinary income.

Learn more about the current tax rates for cryptocurrency.

What factors are considered when calculating crypto taxes?

Two main factors determine your crypto taxes:

  1. Realized gains or losses: The difference between proceeds (sale price) and cost basis (purchase price).

  2. Holding period: Short-term gains apply to assets held for less than a year, while long-term gains apply to those held longer.

Trading crypto for other crypto or making purchases also triggers taxable events. Here’s an example of a basic crypto tax calculation for US taxpayers.

Crypto tax calculation example

  1. You buy $20,000 of Ethereum and trade it for $30,000 worth of Bitcoin. Your short-term gain is

    $10,000.

  2. A few months later, you use the Bitcoin (now worth $60,000) to purchase a car. Your gain is

    $30,000.

Your total short-term taxable gains are $40,000.

Looking to calculate your crypto taxes? Try our free crypto tax calculator.

How is profit on cryptocurrency calculated?

To calculate crypto profit, use this simple formula:

Profit = Proceeds – Cost Basis

Crypto profit calculation example

If you bought Ethereum for $10,000 and sold it for $15,000, your profit is $5,000. Fees can be added to the cost basis, reducing your taxable gains.

Looking to calculate your crypto profit? Try our free crypto profit calculator.

How TokenTax can help you to calculate crypto taxes for gains and losses

TokenTax combines crypto tax software with full-service accounting expertise. Our platform tracks transactions determines cost basis, and calculates gains or losses across multiple accounting methods.

Whether you need automated tax reports or hands-on support, our experts help ensure compliance while minimizing your crypto tax burden.

Schedule a FREE crypto tax consultation

How to keep your crypto taxes to a minimum

Minimize your crypto tax liability with these strategies:

  • Hold assets long-term: Gains from assets held over a year are taxed at lower rates.

  • Harvest losses: Sell underperforming assets to offset taxable gains.

  • Track fees: Deduct transaction and gas fees by including them in your cost basis.

TokenTax makes it easy to optimize your tax strategy by automating tracking and cost basis calculations.

Learn more about how to reduce your crypto taxes.

How to calculate crypto gains and losses

Calculating crypto gains and losses involves tracking all transactions, determining the cost basis for each asset, and calculating the difference between the sale price and purchase price. Gains occur when you sell crypto for more than you paid, while losses happen when you sell for less.

To simplify the process of calculating gains and losses, keep complete records of purchase dates, sale dates, and transaction fees.

Learn more about crypto accounting methods.

Tracking crypto transactions

Accurate tracking of crypto transactions is essential. Record the following details:

Finding your cost basis

Cost basis is the original value of your crypto, including fees. Accounting methods impact how gains are calculated:

  • FIFO: First-in, first-out. The oldest assets are sold first.

  • LIFO: Last-in, first-out. The newest assets are sold first.

  • HIFO: Highest-in, first-out. Most expensive assets are sold first.

Our crypto tax software at TokenTax enhances the standard HIFO method with our proprietary Minimization accounting method, which factors in your individual tax rate to reduce your taxable gains as effectively as possible.

Accounting method variations example

Different accounting methods can significantly impact your taxable gains or losses. Here’s an example to illustrate:

Imagine you own 3 BTC, purchased as follows:

  • 1 BTC bought in 2018 for $8,000

  • 1 BTC bought in 2021 for $50,000

  • 1 BTC bought in 2022 for $19,000

In 2023, you sell 1 BTC for $23,000. Here’s how your capital gain or loss changes based on the accounting method:

FIFO (First In, First Out): The oldest BTC (purchased at $8,000) is sold first.
Gain = $23,000 – $8,000 = $15,000

LIFO (Last In, First Out): The most recent BTC (purchased at $19,000) is sold first.
Gain = $23,000 – $19,000 = $4,000

HIFO (Highest In, First Out): The BTC with the highest purchase price ($50,000) is sold first.
Loss = $23,000 – $50,000 = -$27,000

Choosing the right accounting method can help minimize your taxable gains or maximize deductible losses. TokenTax’s crypto tax software allows you to apply and compare accounting methods like FIFO, LIFO, and HIFO to optimize your tax outcome.

Cost basis calculation example

Cost basis is the original value of an asset, including any fees incurred during the purchase. Accurately determining cost basis is critical for calculating your taxable gains or losses. Here’s an example:

Suppose you purchase 1 ETH for $3,000 on an exchange. At the time of purchase, you also pay a $100 transaction fee (e.g., exchange fee or Ethereum gas fee).

To calculate the cost basis:
Cost Basis = Purchase Price + Transaction Fees
Cost Basis = $3,000 + $100 = $3,100

When you later sell the 1 ETH for $4,000, you calculate your taxable gain as follows:
Gain = Sale Price – Cost Basis
Gain = $4,000 – $3,100 = $900

Transaction fees, like the $100 in this example, reduce your overall gains by increasing the asset’s cost basis. This can help lower your taxable income.

How to Determine Your Crypto Capital Gains Tax Rate

Crypto tax rates depend on how long you hold the asset:

  • Short-term gains: Taxed at ordinary income rates (10%-37%).

  • Long-term gains: Taxed at reduced rates (0%, 15%, or 20%).

Holding assets for over a year lowers your overall tax liability.

Calculate profit on crypto

To calculate profit on crypto, subtract the cost basis (purchase price plus fees) from the proceeds (sale price):
Profit = Proceeds – Cost Basis

For example, if you buy 1 ETH for $3,000 and pay $100 in transaction fees, your cost basis is $3,100. If you later sell it for $4,000, your profit is:
Profit = $4,000 – $3,100 = $900

Accurate profit calculations are essential for tax reporting. Use our free crypto profit calculator to automate this process and ensure your gains are calculated correctly.

How to calculate your crypto taxes FAQs