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.

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.
Skip the spreadsheet
Let the free calculator do the math across all your trades.
Estimate my crypto tax →Sources
- IRS — Digital Assets (Notice 2014-21 guidance)
- IRS Topic 409 — Capital Gains and Losses
- IRS — Frequently Asked Questions on Virtual Currency Transactions
Frequently asked questions
Keep learning
- Cost Basis Methods: FIFO, LIFO, HIFO, and Specific ID — How choosing which units you sold changes your crypto tax bill..
- Crypto Capital Gains Tax Rates for 2026 — Short-term vs. long-term rates and the 2026 income thresholds..
- Crypto Tax Record-Keeping — What to save for every trade so reporting is painless..
Recommended Reading
If you want to go deeper on this topic, these books are well worth your time:
- J.K. Lasser's Your Income Tax 2026 by J.K. Lasser Institute — The J.K. Lasser annual guide translates the current year’s IRS forms and instructions into plain language — the practical companion to the concepts explained here.