Capital gains and cost basis
Every time you dispose of crypto, you work out one number: the gain or the loss. This lesson shows how under US rules, and what changes the size of the bill.
The sum
Gain or loss = what you received − your cost basis
Cost basis is what the crypto cost you. For a purchase, that is the price you paid. The IRS lets you add the transaction costs of buying, such as exchange fees and gas. Costs of selling are taken off what you received.
An example:
- You buy 1 ETH for $2,000 and pay a $20 fee. Your basis is $2,020.
- You later sell it for $3,000 and pay a $30 fee. You received $2,970.
- Your gain is $2,970 − $2,020 = $950.
Without a record of what you paid, you cannot prove your basis. That is why Lesson 59 is about records.
Short-term and long-term
How long you held the crypto decides the rate.
- One year or less: a short-term gain, taxed at the same rates as your ordinary income.
- More than one year: a long-term gain, taxed at 0%, 15% or 20% depending on your income.
The holding period starts the day after you acquire the crypto.
For most people the long-term rate is lower. For 2025, a single filer with taxable income up to $48,350 paid 0% on long-term gains. The thresholds change each year, so check the current ones.
Selling one day too early can turn a long-term gain into a short-term one. Check your dates before you sell.
Which coins did you sell?
Suppose you bought 1 ETH at $1,500, another at $2,500, and now sell one for $3,000. Your gain is $1,500 or $500, depending on which one you sold.
The US rules give two answers:
- Specific identification. You choose which units you are selling, and you keep adequate records showing it.
- First in, first out. If you do not identify the units, the earliest ones you acquired count as sold first.
Since 1 January 2025 this is worked out separately for each wallet and each account. You cannot sell coins from one wallet and claim the cost of coins sitting in another.
Losses
A loss is useful. Under US rules:
- Losses are set against gains first.
- If your losses are larger than your gains, you can set up to $3,000 of the excess against your other income each year.
- Anything left over carries forward to later years.
A loss only counts if you report it. People who lost money often skip the paperwork and give up something of value.
The wash sale question
For stocks, the US has a wash sale rule. If you sell at a loss and buy the same thing within 30 days before or after, you cannot claim the loss yet.
The law behind that rule covers "stock or securities". Congress's Joint Committee on Taxation noted in September 2026 that digital assets are not expressly within its scope.
That may change. On 16 September 2026 a committee of the US House of Representatives approved a bill, the Digital Asset Tax Certainty Act, that would extend wash sale rules to digital assets. When this lesson was last reviewed it had not become law. As drafted, it would reach back to sales made after it was introduced in mid-September 2026.
Check the current position before you rely on selling at a loss and buying back.
NFTs can be different
The top long-term rate for collectibles is 28%, not 20%. The IRS has said that, for now, it decides whether an NFT is a collectible by looking at what the NFT stands for. Lesson 60 returns to this.
Three habits
- Record the basis when you buy, including fees.
- Know your holding dates.
- Report losses as well as gains.
You bought 1 ETH for $2,000 plus a $20 fee. Is your cost basis $2,000?
A gain or loss is what you received minus your cost basis, fees included. Holding for more than a year usually lowers the US rate, and losses reduce your tax only if you report them.
Sources
- Internal Revenue Service: Frequently asked questions on digital asset transactions
- Internal Revenue Service: Topic no. 409, Capital gains and losses
- Internal Revenue Service: Revenue Procedure 2024-28
- Joint Committee on Taxation: Description of H.R. 10357
- Internal Revenue Service: Notice 2023-27
Facts checked against these sources on 10 October 2026.
The course by email
Five short emails to get you started, then one a month about what is new. No price tips and no hype.
Free. Unsubscribe any time. See our privacy notice.
Want your progress saved too? Create a free account.