Retirement & Tax Planning Answers

Tax-Loss Harvesting and Capital Gains Management in a Taxable Account

Reviewed by Raman Singh, CFP® · Enrolled AgentUpdated
Tax Planning

Quick answer

Tax management in a taxable brokerage account is a year-round system, not a December event. It has five parts. First, sell by specific lot rather than the custodian's default of first-in, first-out, so you choose which gains or losses you realize. Second, harvest losses when positions fall, and buy a similar but not substantially identical replacement so you stay invested without triggering the wash sale rule, which also reaches your IRA, your spouse's accounts, and automatic dividend reinvestment. Third, harvest gains on purpose in low-income years: a married couple with $60,000 of other taxable income in 2026 can realize about $38,900 of long-term gains at a 0% federal rate, although Arizona still taxes them. Fourth, set an annual gain budget based on your bracket, the 3.8% net investment income tax threshold at $250,000 of MAGI for joint filers, and any ACA or IRMAA limits, then manage sales, rebalancing, and fund distributions to stay inside it. Fifth, use the endgame tools: give your most appreciated lots to charity, and hold the lowest-basis positions for the step-up in basis at death. Direct indexing is the tool that scales loss harvesting for larger accounts, but the system works with ordinary index funds too.

How to run a year-round capital gains management system

A calendar-based routine for managing realized gains and losses in a taxable brokerage account.

  1. 1

    January: set the year's gain budget

    Estimate ordinary income, then decide how much realized gain fits under your key thresholds: the 0% or 15% capital gains bracket, the $250,000 NIIT threshold for joint filers, and any ACA or IRMAA limits.

  2. 2

    Set cost basis method and dividend handling

    Use specific identification or a tax-optimized method on every taxable account, and send dividends to cash in accounts where you may harvest losses.

  3. 3

    During the year: harvest losses when positions fall

    When a position drops meaningfully below cost, sell it, buy a similar but not substantially identical replacement, and check IRAs and a spouse's accounts for purchases within 30 days.

  4. 4

    On every sale: choose lots deliberately

    Sell losses first, then the highest-cost long-term lots, and avoid short-term gains unless there is a clear reason.

  5. 5

    October: review mutual fund distribution estimates

    Identify large expected distributions in taxable accounts and decide whether to sell before the record date.

  6. 6

    November and December: fill or protect the budget

    If you have 0% or low-bracket room, harvest gains to reset basis. If you are near a threshold, harvest losses or defer sales into January.

  7. 7

    Year end: give appreciated lots and record carryforwards

    Donate the most appreciated long-term shares for charitable gifts, and record any loss carryforward for next year's budget.

The Mechanics of a Year-Round Capital Gains System

Lot selection is the foundation and costs nothing. Every purchase creates a tax lot with its own date and cost basis. When you sell part of a position, most custodians default to first-in, first-out, which usually sells the oldest, lowest-basis shares and realizes the largest gain. Choosing specific identification lets you pick the lots, and it must be designated at or before the trade settles, not after the fact. A sensible default order when raising cash is short-term losses first, then long-term losses, then long-term gains from the highest-cost lots, and short-term gains last. Many custodians let you set a standing method such as highest cost or tax-optimized. Mutual funds may also use average cost, which is simpler but removes lot-level control once elected.

Tax-loss harvesting means selling a position below its cost to realize the loss, then immediately buying something similar so your market exposure stays roughly the same. Losses first offset gains of the same type (short-term against short-term, long-term against long-term), then the other type, then up to $3,000 a year of ordinary income. Anything left carries forward indefinitely and keeps its character. The wash sale rule disallows the loss if you buy a substantially identical security within 30 days before or after the sale. Swapping an S&P 500 fund for a total market fund, or one sector fund for another built on a different index, is a common way to stay invested. The rule reaches further than people expect: a purchase in your IRA, a purchase by your spouse, or an automatic dividend reinvestment within the window can all trigger it. A wash sale caused by an IRA purchase permanently disallows the loss.

Tax-gain harvesting is the less known mirror image. The 0% long-term capital gains rate applies to taxable income up to about $98,900 for married couples filing jointly in 2026 ($49,450 single). In the early retirement years before Social Security and RMDs, many couples have very little taxable income. A couple with $60,000 of other taxable income after the standard deduction has about $38,900 of room to realize long-term gains at 0% federal tax. They can sell appreciated shares and buy them right back, since the wash sale rule does not apply to gains, and reset the basis higher at no federal cost. Arizona taxes capital gains as ordinary income at its 2.5% flat rate, so the state cost is small but not zero. The extra income also raises MAGI, which can affect ACA subsidies, the taxation of Social Security, and IRMAA two years later.

The annual gain budget ties it together. Each January, estimate your ordinary income for the year and decide how much realized gain you can accept before crossing a threshold that matters: the top of the 0% or 15% capital gains bracket, the 3.8% net investment income tax, which applies above $250,000 of MAGI for joint filers ($200,000 single) and is not indexed for inflation, the ACA 400% of FPL cliff, or an IRMAA tier. That budget then governs rebalancing trades, withdrawals from the taxable account, and any gain harvesting. Harvested losses expand the budget. A large unplanned gain, such as a fund distribution or a forced sale, consumes it.

