Commentary · Tax Strategy
Selling Your Winners on Purpose.
Written by the William Allan team · Published
On this page
How the 0% long-term capital gains rate works for 2026, and what a sale can cost elsewhere on the return
Most year-end tax advice is about losses: which positions are down, and whether selling them is worth it. Fewer people look at the other side. For some households, the better December question is which winners to sell.
The reason is the 0% federal rate on long-term capital gains. For 2026, a married couple filing jointly pays 0% on those gains as long as their taxable income stays at or under $98,900. For a single filer the line is $49,450. Rev. Proc. 2025-32
Selling a long-held position inside that room and buying it back is called harvesting gains. The holdings can be the same afterward. What changes is the cost basis, and with it the tax on a later sale. The room does not carry over: whatever is unused on December 31 is gone, and a new amount starts in January.
How the 0% Rate Works
- It is measured on taxable income, which is income after deductions. A couple who are both under 65 and take the $32,200 standard deduction can have $131,100 of total income in 2026 and still be inside the 0% range.
- Ordinary income fills the space first. Wages, pensions, interest, IRA withdrawals, and Roth conversions go in at the bottom. Long-term gains and qualified dividends are stacked on top. The part of that stack at or under the line is taxed at 0%, and the part above it is generally taxed at 15%. 26 U.S.C. 1
- Only long-term gains qualify, generally on assets held more than one year. Short-term gains are taxed as ordinary income, and gains on collectibles and some real estate gains have higher maximum rates of their own. IRS Topic 409
- Qualified dividends and capital gain distributions use the same room. Qualified dividends get the same rates as long-term gains, and a mutual fund's capital gain distribution counts as a long-term gain no matter how long you have owned the fund. IRS Publication 550
- It is not the same as the 12% bracket. On a joint return for 2026 the 12% bracket runs to $100,800 of taxable income, which is $1,900 past the 0% line.
- The 2027 lines are already published: $102,100 for a joint return and $51,050 for a single filer. Rev. Proc. 2026-35
Why Sell Something You Plan to Keep
Tax is figured on the gain, and the gain is measured from your cost basis. Shares bought for $50,000 and now worth $130,000 carry an $80,000 gain that is taxable when they are sold. Sell them in a year when that gain is taxed at 0%, buy them back at $130,000, and the $80,000 is no longer waiting.
Three rules make that workable:
- The wash sale rule does not apply. It disallows a loss when you buy substantially identical shares within 30 days before or after the sale. It covers losses only, so shares sold at a gain can be bought back the same day. 26 U.S.C. 1091 We cover the loss side in our piece on tax-loss harvesting.
- You can choose which shares. If you bought at different times and prices, you can tell your broker at the time of the sale which shares to sell, and get written confirmation. Without that, the shares you bought first are generally treated as the ones sold, though mutual fund shares may be on an average-cost method. IRS Publication 550
- The date that counts is the trade date. For shares traded on an exchange, a sale belongs to 2026 if the trade date is December 31 or earlier, even when it settles in January. IRS Publication 550
Buying back has costs of its own. The repurchase happens at whatever the price is at that moment, trading costs may apply, and the holding period starts over: the new shares have to be held more than one year before a later gain on them is long-term. Some fund companies also limit buying back into a mutual fund soon after a sale, and any shares sold at a loss in the same trade would fall under the wash sale rule.
A Worked Example
Consider a hypothetical married couple, both 66, retired and covered by Medicare. They have not claimed Social Security. For 2026 they expect $42,000 of pension and interest income and $8,000 of qualified dividends from a taxable brokerage account.
- Their deductions total $47,500: the $32,200 standard deduction, $3,300 more because both are 65 or older, and the $12,000 deduction for seniors that applies for 2025 through 2028. Rev. Proc. 2025-32 IRS on the deduction for seniors
- Their taxable income before any sale is $2,500, all of it dividends, taxed at 0%.
- That leaves $96,400 of room under the $98,900 line.
In the account is a stock fund they bought years ago for $50,000. It is now worth $130,000, and they intend to keep it.
If they sell it in December and buy it back:
- The $80,000 gain brings taxable income to $82,500, still under the line.
- Federal income tax on the gain is $0.
- Their basis in the fund is now $130,000. If that $80,000 gain were instead taxed at 15% in a later year, the federal tax would be $12,000.
Now suppose they also want to convert $40,000 from a traditional IRA to a Roth IRA in 2026.
- The conversion alone, with no sale, would add $3,644 of federal income tax.
- The sale alone adds $0.
- Both in the same year add $7,832.
The $4,188 difference comes from the two moves competing for the same space. The conversion is ordinary income, so it goes in at the bottom. Their modified adjusted gross income also passes $150,000, which cuts their deduction for seniors by $2,400. Together those lift $26,000 of the gain above the line, where it is taxed at 15%.
In that position, each added dollar of ordinary income is taxed at 12%, pushes a dollar of gain from 0% to 15%, and trims 12 cents from their deduction for seniors. Together that comes to about 30 cents of federal tax on the dollar.
These figures are hypothetical. They cover federal income tax only, use the 2026 rules, and assume nothing else on the return changes. In a state that taxes capital gains as ordinary income, such as California, the sale would also add state income tax for the year.
What the Sale Costs Elsewhere
A gain taxed at 0% still counts in adjusted gross income, which many other tax rules and benefit programs use.
- Social Security. Once you are collecting benefits, a realized gain counts toward the income test that decides how much of the benefit is taxable, up to 85% of it. Newly taxable benefits are ordinary income, which takes up room of its own. IRS Publication 915
- The deduction for seniors. For each person who qualifies, it shrinks by 6% of modified adjusted gross income above $150,000 on a joint return, or $75,000 for a single filer. 26 U.S.C. 151
- Health coverage before 65. If you buy insurance through a marketplace, the premium tax credit for 2026 is not allowed once household income is more than 400% of the federal poverty line. For 2026 coverage in the 48 contiguous states and D.C., that is $84,600 for a household of two. HealthCare.gov The temporary rule that removed the limit covered 2021 through 2025. A household that finishes the year over the line has to repay all of the advance credit it received. Below the line, a gain still raises household income and reduces the credit, and for 2026 there is no cap on how much excess advance credit has to be repaid. IRS questions and answers on the premium tax credit
- Medicare premiums. Income in 2026 sets the 2028 premiums for Parts B and D. For 2026 premiums, the first surcharge applied above $218,000 of modified adjusted gross income on a joint return, or $109,000 for a single filer. CMS fact sheet on 2026 Medicare premiums Measured against lines like those, a sale that stays inside the 0% range would generally stay under the first one, although tax-exempt interest counts toward that income too. A larger sale may not. We explain the lookback in our piece on Medicare IRMAA.
- State income tax. Many states tax capital gains like other income. California is one of them: it has no lower rate for capital gains. California Franchise Tax Board
When It Is Not Worth Doing
- You have capital losses carried over from earlier years. Those are applied against this year's gains before any rate is, so the sale would use up losses that could otherwise offset gains taxed at 15% in a later year, or up to $3,000 a year of other income. IRS Publication 550
- You expect to leave the shares to heirs. Inherited property generally takes a basis equal to its value on the date of death, which removes the built-in gain without a sale. IRS Publication 551
- You plan to give the shares to charity. A gift of long-held appreciated shares to a qualifying charity is not a sale, so the gain is not taxed, and if you itemize, the gift can generally be deducted at fair market value within income limits. IRS Publication 526 We cover that in our piece on donor-advised funds.
- You expect to be in the 0% range in the year you would sell anyway. Then there may be nothing to save.
- The room is needed for something else. A Roth conversion, or an IRA withdrawal you need for spending, draws on the same low-income year. Our piece on the Roth conversion window covers that side, and our Roth conversion and IRMAA planner estimates how much room the lower brackets have before Social Security and required distributions begin. The planner does not model capital gains.
Before December 31
Questions to work through with your tax professional before year-end:
- What will taxable income be before any sale? Start from a projection of the full year: income so far, what is still coming in December, and your deductions.
- What is already using the room? Count qualified dividends for the year and any capital gain distributions your funds have announced for December.
- Where is the line for your filing status? For 2026 it is $98,900 on a joint return, $49,450 for a single filer, and $66,200 for a head of household. The room is what is left under it.
- What else does the added income touch? Check Social Security, the deduction for seniors, a marketplace premium credit, a Medicare surcharge two years out, and state tax.
- Which shares? One approach is to use shares held more than one year with the largest gain per dollar sold, which keeps the trade smaller. Confirm the purchase dates and the lot instructions with your custodian before the trade.
- Is a Roth conversion planned for the same year? The two need to be sized together, because the conversion goes in first.
- How close is the estimate? A late dividend or fund distribution can push part of the gain over the line, where it is taxed at 15%. A completed sale cannot be reversed, so a margin helps.
Where an Advisor Fits
Harvesting gains is an investment decision and a tax decision made on the same day: which shares, how much, and what else the income touches. That is the kind of question we work through in our tax planning approach, where the tax work and the investment decisions happen in the same conversation.
William Allan is fee-only and is paid directly by clients. The firm does not earn commissions for selling investments, insurance, or proprietary products.
Schedule a free introductory call with Ian, who handles first conversations for William Allan. The call is not advice; its purpose is to understand your situation and help arrange the right next step with the advisory team.
This commentary is for informational purposes only and is not investment, tax, or legal advice. All investing involves risk, including the possible loss of principal, and past performance does not guarantee future results. The example is hypothetical, is not based on any client, and does not represent any investment's performance. Selling and repurchasing a security involves transaction costs and the risk that its price changes between the two trades. Rules and figures were checked November 13, 2026, against Rev. Proc. 2025-32 and Rev. Proc. 2026-35, IRS Topic 409, the current editions of IRS Publications 526, 550, 551, and 915, the IRS page on the deduction for seniors, the IRS questions and answers on the premium tax credit, HealthCare.gov, the CMS fact sheet on 2026 Medicare premiums, the California Franchise Tax Board, and sections 1, 151, and 1091 of the Internal Revenue Code, and can change. Whether a gain is taxed at 0%, and what else it affects, depends on your income, filing status, state, and the rest of your return, so confirm your situation with your tax professional. William Allan does not provide tax or legal advice; tax preparation and tax advice, when provided, are through affiliated Crawshaw CPAs under a separate engagement. William Allan is an investment adviser registered with the SEC; registration does not imply any specific level of skill or training.