Skip to content

Tax-Gain Harvesting

Tax-gain harvesting is deliberately selling an appreciated investment in a taxable account during a low-income year to realize the gain at a low or zero rate, then usually buying it straight back. The point is not the sale but the higher cost basis it leaves behind.

Last reviewed by Steven Fox, CFP®, EA on

Quick Summary

  • It only makes sense in a taxable account. Inside an IRA or a 401(k) there is no basis and no capital gains rate to arbitrage.
  • The wash sale rule reaches losses, not gains, so the same security can be repurchased immediately without affecting the tax result.
  • The benefit is the reset basis, which shrinks the taxable gain on a future sale or narrows a later rebalancing bill.
  • Realized gain raises adjusted gross income even when the tax on it is zero, which is where the strategy most often backfires.
  • It competes for the same low-income year as a Roth conversion, and only one of them can use the room.

Definition

Tax-gain harvesting is the deliberate realization of a long-term capital gain in a year when the taxpayer's income is low enough that the gain is taxed at 0% or at an unusually low rate. Published sources also call it simply gain harvesting; the two names describe the same manoeuvre, and the "tax-" prefix exists mostly to mirror tax-loss harvesting, which is its opposite number. Where tax-loss harvesting captures a loss and lowers basis, tax-gain harvesting captures a gain and raises it.

The move is almost always paired with an immediate repurchase, so the investor's holdings are unchanged once the trade settles and only the cost basis has moved. Nothing in the tax code prevents that repurchase, which is the structural feature the whole strategy rests on.

Advanced Explanation

The rule that makes it work is the one that does not exist. Internal Revenue Code section 1091 is headed "Loss from wash sales of stock or securities", and every operative sentence in it disallows a loss where substantially identical stock or securities are acquired within 30 days before or after the sale. There is no parallel provision for gains anywhere in the section, so selling at a gain and rebuying the same fund the same afternoon changes nothing about the tax result. A tax-loss harvester has to find a not-substantially-identical replacement and wait out a 61-day window; a gain harvester has neither problem.

What the strategy buys is basis, and basis is only worth something if the position is later sold at a rate above zero. That makes the case for it narrower than it first appears. If the investor will eventually sell in a year when the gain is again taxed at 0%, harvesting achieved nothing. If the position will instead be held until death, section 1014 resets basis to fair market value anyway and harvesting was unnecessary. The strategy pays where a later sale is likely and likely to be taxed, which typically means someone who expects higher income later, or who will need to sell into a specific goal.

The room is also contested. A year with unusually low taxable income is the same year a Roth conversion wants, and the two compete directly: gain realized at 0% consumes the space that conversion income would otherwise have filled at a low ordinary rate, and vice versa. Only one of them can have it.

Finally, realized gain is income for purposes that do not care what rate it was taxed at. It raises adjusted gross income, which is the measure used for marketplace health insurance premium tax credits in the same year, for Medicare's income-related premium surcharge on a two-year lag, for the formula that decides how much of a Social Security benefit is taxable, and for the base-year income that federal student aid calculations use. A gain taxed at 0% federally can still cost real money through one of those, and state income tax is a separate calculation again: many states tax capital gain as ordinary income with no equivalent zero rate.

Used in a Sentence

“In the two years between leaving her job and claiming Social Security, Beatriz did a little tax-gain harvesting each December, selling and immediately repurchasing enough of her index fund to use up the room she had at the 0% rate.”

How It Works

The sequence is short. Estimate taxable income for the year before any harvesting, work out how much long-term gain would still be taxed at 0% once ordinary income has stacked underneath it, sell enough of an appreciated lot to realize about that much gain, and repurchase immediately if you want to keep the exposure. The new purchase establishes a new, higher cost basis, and a new holding period for the replacement shares.

A hypothetical. Theo owns 200 shares he bought at $30, a cost basis of $6,000, now worth $70 a share, or $14,000. That is an $8,000 unrealized gain. In a low-income year he sells all 200 shares and buys 200 back the same day at $70. If the whole $8,000 fits under his 0% ceiling, the federal tax on the sale is zero and his basis is now $14,000. Three years later he sells at $90 a share, or $18,000. His taxable gain is $4,000 rather than the $12,000 it would have been without the harvest, and at a 15% rate that is $600 of tax instead of $1,800.

Two practical notes on the same example. The repurchase resets the holding period, so a sale within the next year would be short-term and taxed at ordinary rates. And the round trip costs whatever the bid-ask spread and any commission come to, which on a thinly traded holding can be more than the tax saved.

Pros and Cons

Pros

  • Converts unrealized gain into basis at a rate of zero, which is as cheap as realizing a gain ever gets.
  • No replacement security and no waiting period, because the wash sale rule reaches losses only.
  • Makes a later rebalancing or a concentrated-position unwind materially cheaper.
  • Fits naturally into years that already exist for other reasons: a sabbatical, a career break, or the gap between retiring and starting Social Security.

Cons

  • Pointless in a tax-deferred or Roth account, where basis does nothing.
  • Achieves nothing if the position would have been sold in another 0% year anyway, or held until death and stepped up under section 1014.
  • Consumes a low-income year that a Roth conversion might use to better effect.
  • Raises adjusted gross income, which can reduce a premium tax credit, increase Medicare surcharges two years later, make more of a Social Security benefit taxable, or affect financial aid.
  • State income tax is calculated separately, and a state may tax the gain even when the federal rate is zero.
  • Trading costs and a reset holding period are real, if usually small.

People Also Asked

Answers to the most frequently asked questions.

Does the wash sale rule stop me buying the investment back?
No. Section 1091 disallows a loss where substantially identical stock or securities are acquired within 30 days before or after the sale, and it contains no equivalent rule for gains. Selling at a gain and repurchasing the same security immediately leaves the realized gain and the new higher basis exactly as they are.
What is the difference between tax-loss and tax-gain harvesting?
They point in opposite directions. Tax-loss harvesting sells at a loss to capture a deduction and leaves you with a lower basis, and it has to dodge the wash sale rule. Tax-gain harvesting sells at a gain in a low-rate year to raise basis, and the wash sale rule does not apply. One defers tax, the other pays it early at a deliberately low rate.
Is tax-gain harvesting worth doing inside an IRA or 401(k)?
No. Those accounts have no cost basis for capital gains purposes and distributions from a traditional account are taxed as ordinary income regardless of how the money was earned inside. Selling and rebuying inside a retirement account changes nothing on your tax return, so the strategy applies only to a taxable brokerage account.
When does tax-gain harvesting backfire?
Most often when the extra adjusted gross income costs more than the tax it saved, through a smaller marketplace premium tax credit, a higher Medicare premium two years later, or more of a Social Security benefit becoming taxable. It also backfires when the gain does not actually fit under the zero rate and simply gets taxed at 15% years earlier than it needed to be.
How much gain should be harvested in a given year?
That depends entirely on how much room is left under the zero-rate ceiling once ordinary income is stacked underneath it, and on what else wants that room. The mechanics of measuring the room belong to the 0% long-term capital gains rate, and the answer changes with every dollar of other income in the year.

Have a question a definition can't answer?

Advice-only advisors answer questions like this for a transparent flat fee — no products, no commissions, no asset management.

Find an Advisor