Insights · Taxes

Capital Gains in Retirement: Harvesting, Losses, and Basis

The low-income years between retiring and required distributions are the one stretch when a long-held gain can sometimes be realized at a zero federal rate. They are also the years when realizing one can cost you three other things.

An empty office desk with an open laptop showing a chart, a coffee cup, and a notebook beside a window

Long-term capital gains, on assets held more than a year, are taxed on their own federal schedule rather than as ordinary income, and the lowest band of that schedule is zero. In a year when taxable income is low, which for many households means the years between retiring and starting Social Security and required distributions, a long-held gain can sometimes be realized without federal capital gains tax. The same years are when a realized gain can also increase the taxable share of Social Security, raise a Medicare premium two years later, and reduce a phased-out deduction, so the decision is rarely about the capital gains rate alone.

What to know up front

  • Long-term and short-term gains are taxed differently. One year and a day is the dividing line.
  • The zero percent long-term band is real, and it is bounded by total taxable income, not by the size of the gain.
  • Realized losses offset realized gains first, then a limited amount of ordinary income, and the remainder carries forward indefinitely.
  • Repurchasing a substantially identical security within 30 days before or after a loss sale disallows the loss.
  • Assets held until death generally receive a basis adjustment, which is the strongest argument for not harvesting everything.
  • Illinois exempts retirement income but taxes capital gains. This is the one place the state rate reaches a retiree.

Two schedules, one return

Securities are offered through Cetera Wealth Services, LLC, member FINRA/SIPC. Advisory services are offered through Cetera Investment Advisers LLC, a registered investment adviser. Cetera is under separate ownership from any other named entity. This material is general information and is not individualized investment, tax, or legal advice. Neither Cetera Wealth Services LLC nor any of its representatives may give legal or tax advice; consult your CPA about your own situation.

A capital gain is the difference between what you sell an asset for and your basis in it, which is usually what you paid plus reinvested dividends and certain adjustments. Nothing is taxed until you sell. An unrealized gain, however large, is not on your return.

Holding period decides which schedule applies. Assets held more than one year produce long-term gains, taxed at preferential federal rates. Assets held a year or less produce short-term gains, taxed as ordinary income at your regular bracket. For a retiree selling positions accumulated over decades, nearly everything is long-term, which is the favorable case.

The long-term schedule has three bands, and the lowest is zero percent. The thresholds that separate them are adjusted annually, so any figure printed in an article ages out. What does not change is the structure, and the structure is what you plan against.

The zero percent band

The zero band is governed by your total taxable income for the year, with the gain itself counted in. That has two consequences people find counterintuitive.

The first is that the gain does not have to be small. A household with little other income can realize a substantial long-term gain and have much of it fall inside the zero band, because what is being measured is total taxable income rather than the gain in isolation.

The second is that the band fills from the bottom. Ordinary income, including a traditional IRA withdrawal or a Roth conversion, occupies the lower part of the stack first, and long-term gains sit on top of it. Convert aggressively in a given year and the room available at zero percent shrinks or disappears. The two strategies compete for the same space.

A conversion and a gain harvest are both good ideas. In the same year they are rivals for the same bracket room.

Deliberately realizing a gain to use that room is sometimes called gain harvesting. Because there is no wash sale rule for gains, you can sell and immediately repurchase the same position, which resets your basis upward at no federal capital gains cost. A future sale then starts from the higher basis. The point is not the cash; it is the basis.

What else a gain touches

Here is where the arithmetic stops being about capital gains. A realized gain raises adjusted gross income, and several things in a retiree's return are tested against that figure.

  • Social Security taxation. A gain increases provisional income, which can pull more of your benefit into taxable income. The mechanics are in the Social Security tax torpedo.
  • Medicare premiums. Income from this year sets your premium tier two years from now, and the tiers are cliffs rather than ramps. Covered in coordinating income, Medicare, and investments.
  • The senior deduction. It phases out above stated income levels, so a gain large enough to cross one reduces it. Covered in new federal deductions for retirees.
  • Marketplace health coverage. If you retired before 65 and are buying coverage on an exchange, a realized gain can reduce a premium credit for that year.