Mutual fund distributions are the part of the budget you do not control. Actively managed funds, and some index mutual funds, distribute realized capital gains to shareholders each year, usually in November or December, and you owe tax on them even if you reinvest. Fund companies publish estimates in October. If a fund you own in a taxable account is expected to make a large distribution and you have a loss or a small gain in it, selling before the record date can avoid the distribution. Avoid buying a fund in a taxable account just before its distribution date. Over time, moving from high-distribution mutual funds to tax-efficient ETFs, done within the gain budget, reduces this problem at the source.

Direct indexing scales loss harvesting by holding the individual stocks of an index rather than one fund, so losses can be harvested on individual names even when the index is up. It is most useful for larger accounts with ongoing gains to offset, such as a concentrated stock unwind or a business sale, and its benefit fades as the easy losses are used up. The mechanics and trade-offs are covered in a separate article on direct indexing versus index funds. The lot-selection, wash sale, and gain-budget rules above apply either way.

The endgame of capital gains management is often not selling at all. Assets held until death generally receive a step-up in basis, and in Arizona, community property can receive a full step-up for the surviving spouse at the first death. That makes your lowest-basis lots the ones to hold longest. For charitable giving, donating long-term appreciated shares to a charity or donor-advised fund avoids the gain entirely and generally provides a deduction at fair market value, subject to AGI limits. Give the most appreciated lots, keep the cash you would have donated, and use it to rebuy the position at a higher basis.

Running the System in Your Own Accounts

Log into your brokerage account and check the default cost basis method. If it says first-in, first-out, change it to specific identification or a tax-optimized method, and confirm how each sale's lots are chosen. This single setting can meaningfully reduce the gains you realize on routine withdrawals.

Turn off automatic dividend reinvestment in taxable accounts where you plan to harvest losses, and direct dividends to cash instead. Reinvest manually as part of rebalancing. Check your IRA and your spouse's accounts before harvesting so a purchase there does not wash out the loss.

If you are in the years between retirement and Social Security or RMDs, look for 0% gain harvesting room every fall. Estimate your taxable income, find the gap below about $98,900 for joint filers, and weigh the benefit against ACA subsidy and IRMAA effects. The same room may be better used for Roth conversions in some years; the two compete for the same low-bracket space.

Keep a running record of loss carryforwards from year to year. A large loss harvested in a down market can offset gains for many years, and it is often the key that makes it affordable to diversify a concentrated position or move out of high-distribution funds.

Coordinate the taxable account with your estate and giving plans. Highly appreciated lots that you may not need are often better held for the step-up or given to charity than sold, and your withdrawal plan should draw from high-basis lots first.

Common Mistakes

  • Leaving the custodian's first-in, first-out default in place and realizing the largest possible gain on every sale.
  • Harvesting a loss in a taxable account while the same fund is being bought in an IRA or a spouse's account, triggering a wash sale that can permanently disallow the loss.
  • Letting automatic dividend reinvestment buy a few shares within 30 days of a harvest and wash part of the loss.
  • Skipping 0% gain harvesting in low-income early retirement years and later selling the same shares at 15% or higher.
  • Harvesting gains or doing conversions without checking the effect on ACA subsidies, Social Security taxation, or IRMAA two years later.
  • Buying an actively managed mutual fund in a taxable account weeks before its annual capital gains distribution.
  • Selling highly appreciated shares to fund charitable gifts instead of donating the shares directly.

2026 Long-Term Capital Gains Brackets and Net Investment Income Tax

Long-term capital gains rates apply based on taxable income, with gains stacked on top of ordinary income. NIIT thresholds are based on MAGI and are not indexed for inflation.

ItemMarried filing jointlySingle
0% long-term capital gains rateTaxable income up to about $98,900Taxable income up to about $49,450
15% long-term capital gains rateAbout $98,901 to $613,700About $49,451 to $545,500
20% long-term capital gains rateAbove about $613,700Above about $545,500
Net investment income tax (3.8%)MAGI above $250,000MAGI above $200,000
Short-term capital gainsTaxed at ordinary income ratesTaxed at ordinary income rates
Net capital loss deduction against ordinary income$3,000 per year; excess carries forward$3,000 per year; excess carries forward
Wash sale window30 days before or after the sale, including IRAs and spouse's accounts30 days before or after the sale, including IRAs
Arizona tax on capital gainsTaxed as income at the 2.5% flat rate; a 25% subtraction applies to net long-term gains on assets acquired after 2011Taxed as income at the 2.5% flat rate; a 25% subtraction applies to net long-term gains on assets acquired after 2011

Source: Internal Revenue Service · Verified

Sources

Authoritative references that back the claims on this page.

Continue exploring

Deeper resources on this topic: guides, calculators, and the planning process.

Run the numbers yourself

Free tools, no login required. Results delivered to your inbox.

Related Questions

Need a coordinated retirement tax strategy?

Most taxable accounts leave money on the table through default lot selection, missed 0% years, and surprise fund distributions, not through bad investments. If you want to talk through how this applies to your situation: Schedule a Strategic Fit Interview.