What is Tax-Loss Harvesting?
Harvested losses offset capital gains plus $3,000 of ordinary income a year, but the tax is usually deferred rather than erased, and wash sales can block it.

Tax-loss harvesting is the practice of selling an investment that has fallen below what you paid for it, using the realized loss to offset taxable gains elsewhere, and reinvesting the proceeds so your portfolio stays roughly where it was. The loss is real for tax purposes while your market exposure is largely preserved.
It only works in taxable brokerage accounts. Losses inside an IRA, 401(k), or other tax-sheltered account have no tax consequence at all, because gains in those accounts are not taxed annually in the first place.
How Tax-Loss Harvesting Works
Losses are applied in a defined order. Short-term losses offset short-term gains first, long-term losses offset long-term gains first, and whatever remains crosses over to offset the other category.
If losses still exceed gains after that, up to $3,000 per year can be deducted against ordinary income ($1,500 if married filing separately). Anything beyond that carries forward to future tax years for as long as you live, keeping its short-term or long-term character. Losses still unused on your final tax return expire and cannot pass to your heirs or estate.
Consider someone who realized $20,000 of short-term gains from rebalancing and holds a fund sitting at a $26,000 loss. Selling it produces:
- $20,000 of loss offsetting the short-term gains, which would otherwise have been taxed at ordinary income rates
- $3,000 deducted against ordinary income this year
- $3,000 carried forward to future years
The proceeds go immediately into a similar but not identical fund, so the portfolio keeps its intended allocation.
Tax-Loss Harvesting Rules: The Wash-Sale Rule
If you buy a “substantially identical” security within 30 days before or after the sale, the loss is disallowed. That is a 61-day window centered on the sale date, not just the 30 days after.
It spans all of your accounts. Buying the same security in your IRA or Roth IRA triggers the rule, and in that case the loss is permanently disallowed rather than merely deferred. Under IRS Revenue Ruling 2008-5, the disallowed loss does not increase the IRA’s basis, so there is nowhere for it to go.
It includes your spouse’s accounts and any entity you control.
Automatic reinvestment counts as a purchase. A dividend reinvestment in the same fund during the window will disallow at least part of the loss. Turning off automatic reinvestment in every account that holds the fund avoids this.
When a wash sale does occur in a taxable account, the disallowed loss is added to the cost basis of the replacement shares, so the benefit is deferred rather than destroyed.
The “substantially identical” standard has never been defined precisely for funds. Selling one broad index fund and buying a different provider’s fund tracking a different index is the more conservative approach. Selling a fund and buying another fund tracking the exact same index is more aggressive, since the two funds are much harder to argue are not substantially identical.
What Tax-Loss Harvesting Actually Saves You
Selling at a loss and reinvesting resets your cost basis to the new, lower price. That larger future gain will be taxed later. Harvesting therefore defers tax rather than eliminating it, and the real gains come from three narrower effects:
Rate arbitrage. A loss used against short-term gains saves tax at ordinary income rates, while the future gain it creates may be taxed at long-term rates. That spread is a genuine, permanent saving. For higher earners the rate saved also includes the 3.8% net investment income tax (NIIT), which applies above $200,000 of modified adjusted gross income for single filers and $250,000 for joint filers, plus any state income tax on capital gains.
Time value. Tax deferred for twenty years is worth meaningfully less in present-value terms than tax paid now, and the money stays invested in the meantime.
The basis step-up. Assets held until death generally receive a step-up in basis, which can erase the deferred gain entirely. For someone who never sells the replacement shares, deferral becomes elimination.
Set against those: transaction costs, bid-ask spreads, the risk of drifting from your intended allocation, and the possibility that a future rate increase makes the deferred gain more expensive than the deduction was worth.
Is Tax-Loss Harvesting Worth It?
Harvesting favors people with large taxable accounts, high marginal rates, and realized gains to offset. It does very little for someone in the 0% long-term capital gains bracket, and nothing at all for someone whose investments are entirely in retirement accounts.
The opportunity exists during market declines, whenever they happen in the year. To count for a given tax year, the sale must be made by December 31 (the trade date, not the settlement date). Waiting until December is conventional, but the losses available then are whatever survived the year, not the largest ones that appeared in it.
The mirror-image strategy is tax-gain harvesting. In low-income years, particularly early retirement before Social Security and required distributions begin, deliberately realizing gains while they fall in the 0% long-term bracket resets basis upward without federal capital gains tax. The added income still counts toward modified adjusted gross income, so it can reduce Affordable Care Act (ACA) premium subsidies, raise state tax, or push you over an income-related monthly adjustment amount (IRMAA) Medicare threshold two years later. It also competes for the same low-bracket space as Roth conversions.
Harvested losses and harvested gains also work against each other. Carried-forward losses are applied automatically against your future gains, including gains that would have been taxed at 0% anyway, so part of a large carryforward can be spent without saving any tax. You can compare gain harvesting and Roth conversions against ACA and IRMAA thresholds over a multi-year plan with ProjectionLab’s tax optimizer.
Frequently Asked Questions
How much can tax-loss harvesting save me? A harvested loss saves tax at your ordinary income rate when it offsets short-term gains or up to $3,000 of ordinary income, and at your capital gains rate when it offsets long-term gains. The saving is partly a deferral, since your replacement shares carry a lower basis and a larger future gain.
What is the wash-sale rule? Buying a substantially identical security within 30 days before or after selling at a loss disallows the loss. The window is 61 days total, and it applies across all your accounts and your spouse’s, including IRAs.
Can I sell and buy back the same fund after 31 days? Yes, once the window has fully passed the loss is allowed. The risk is being out of the position for a month, during which the market can move against you by more than the tax saved. Buying a similar but not identical fund immediately avoids that exposure.
Does tax-loss harvesting work in a 401(k) or IRA? No. Those accounts are not taxed on annual gains, so a loss inside them has no tax effect. Worse, buying the same security in an IRA within the wash-sale window permanently disallows a loss harvested in your taxable account.
Is tax-loss harvesting worth it for small amounts? Often not. Against transaction costs, tracking differences in the replacement fund, and the record-keeping involved, a few hundred dollars of loss rarely justifies the exercise. It becomes meaningful at larger balances and higher marginal rates.
Does the wash-sale rule apply to cryptocurrency? The rule in the tax code applies to stocks and securities, and cryptocurrency is generally treated as property rather than a security, so it has historically fallen outside it. Proposals to extend the rule to digital assets have appeared repeatedly, so this is worth re-checking against current law before relying on it.
Disclaimer: The content, tools, and resources on ProjectionLab.com are intended solely for informational and educational purposes and should not be construed as professional financial or investment advice. Our materials are designed to provide general guidance and are based on the input and data provided by users. ProjectionLab makes no guarantee of the accuracy, completeness, or applicability of this content to individual circumstances. Effective financial planning and investment involve comprehensive consideration of a wide array of personal financial factors. The tools and resources available on ProjectionLab are aimed at helping users develop an understanding of their financial trajectory. However, they should not be solely relied upon for creating a complete financial plan. We strongly recommend consulting a financial services professional who can provide personalized advice based on your unique financial situation before making any significant financial decisions. While we endeavor to keep the information on ProjectionLab current and accurate, the content may differ from that found on other financial institutions, service providers, or specific product sites. All content and tools on ProjectionLab are provided without any guarantees or warranties of any kind.