None of that means gains should be avoided. It means a gain harvest is sized against the same model as a conversion, against the same thresholds, in the same conversation. Doing it in isolation is how people realize a gain at zero percent and pay for it twice over somewhere else on the return.

Losses, offsets, and carryforward

Realized losses are useful, and the order in which they apply is fixed by statute.

Losses first offset gains of the same type, short against short and long against long. Any excess then offsets gains of the other type. If losses still remain after all gains are absorbed, up to $3,000 can offset ordinary income in that year, a figure set in law and not adjusted for inflation. Anything still left carries forward indefinitely, keeping its character, and can be used in future years under the same ordering.

That carryforward is an asset worth tracking. A retiree who harvested losses during a bad market year may hold a reserve that can absorb gains for years afterward, which changes the calculus on rebalancing a concentrated position.

One rule constrains all of this. If you sell at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed and added to the basis of the replacement. The window runs both directions, and it includes purchases in other accounts you control, including an IRA. Automatic dividend reinvestment is a common way people trigger it without noticing.

Asset location

Asset allocation decides what you own. Asset location decides which account holds it, and it matters more once the accounts are being drawn down.

The general logic is that holdings generating regularly taxed income are often better placed in tax-deferred or tax-free accounts, while holdings expected to appreciate over long periods have an argument for sitting in the taxable account, where the gain is deferred until sale, taxed on the preferential schedule, and potentially reaches the basis adjustment described below.

How the three account types treat the same dollar of growth
AccountGrowth taxedOn withdrawalAt death
Taxable brokerageDividends and realized gains taxed annuallyOnly the gain is taxed, on the long-term schedule if held over a yearGenerally receives a basis adjustment
Traditional IRA or 401(k)Not taxed while heldEntire withdrawal is ordinary incomeHeirs owe income tax as they withdraw
Roth IRANot taxed while heldQualified withdrawals not taxedPasses without income tax, subject to beneficiary rules

Location is a secondary consideration to allocation and to your spending needs. It is also constrained by what is already where, and moving assets between account types is itself a taxable event in some directions.

The basis adjustment at death

This is the provision that argues against harvesting everything, and it is frequently the single largest tax factor in a taxable portfolio.

When an asset in a taxable account passes to heirs, its basis is generally adjusted to the value at the date of death. Decades of appreciation that were never realized are generally not taxed as capital gain to the heir, who starts from the new figure. An asset sold during life does not get that treatment.

The planning tension is direct. Spending from the taxable account realizes gains now. Spending from the IRA instead preserves those appreciated assets for the basis adjustment but accelerates ordinary income and may increase what heirs owe on the inherited retirement account. Which is better depends on the size of each bucket, your bracket, your heirs' brackets, and your actual intentions for the money.

Two cautions. Rules differ for jointly held property, community property, and certain trusts, and the estate itself may be exposed separately, which in this state begins well below the federal threshold. We cover that in the Illinois estate tax. Both questions belong with your CPA and your attorney rather than with a rule of thumb.

The Illinois exception

Illinois subtracts most qualified retirement income from state tax, which is why so little of the planning for an Illinois retiree happens at the state level. Capital gains are the exception.

A gain realized in a taxable brokerage account is not retirement income, so it is subject to the state's flat income tax along with interest, dividends, and any earned income. A withdrawal of the same size from a traditional IRA is not.

That does not override federal considerations, which remain much larger, but it does put a thumb on the scale in close cases and it surprises people who have been told Illinois does not tax retirees. The exemption is specific, and the brokerage account sits outside it.

Richard Casolari, Financial Advisor, Investment Advisor Representative, CFP®, has spent roughly fifty years in financial services. The practice is founder-led and based in Palos Heights, and the work coordinates tax-aware withdrawal sequencing and conversion analysis in coordination with your CPA, investment management, retirement income planning, and Medicare enrollment timing, into one written plan that is revisited on a schedule.

Fees, charges and expenses are detailed in the Cetera Wealth Services LLC's ADV Part 2A. For a comprehensive review of your personal situation, always consult with a tax or legal advisor. Neither Cetera Wealth Services LLC nor any of its representatives may give legal or tax advice.

