How to Calculate Crypto Gains and Losses

Every crypto gain or loss reduces to one formula: proceeds minus cost basis. This guide works in three steps — find your proceeds, find your basis, classify the result as short- or long-term — with worked examples throughout.

A duotone photograph from above of an open blank notebook with two stacks of plain unmarked tokens and a hand moving one token between them, with a ruler and pencil nearby.
Proceeds on one side, basis on the other. Editorial image for CryptoTaxAI.
Affiliate Disclosure: As an Amazon Associate, we earn from qualifying purchases made through links on this page, at no extra cost to you.

Last updated: October 15, 2026 · Reviewed by the CryptoTaxAI editorial team · 9 min read

Every time you sell or swap crypto, the tax math comes down to one subtraction. If you can figure out what you received and what you paid, you can calculate your gain or loss. The hard part is usually finding reliable numbers, not the arithmetic.

This guide walks you through the three steps — proceeds, basis, classification — and ends with two worked examples. The IRS treats crypto as property under Notice 2014-21, so the same gain-and-loss logic that applies to stocks applies here.

The One Formula

Your gain or loss on a crypto disposition is:

Proceeds (fair market value received) − Cost basis (what you paid, plus fees) = Gain or loss.

If your proceeds are higher than your basis, you have a gain. If they are lower, you have a loss. A loss is not necessarily bad news — capital losses generally offset capital gains first, and a limited amount of net loss can offset ordinary income each year (see IRS Topic 409).

Every line on Form 8949 is built from this same formula: date acquired, date disposed, proceeds, basis, and the resulting gain or loss.

Step 1: Find Your Proceeds

Your proceeds are the fair market value (FMV) in U.S. dollars of whatever you received, measured at the moment of the disposition. If you sold 1 ETH for $3,000 in cash, your proceeds are $3,000. If you swapped 1 ETH for $3,000 worth of another token, your proceeds are generally still the $3,000 FMV of what you received.

Use the price from the exchange or platform where the trade happened, at the time of the trade. For trades on a decentralized exchange with no direct USD pair, you may need to estimate FMV from the value of the token you received. The IRS virtual-currency FAQs discuss valuation when no published market price exists — document the method you use and apply it consistently.

Step 2: Find Your Cost Basis

Your cost basis is generally what you paid for the crypto, in U.S. dollars, plus the fees you paid to acquire it. If you bought 1 ETH for $2,000 and paid a $25 exchange fee, your basis is generally $2,050.

Things get complicated when you own the same coin from multiple purchases at different prices — then you need a basis method to decide which units you sold. Common methods include FIFO (first-in, first-out), LIFO, HIFO, and specific identification, and your choice can change your tax bill. The details live in the site's cost basis methods guide, which covers when each method helps.

Step 3: Subtract and Classify

Subtract basis from proceeds. Then classify the result by holding period:

  • Short-term: you held the crypto for one year or less. Gains are generally taxed as ordinary income — for 2026, federal ordinary rates run from 10% to 37%.
  • Long-term: you held it for more than one year, with the count starting the day after you acquired it. Gains are generally taxed at the preferential long-term capital gains rates of 0%, 15%, or 20%, depending on your taxable income. For 2026, per Rev. Proc. 2025-32, the 0% band generally extends up to $49,450 of taxable income for single filers and $98,900 for married couples filing jointly.

The holding-period boundary is exact: selling one day before the one-year mark is short-term; one day after is long-term. See the site's 2026 capital gains tax guide for the full rate tables, and IRS Topic 409 for the IRS's own overview.

Fees and Adjustments

Fees do not disappear from the math — they adjust it:

  • Acquisition fees (exchange fees, wire fees) generally add to your cost basis.
  • Disposition fees generally reduce your proceeds. If you sold for $3,000 but paid a $50 fee, your proceeds are generally $2,950.
  • Gas fees on network transactions are handled similarly, depending on whether the transaction was a purchase, a sale, or a transfer between your own wallets. Moving crypto between wallets you control is generally not a taxable event at all.

Keeping fee records alongside each trade is one of the highest-value habits in crypto taxes — the record-keeping guide shows a simple system for it.

Worked Examples

Simplified illustration — ignores fees and state taxes.

Example A: short-term gain

You bought 1 ETH for $2,000 in February and sold it for $3,000 in October of the same year.

  • Proceeds: $3,000
  • Cost basis: $2,000
  • Gain: $3,000 − $2,000 = $1,000
  • Holding period: about 8 months → short-term, generally taxed as ordinary income.

Example B: long-term gain

You bought 1 ETH for $2,000 and sold it for $3,000 about 14 months later.

  • Proceeds: $3,000
  • Cost basis: $2,000
  • Gain: $3,000 − $2,000 = $1,000
  • Holding period: more than one year → long-term, generally taxed at the preferential 0%/15%/20% capital gains rates depending on your income.

The dollar gain is identical in both cases — only the tax rate changes with the holding period. That is why tracking acquisition dates matters so much.

Final Checklist

For each disposition, record these six facts and the formula does the rest:

  • Date acquired
  • Date disposed
  • Amount of crypto disposed
  • Fair market value at acquisition
  • Fair market value at disposition (your proceeds)
  • Fees paid on each side

With those six numbers in hand, every line of your Form 8949 writes itself — and you will be able to defend every line if the IRS ever asks.

Not tax advice. This article is educational content only. Cryptocurrency tax rules are complex and change over time. Consult a qualified tax professional about your specific situation before making tax decisions or filing a return.

Skip the spreadsheet

Let the free calculator do the math across all your trades.

Estimate my crypto tax →

Sources

Frequently asked questions

Generally, yes. Fees you paid when buying crypto typically add to your cost basis, and fees paid when selling typically reduce your proceeds. Either way, fees reduce your taxable gain (or increase your loss). Keep records of every fee — exchange fees, wire fees, and gas fees — alongside each trade, since the IRS expects your reported proceeds and basis to reflect the actual economics of each transaction.
You still need a basis to report. Start by reconstructing it: old exchange statements, blockchain explorers, deposit records, and email receipts can all help. If the crypto was a gift or inherited, special basis rules generally apply. When records are truly gone, the record-keeping guide covers reconstruction strategies — and talk to a tax professional before filing, because a wrong guess can mean overpaying or underreporting.
Use a reasonable estimate of the fair market value in USD at the time of the trade. Common approaches include the value of the token you received (if it has a liquid USD market), the value of the token you gave up, or a price-oracle quote at the block time. The IRS virtual-currency FAQs address valuation when no published exchange price exists — document the method you used and apply it consistently.
If you bought 2 ETH at different prices and sold 1, you need a basis method — such as FIFO or specific identification — to determine which unit you sold and its basis. Your gain is the proceeds of the 1 ETH sold minus that unit's basis. Method choice can change your tax bill, so read the cost basis methods guide before picking one, and stick with your method consistently.

Keep learning