The same gain, one day apart
Hypothetical example, not law
Priya is single and takes the standard deduction. Her wages are $104,400. She buys shares on March 3, 2025 and sells them at a gain of $6,300. We compare a sale on March 3, 2026 with a sale on March 4, 2026, and look at federal income tax only.
- Counting the days. The holding period starts the day after the purchase, March 4, 2025, and the day of the sale counts. A sale on March 3, 2026 is a holding period of exactly a year, which is not more than a year, so it is short-term. A sale on March 4, 2026 is more than a year, so it is long-term.
- Taxable income before the gain. $104,400 minus the $16,100 standard deduction is $88,300, which sits in the 22% step of the single-filer schedule.
- Sold as a short-term gain. The gain is taxed as ordinary income. The tax rises by about $1,400, because the whole gain falls in the 22% step.
- Sold as a long-term gain. Taxable income is between $49,450 and $545,500, so the long-term gain is taxed at 15%. The tax is about $900.
- The difference. Roughly a third less tax, from one calendar day. That is the tax reason people look at the holding period before they sell. It is not the only reason to sell or hold, and the price can move by more than that in a day.
The short-term sale adds about $1,400 of tax and the long-term sale about $900.
Tip. The holding period is counted in days from the day after you acquired the property. Use the trade dates on your confirmations, not the settlement dates.
Sources
Four piles, one result
Hypothetical example, not law
Marcus sold several investments this year. His short-term gains were $4,700 and his short-term losses $7,300. His long-term gains were $9,100 and his long-term losses $1,800.
- Net short-term. $4,700 of gains minus $7,300 of losses is a net short-term loss of $2,600 (Schedule D line 7).
- Net long-term. $9,100 minus $1,800 is a net long-term gain of $7,300 (Schedule D line 15).
- Combine them. The net short-term loss reduces the net long-term gain: $7,300 minus $2,600 is $4,700 (Schedule D line 16). The tax law calls the long-term gain left over the net capital gain.
- Rates. What is left is a long-term gain, so it is taxed at 0%, 15% or 20%, depending on where Marcus's taxable income falls. The short-term loss did its work by soaking up gain that would otherwise be taxed at those rates, not by reducing his ordinary income.
Marcus reports a net long-term gain of $4,700.
Tip. Short-term and long-term piles are netted separately first. Only then do the two results offset each other.
Sources
A big loss, spread over years
Hypothetical example, not law
Dana is single. This year she had a short-term gain of $2,300 and a long-term loss of $15,700. Next year she has a long-term gain of $6,700 and nothing else on Schedule D. We assume she has enough income in both years to use the deduction.
- Year one: net the piles. $2,300 of gain against $15,700 of loss is a net capital loss of $13,400.
- Year one: the deduction. The deduction against other income is limited to $3,000 (half of that if married filing separately). Dana deducts $3,000.
- Year one: the carryover. $13,400 minus the $3,000 deducted leaves $10,400 to carry forward. It stays a long-term loss, and there is no deadline for using it.
- Year two: use it against gains first. The $10,400 carryover is entered on Schedule D, line 14, and offsets the new $6,700 gain: $6,700 minus $10,400 is a net long-term loss of $3,700.
- Year two: the deduction again. Dana deducts $3,000 against other income and carries $700 to year three.
Dana's $13,400 loss is used over three years: $3,000 each in the first two, with $700 still waiting after that.
Tip. The carryover keeps its character, short or long, and the Capital Loss Carryover Worksheet figures it each year. Keep last year's Schedule D with this year's return.
Sources
A gain that starts in the zero-rate band
Hypothetical example, not law
Lena is single. Her taxable income before any long-term gain is $39,300. She sells shares held for years and has a long-term gain of $22,200. She has no other gains.
- Where the gain starts. Long-term gain is stacked on top of ordinary taxable income. The zero-rate band for a single filer ends at $49,450 of taxable income.
- The part in the zero-rate band. $49,450 minus $39,300 leaves about $10,200 of room, so about the first $10,200 of the gain is taxed at 0%.
- The rest at the next rate. The other roughly $12,000 falls between $49,450 and $545,500, so it is taxed at 15%: about $1,800.
- The takeaway. The rate depends on the gain's position on top of the rest of your income, not on the gain alone. A smaller sale would have stayed in the zero-rate band; a larger one would put more of the gain at the next rate.
Lena pays about $1,800 of federal tax on a $22,200 gain, because roughly half of it falls in the zero-rate band.
Tip. The Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions (or the Schedule D Tax Worksheet) does this stacking for you. This example shows what the worksheet is doing.
Sources
Selling at a loss, then buying some back
Hypothetical example, not law
Chen buys 100 shares of one company in February 2026 for $5,600. On October 6 he sells all 100 shares for $3,800. On October 20, fourteen days later, he buys 50 shares of the same stock for $1,900. He has no other trades in that stock.
- The loss. $5,600 minus $3,800 is a loss of $1,800 on the sale.
- Is it a wash sale?. The new purchase is of substantially identical stock, within 30 days after the sale. So the loss is disallowed, but only on the 50 shares bought back.
- How much is disallowed. 50 of 100 shares is half of the loss: $900 is disallowed and $900 is allowed on the other 50 shares.
- The new shares' basis. The disallowed loss is added to the cost of the replacement shares: $1,900 plus $900 is a basis of $2,800.
- The holding period. The replacement shares are treated as held from the February purchase, so if Chen sells them after a year from that date the gain or loss is long-term, even though he bought them in October.
Chen deducts $900 this year. The other $900 waits in the basis of the 50 new shares ($2,800).
Tip. The loss is postponed, not erased, unless the replacement shares are in an IRA (next example). It comes back when you finally sell the replacement shares outside the window.
Sources
The IRA that bought the same stock
Hypothetical example, not law
Ana sells 40 shares of an exchange-traded fund for $3,900. She paid $5,200 for them. Eleven days later, her Roth IRA buys 40 shares of the same fund for $3,900.
- The loss. $5,200 minus $3,900 is a loss of $1,300.
- The IRA purchase counts. Rev. Rul. 2008-5 says a purchase by your IRA or Roth IRA within 30 days of the sale is an acquisition for the wash sale rule. The $1,300 loss is disallowed.
- No basis to carry it to. With a taxable account, the disallowed loss would be added to the new shares' basis. The ruling says the IRA's basis is not increased, so the $1,300 is not saved anywhere.
- How it shows up. Ana's broker does not see the IRA at another firm, and may not match it even at the same firm. If she still deducted the loss, she would be wrong on her own return, so she reports it on Form 8949 with code W.
Ana's $1,300 loss is permanently disallowed.
Tip. Reinvesting inside an IRA, a 401(k) or an automatic dividend plan is the easiest way to run into this without noticing. Check every account before you sell at a loss.
Sources
Her account bought what his account sold
Hypothetical example, not law
Omar sells 80 shares for $6,100 that he bought for $8,400. Five days later Nadia, his spouse, buys 80 shares of the same stock in her own account for $6,500. They file a joint return.
- The loss. $8,400 minus $6,100 is a loss of $2,300.
- Does the spouse's purchase count?. Pub. 550 says that if you sell stock and your spouse (or a corporation you control) buys substantially identical stock, you also have a wash sale. That is the IRS's position; the statute speaks of the taxpayer's own purchases and we found no court decision that settles it. Omar and Nadia should treat the loss as disallowed.
- Where it goes. On the IRS's view, the disallowed loss is added to the cost of the replacement shares: $6,500 plus $2,300 is a basis of $8,800 in Nadia's shares.
- Why a broker won't catch it. Brokers apply the wash sale rule only within one account (same identifier number). Two different accounts, even for the same couple, are for the family to track.
On the IRS's view, the $2,300 loss is postponed into Nadia's basis of $8,800.
Tip. Couples who trade the same stock in separate accounts, or hold it in a joint account and an individual one, are the most likely to trip this.
Sources
Shares from an estate
Hypothetical example, not law
Elena inherits shares from her father. He paid $12,100 for them years ago. They were worth $47,800 on the day he died. Five months after his death, Elena sells them for $49,600.
- Her basis. The basis of inherited property is generally its fair market value at the date of death: $47,800. (If the estate had used the alternate valuation date, it would be the value on that date. If the estate filed a return that reported the value, Elena uses that value.)
- Her gain. $49,600 minus $47,800 is a gain of $1,800.
- Short or long?. She held the shares for five months, but property acquired from a decedent and sold within a year of death is treated as held more than a year. The gain is long-term.
- Compared with the father's basis. With his $12,100 basis the gain would have been $37,500. The step-up to date-of-death value wipes out the growth during his lifetime.
Elena reports a long-term gain of $1,800, not $37,500.
Tip. Ask the executor for the date-of-death values (or Schedule A of Form 8971 if one is sent) before the first sale. Keep that statement with your basis records.
Sources
A gift with two bases
Hypothetical example, not law
Sam is given shares by an aunt. Her basis was $21,400. On the day of the gift the shares were worth $15,900, less than her basis. Sam's possible sale prices are $26,500, $18,600 and $11,800.
- Sold for the high price. At $26,500 Sam has a gain, so he uses the donor's basis of $21,400: a gain of $5,100. His holding period includes his aunt's.
- Sold for the low price. At $11,800 he has a loss, so he uses the fair market value at the time of the gift, $15,900: a loss of $4,100. This time the holding period starts the day after the gift.
- Sold in between. At $18,600 the donor's basis would give a loss and the gift-date value would give a gain. The rule says neither: Sam has no gain and no loss.
- Why two bases. The rule stops a donor from passing a built-in loss to someone else. Keep the donor's records of cost and the gift-date value; without them, the IRS may treat the basis as unknown.
Sam has a $5,100 gain, a $4,100 loss, or nothing, depending on the sale price.
Tip. Part of any gift tax the donor paid on the gift can add to basis (never above fair market value). Ask the donor for the basis and any gift tax paid.
Sources
Which coins did I sell?
Hypothetical example, not law
Jordan keeps all 8 units of one digital asset in a single wallet that Jordan controls, with no exchange holding them. 4 units were bought in January 2023 at $6,300 each and 4 units in April 2026 at $9,400 each. In October 2026 Jordan sells 3 units at $12,600 each. Jordan is single with taxable income of $110,000 before the sale. We compare two ways to identify the units sold.
- If Jordan identifies nothing. For units not held with a broker, the rule is first-in, first-out: the earliest units are treated as sold first. Basis is 3 times $6,300, or $18,900, and the gain is $18,900, long-term. The tax is about $2,800 at 15%.
- If Jordan specifically identifies the newer units. A specific identification works only if Jordan records which units are sold no later than the date and time of the sale, by some identifier such as purchase date and price, and keeps records showing the units left the wallet. Basis is 3 times $9,400, or $28,200, and the gain is $9,600, short-term. The tax is about $2,300 at ordinary rates.
- What the comparison shows. The choice changes both the size and the type of the gain, and here the smaller short-term gain costs less tax than the larger long-term one. The record matters more than the result: without a timely identification, first-in, first-out applies.
- If a broker held the coins. The same ideas apply to units held with a broker, but you tell the broker which units to sell, and the broker reports on Form 1099-DA. Digital assets bought before January 1, 2026 are noncovered, so the basis box may be blank.
First-in, first-out gives a $18,900 long-term gain (about $2,800 of tax); identifying the newer units gives an $9,600 short-term gain (about $2,300).
Tip. Set up the habit before the sale: a spreadsheet with date, units, cost and wallet, and a note of the lot you chose, saved the same day.
Sources
A large gain and the net investment income tax
Hypothetical example, not law
Wren is single. Wages are $231,300 and a long-term gain from selling shares is $64,400. Wren has no other investment income and no deductions tied to the gain.
- Modified adjusted gross income. $231,300 plus $64,400 is $295,700.
- The threshold. The net investment income tax uses a threshold of $200,000 for a single filer. Wren is over it by $95,700.
- The base. The tax applies to the lesser of net investment income ($64,400) and the excess over the threshold ($95,700). The lesser is $64,400.
- The tax. 3.8% of $64,400 is about $2,400, reported on Form 8960. It is in addition to the 15% or 20% capital gains tax.
Wren owes about $2,400 of net investment income tax on top of the capital gains tax.
Tip. The threshold is for modified adjusted gross income, not for the gain. A big sale can push you over it in one year even if your wages never would.
Sources