Securities offered through Cetera Wealth Services, LLC, member FINRA/SIPC. Advisory services offered through Cetera Investment Advisers LLC, a registered investment adviser. Cetera is under separate ownership from any other named entity.

This material is for general information only and is not a recommendation to buy or sell any security or insurance product, or a solicitation in any jurisdiction where the advisor is not properly registered. Investing involves risk, including possible loss of principal. No strategy, including tax-loss harvesting, gain harvesting, or asset location, assures a profit or protects against loss. Federal and state tax law, capital gains rate thresholds, deduction phase-outs, and basis rules change, and several are adjusted annually; confirm current figures and your own situation with your CPA or attorney before acting.

Common Questions

Questions about capital gains in retirement

Can I really pay zero tax on capital gains in retirement?

The lowest band of the federal long-term capital gains schedule is zero percent, and it applies when total taxable income for the year, with the gain included, stays within that band. Households with low income in the years between retiring and starting Social Security and required distributions are the ones most often in a position to use it. The thresholds are adjusted annually, so confirm the current figure with your CPA, and remember that a realized gain can still affect Social Security taxation, Medicare premiums, and phased-out deductions.

What is gain harvesting?

Gain harvesting means deliberately selling an appreciated position in a low-income year to realize the gain while it can be taxed at a low or zero rate, then usually repurchasing the same position. There is no wash sale rule for gains, so the repurchase is permitted immediately. The benefit is the reset to a higher cost basis, which reduces the taxable gain on a future sale. The cash itself is not the point.

How do capital losses offset income?

Losses first offset gains of the same type, long against long and short against short, then offset gains of the other type. If losses remain after all gains are absorbed, up to $3,000 can offset ordinary income in that year, a figure fixed in law and not adjusted for inflation. Anything still unused carries forward indefinitely, keeps its long-term or short-term character, and is applied the same way in later years.

What is the wash sale rule?

If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after that sale, the loss is disallowed for that year and is instead added to the basis of the replacement position. The window runs in both directions and covers purchases in other accounts you control, including an IRA. Automatic dividend reinvestment is a common way the rule gets triggered unintentionally.

What is the step-up in basis and why does it matter?

When an asset in a taxable account passes to heirs, its cost basis is generally adjusted to the value at the date of death, so appreciation that was never realized during life is generally not taxed as capital gain to the heir. An asset sold during life does not receive that treatment. This is the main argument for spending from other accounts and holding highly appreciated positions, though rules differ for jointly held and community property and for certain trusts.

Does Illinois tax capital gains for retirees?

Yes. Illinois subtracts most qualified retirement income, including 401(k) and IRA distributions, pensions, and Social Security, from state taxable income. Capital gains realized in a taxable brokerage account are not retirement income, so they are subject to the state's flat income tax along with interest, dividends, and earned income. It is the main place the state rate reaches an Illinois retiree.

No Cost, No Obligation

Convert, harvest, or hold?

Schedule a Retirement Readiness Review and we will size the bracket room you actually have this year, with your CPA in the loop.

Schedule a Review

A Retirement Readiness Review is an introductory conversation. It is not tax or legal advice and does not substitute for your CPA or attorney. Investing involves risk, including possible loss of principal. Securities offered through Cetera Wealth Services, LLC, member FINRA/SIPC. Advisory services offered through Cetera Investment Advisers LLC, a registered investment adviser.

Richard Casolari, CFP, in a navy suit and striped tie against a dark studio background

About the Author

Richard Casolari, CFP®

Founder, Advanced Financial Concepts · Palos Heights, Illinois

Richard Casolari is a CERTIFIED FINANCIAL PLANNER™ professional and the founder of a retirement income planning practice in Palos Heights, Illinois. He has spent roughly fifty years in financial services, working with pre-retirees and retirees across Chicago's south and southwest suburbs.

The work coordinates retirement income planning, investment management, tax-aware withdrawal sequencing in coordination with your CPA, Medicare enrollment and supplement timing, and protection planning through licensed affiliates, into one written plan that is reviewed on a schedule. Securities are offered through Cetera Wealth Services, LLC, member FINRA/SIPC. Advisory services are offered through Cetera Investment Advisers LLC, a registered investment adviser. The registration history behind that work is public on FINRA BrokerCheck, CRD #42779.