
What's in this deep dive
- Before you start
- Step 1: Find your harvestable losses
- Step 2: Decide whether harvesting is worth it
- Step 3: Sell the losing position to realize the loss
- Step 4: Avoid the wash-sale rule
- Step 5: Buy a replacement security to stay invested
- Step 6: Offset gains, then ordinary income
- Step 7: Carry forward losses and document everything
- A worked example: harvesting a loss end to end
- Where the tax benefit actually comes from
- The wash-sale rule in plain words
- Common mistakes in tax-loss harvesting
- Troubleshooting your tax-loss harvest
- Your tax-loss harvesting checklist
- The bottom line
Tax-loss harvesting is one of the few moves that can turn a bad day in the market into a real reduction in your tax bill, and it is far more approachable than the name suggests. When a holding in your taxable account slips below what you paid for it, you are sitting on a paper loss that does nothing for you. Selling it on purpose converts that paper loss into a realized one the tax code recognizes, which can then cancel out gains you took elsewhere and, up to a limit, shave a slice off your ordinary income. The catch is a set of rules, chiefly the wash-sale rule, that decide whether the loss actually counts, and getting one of them wrong can quietly void the whole exercise.
This ledger note walks how to do tax-loss harvesting step by step: finding the losses worth harvesting, deciding whether the trade is worth it, selling to realize the loss, steering clear of the wash-sale rule, buying a suitable replacement so you stay invested, offsetting your gains and then up to a commonly cited $3,000 of ordinary income, and carrying forward whatever is left. It sits alongside our note on how dividends are taxed on the income side of the same account, our rebalancing walkthrough on trading tax-efficiently when you reset your mix, and our index-fund tutorial on the kind of broad holdings that make clean replacement securities. Run your own harvest math in the companion below or in our calculator as you read. Every figure here is illustrative arithmetic, general information rather than tax advice, and the specific limits can change, so confirm the current IRS rules and consult a tax professional before acting.
Key takeaways
- Tax-loss harvesting means selling a losing position in a taxable account on purpose, so the realized loss can offset taxable capital gains dollar for dollar and, up to a limit, some ordinary income.
- The seven steps: find harvestable losses, decide whether it is worth it, sell to realize the loss, avoid the wash-sale rule, buy a replacement security, offset gains then ordinary income, and carry forward the rest.
- The wash-sale rule disallows the loss if you buy the same or a substantially identical security within 30 days before or after the sale, a 61-day window that even reaches across your accounts.
- After offsetting gains, a commonly cited limit lets you offset up to $3,000 of ordinary income per year, with any excess loss carried forward; confirm the current IRS limits, which can change.
- It only works in a taxable account, not an IRA or 401(k), and it makes the most sense when you have real gains to offset and a clean replacement that keeps you invested.
Before you start
Before you sell anything, get four things in front of you, because they decide whether harvesting does anything useful. First, a taxable brokerage account: this strategy has no effect inside an IRA or 401(k), where losses are not deductible. Second, your cost basis for each holding, meaning what you actually paid, which your broker usually reports lot by lot on the positions screen. Third, a read on your realized gains so far this year, since the first job of a harvested loss is to cancel those out. Fourth, a candidate replacement holding picked in advance, so you are not forced to sit in cash during the wash-sale window.
What you need to begin: a taxable brokerage account, your cost basis per lot, your realized gains for the year to date, and a replacement holding chosen ahead of time. Time to set up: about twenty minutes to review positions and plan, plus a few minutes to place the trades. Difficulty: low for the arithmetic, moderate for the wash-sale and replacement judgment. On your inputs, the companion in this ledger note shows an illustrative harvestable loss, how much of it offsets your gains, how much offsets ordinary income, and what carries forward.
Step 1: Find your harvestable losses
Start by finding the positions actually worth harvesting, because you can only harvest a loss that exists on paper right now. Open your taxable account and look for holdings whose current value sits below your cost basis, meaning the market has marked them down since you bought. Most brokers show an unrealized gain or loss column per position, and often per tax lot, which is the number you want. A lot bought at a high price during a rally may show a loss even when the position overall looks fine, so review at the lot level rather than the blended average where your platform allows it.
How to do it: pull up the positions screen, sort or scan for negative unrealized amounts, and note the dollar size of each loss and whether the lot is short-term (held a year or less) or long-term. The short versus long distinction matters because short-term losses first offset short-term gains, which are usually taxed at higher ordinary rates, so a short-term loss can be especially valuable. Write down the candidate lots, their losses, and their holding periods before deciding anything.
Worked number: suppose an illustrative fund lot you bought for $20,000 is now worth $14,000. That is a $6,000 unrealized loss sitting in the account doing nothing for you until you act. On your inputs, the companion turns your own cost basis and current value into the same harvestable loss figure.
Watch out: do not confuse a paper loss with a reason to abandon a sound holding. Harvesting is a tax move layered on top of an investment you plan to keep exposure to, not a signal that the asset is broken. The aim is to capture the tax benefit while staying invested, which is exactly what the replacement step later protects.
Step 2: Decide whether harvesting is worth it
Before selling, decide whether the harvest earns its keep, because a loss is only worth realizing if the tax benefit beats the friction. The benefit depends on what the loss can offset: realized capital gains you have taken this year, and then up to a limited amount of ordinary income. The friction includes trading costs, any bid-ask spread on the replacement, the effort, and the subtle cost that harvesting lowers your basis in the replacement, which can mean a larger taxable gain down the road. Weighing the two is the judgment that separates a useful harvest from busywork.
How to do it: line up the size of the loss against your realized gains for the year and your marginal tax situation. If you have sizable short-term gains taxed at ordinary rates, offsetting them is worth more than offsetting long-term gains taxed at lower rates. If you have no gains at all, the loss can still offset up to the commonly cited $3,000 of ordinary income and then carry forward, which has value but is capped per year. A very small loss on a position with real trading costs may simply not be worth the trouble.
Worked number: the illustrative $6,000 loss looks worth harvesting if you also realized, say, $2,000 of gains this year: the loss cancels that $2,000 of gain, then $3,000 offsets ordinary income, and $1,000 carries forward. On your inputs, the companion shows how your loss splits across gains, ordinary income, and carryforward.
Watch out: do not let the tax tail wag the investment dog. Realizing a loss on a holding you would otherwise keep, only to end up in a worse replacement or in cash through a rebound, can cost more than the tax saved. The benefit has to clear both the trading friction and the risk of being out of your market.
Step 3: Sell the losing position to realize the loss
With a worthwhile loss identified, place the sale that converts it from paper to realized, because until you sell, the loss has no tax effect. This is the mechanical heart of harvesting: you are selling the specific losing lots in your taxable account so the loss lands on this year’s tax return. Selling the right lots, and only in the taxable account, is what keeps a clean plan from going sideways. If your broker lets you choose lots, select the specific high-basis lots showing the loss rather than letting a default method pick for you.
How to do it: enter a sell order for the losing lots, using specific-lot identification if your platform offers it so you realize the intended loss rather than an averaged result. Confirm the trade settles and that your broker records the realized loss with the correct holding period. Keep the confirmation, because the realized loss and its short or long character flow onto your Schedule D and the broker’s 1099-B at year end. Selling into a liquid, low-cost fund position keeps spreads small and the fill clean.
Worked number: selling the illustrative $20,000-basis lot now worth $14,000 realizes the full $6,000 loss on your return this year. On your inputs, the amount the companion shows as your harvestable loss is what this sale locks in.
Watch out: mind the wash-sale clock the moment you sell, because it is already running. The 30-day window that can void the loss starts before the sale and continues after it, so any repurchase of the same security you made in the prior 30 days, or make in the next 30, is in scope. The next two steps exist precisely to keep this sale from being undone.
Step 4: Avoid the wash-sale rule
The single rule that most often ruins a harvest is the wash-sale rule, so plan around it deliberately. It disallows your loss if you buy the same security, or one the tax code treats as substantially identical, within 30 days before or after the sale, which is a 61-day window centered on the sale date. Trip it and the loss is not deleted but deferred: the disallowed amount is added to the cost basis of the replacement shares, so you get the benefit only when you eventually sell those. The rule reaches across all your accounts, including a spouse’s accounts and even a repurchase inside your IRA, which is where careful investors get caught.
How to do it: map the window before you trade. Check that you did not buy the same security in the 30 days before your planned sale, and commit not to buy it back for at least 31 days after. Extend the check to every account you and your spouse control, including retirement accounts and automatic reinvestment, because a dividend reinvested into the same fund inside the window can itself be a wash sale. If you have automatic dividend reinvestment on the harvested holding, pause it around the sale.
Worked number: if you harvest the illustrative $6,000 loss on a fund and rebuy that same fund 10 days later, the loss is disallowed for now and instead raises your basis in the new shares by $6,000. On your inputs, the loss the companion shows only counts if you keep the repurchase outside this window.
Watch out: substantially identical is not precisely defined, and two funds tracking the very same index from the same provider can be treated as too alike. Because the line is a judgment call, confirm the current IRS guidance or ask a tax professional before choosing a replacement, rather than assuming any different ticker is automatically safe.
Step 5: Buy a replacement security to stay invested
To capture the loss without stepping out of the market, buy a suitable replacement, because sitting in cash through the 30-day window risks missing a rebound. The goal is to keep your exposure to the same asset class while holding something different enough not to count as substantially identical to what you sold. A common illustrative approach is swapping one broad index fund for another that tracks a similar but distinct index, or a comparable fund from a different provider, so your portfolio still rides the market you want while the harvested loss stays valid.
How to do it: pick the replacement in advance (from Step 2) and buy it at or near the time you sell, so you are never out of the market. Match the asset class and risk closely: a total-market fund replaced by a broad large-cap fund keeps similar exposure, while jumping to an unrelated sector changes your risk. Check the replacement’s expense ratio, its holdings overlap with the original, and how closely it tracks your intended market. Our index-fund tutorial covers choosing broad, low-cost funds that make clean, well-diversified swaps.
Worked number: after selling the illustrative losing fund lot for $14,000, you put that $14,000 straight into a comparable but distinct index fund. Your market exposure is essentially unchanged, and the $6,000 loss remains valid because the replacement is not substantially identical. On your inputs, the companion assumes you stay invested this way while the loss does its work.
Watch out: after 30 days you may switch back to the original holding if you prefer it, but weigh the trading costs and any new tax consequences of doing so. Some investors simply keep the replacement to avoid churn. Either way, do not let the replacement quietly drift your allocation, and revisit our rebalancing walkthrough if the swap nudges your mix off target.
Step 6: Offset gains, then ordinary income
With the loss realized and the wash-sale rule respected, apply the loss in the order the tax code uses, because that order determines the benefit. Realized losses first offset realized capital gains of the same type (short-term against short-term, long-term against long-term), then net across types, dollar for dollar. If losses remain after wiping out all your gains, you can generally use up to a commonly cited $3,000 per year of the leftover net loss to offset ordinary income, such as wages, with married-filing-separately often limited to half that. Confirm the current IRS limit, which can change from year to year.
How to do it: total your realized gains and losses for the year, letting the harvested loss cancel gains first. Whatever net loss is left over, apply up to the annual ordinary-income limit against your other income on your return, which your tax software or preparer handles on Schedule D and the carryover worksheet. The value of that ordinary-income offset scales with your bracket: at an illustrative 22 percent marginal rate, a $3,000 offset trims roughly $660 of tax, while a higher bracket saves more.
Worked number: the illustrative $6,000 loss first cancels $2,000 of realized gains, leaving $4,000. Of that, $3,000 offsets ordinary income this year and $1,000 carries forward. On your inputs, the companion splits your loss the same way: gains offset first, then up to the annual ordinary-income limit, then carryforward.
Watch out: the $3,000 figure is a per-year ceiling on the ordinary-income portion only, not a cap on offsetting gains, which is unlimited. Confusing the two leads people to think a large loss is wasted, when in fact it can cancel any amount of gains and then chip away at ordinary income $3,000 at a time over multiple years.
Step 7: Carry forward losses and document everything
Finish by carrying forward whatever the current year could not use and recording the whole harvest, because a loss you cannot document is a benefit you may not keep. Any net loss beyond your gains and the annual ordinary-income limit is generally carried into future years, where it again offsets gains first and then up to the annual limit of ordinary income, with no expiration for an individual under current rules. This is why one large harvested loss can keep lowering taxes for several years, but only if you track it correctly from the start.
How to do it: note the sale date, the lots sold, the realized loss and its short or long character, the replacement bought, and how much of the loss you used this year versus carried forward. Your tax return’s capital-loss carryover worksheet tracks the running balance, so keep your 1099-B and confirmations to reconcile against it. Each future year, apply the carryforward to that year’s gains first, then to ordinary income up to the limit, and record the new remaining balance.
Worked number: after using $2,000 against gains and $3,000 against ordinary income, the illustrative $1,000 that carries forward waits to offset next year’s gains or income. On your inputs, the companion shows the carryforward figure that rolls into future years.
Watch out: the failure here is losing track of the carryforward, which can leave real deductions unclaimed. Keep the records with your tax files, and remember the harvest also lowered your basis in the replacement, so a future sale of that holding may show a larger taxable gain. Because the carryforward and basis rules can change, confirm the current IRS treatment and consult a tax professional.
A worked example: harvesting a loss end to end
Put the seven steps together on one illustrative account and watch the harvest happen from start to finish. You hold a fund lot in a taxable brokerage account bought for $20,000 that a market dip has marked down to $14,000, an unrealized loss of $6,000 (Step 1). Earlier in the year you sold another holding and realized $2,000 of capital gains, so you check the math and decide the harvest is worthwhile: it can cancel that gain and then shield ordinary income (Step 2). You sell the losing lot using specific-lot identification, realizing the full $6,000 loss on this year’s return (Step 3).
The moment you sell, you respect the wash-sale window: you did not buy that fund in the prior 30 days, and you commit not to rebuy it for at least 31 days, checking your spouse’s accounts and your IRA too, and pausing dividend reinvestment on it (Step 4). To stay invested, you move the $14,000 straight into a comparable but distinct index fund that is not substantially identical, keeping your market exposure essentially unchanged (Step 5). At tax time, the $6,000 loss first cancels the $2,000 of gains, then $3,000 offsets your ordinary income, and the last $1,000 carries forward (Step 6). You log the sale, the replacement, and the $1,000 carryforward for next year (Step 7).
Where an illustrative $6,000 harvested loss goes
A $6,000 realized loss against $2,000 of gains, with a commonly cited $3,000 annual ordinary-income limit. Bar width scales to dollars, against the $6,000 loss as the maximum. Illustrative arithmetic, not tax advice or a projection.
The loss cancels all $2,000 of gains, uses the full $3,000 ordinary-income allowance, and carries the remaining $1,000 forward. The $3,000 limit and its treatment can change, so confirm the current IRS figure; the amounts are illustrative and assume this single scenario, which real tax years will not match exactly.
You can run your own basis, current value, and realized gains in the companion below or in our calculator to see how a different loss would split.
Where the tax benefit actually comes from
It helps to see a harvested loss as one pool split into three uses, because that split is the whole benefit of the exercise. Take the illustrative $6,000 loss: about a third cancels realized gains, half offsets ordinary income up to the annual limit, and the remaining sliver carries forward. The proportions shift with your own gains and the annual limit, but the structure, gains first, then capped ordinary income, then carryforward, is fixed by the tax code.
An illustrative $6,000 loss, split by how it is used
The same $6,000 harvest as the worked example, shown as shares of the whole. Segments sum to 100.
Because offsetting gains is unlimited but the ordinary-income offset is capped, a large loss with few gains spends most of its value slowly through the annual limit and the carryforward. The shares are an illustrative example tied to this scenario, not a rule about how any real loss will divide, and the annual limit can change.
The lesson of that stackbar is why patience matters with a big harvest. Gains offsetting is uncapped, so a loss meets its match instantly against any gains you took, but the ordinary-income portion is rationed to a set amount per year, which means a large leftover loss delivers its benefit gradually across several returns. On your inputs, the companion shows how much of your own loss lands on gains, how much on income this year, and how much waits in the carryforward.
The wash-sale rule in plain words
Because the wash-sale rule is where most harvests go wrong, it is worth restating in plain language rather than tax jargon. The rule says: if you sell a security at a loss and, within 30 days before or after that sale, you buy the same security or one that is substantially identical, the loss is disallowed for that year. The window is 61 days in total, 30 before the sale, the sale day itself, and 30 after, so both a recent purchase and a quick repurchase can trip it. The disallowed loss is not gone; it attaches to the cost basis of the replacement shares, so you recover the benefit when you later sell those.
Three details catch people. First, the rule spans all your accounts, so buying the security back in a different brokerage, in your IRA, or in a spouse’s account still triggers it. Second, automatic dividend reinvestment counts as a purchase, so a reinvested dividend into the harvested fund inside the window can be a partial wash sale, which is why pausing reinvestment around the sale is prudent. Third, substantially identical is deliberately vague: a different fund tracking the exact same index from the same provider may be treated as too alike, while a broadly comparable fund tracking a different index usually is not, though this is a judgment area.
The practical defense is simple. Choose a replacement that keeps your exposure but is clearly not identical, keep the harvested security out of every account you control for at least 31 days, and pause automatic reinvestment on it during the window. Because the boundaries are not perfectly bright, confirm the current IRS rules or ask a tax professional whenever a swap feels close to the line.
Common mistakes in tax-loss harvesting
A handful of errors show up again and again, and knowing them in advance is cheaper than learning them from a disallowed loss or a missed rebound:
- Triggering a wash sale. Rebuying the same or a substantially identical security within 30 days before or after the sale, in any account including an IRA or a spouse’s, disallows the loss and defers it into the replacement’s basis. Wait at least 31 days on the identical security, and pause dividend reinvestment on it.
- Harvesting in the wrong account. Selling at a loss inside an IRA or 401(k) produces no deduction, because those accounts are not taxed year to year. Tax-loss harvesting only works in a taxable brokerage account.
- Sitting in cash during the window. Selling without a replacement lined up leaves you out of the market for up to 30 days, and a rebound in that gap can cost far more than the tax saved. Buy a suitable replacement at the time you sell.
- Overvaluing the $3,000 offset. The commonly cited $3,000 limit applies only to offsetting ordinary income; offsetting gains is unlimited. Treating $3,000 as the total benefit understates a harvest that cancels large gains.
- Ignoring the lower replacement basis. Harvesting lowers your cost basis in the replacement, so a future sale can show a larger taxable gain. The benefit is partly a deferral, not always a permanent saving, especially if you sell the replacement soon.
- Chasing tiny losses. Harvesting a small loss on a position with real trading costs can be motion without meaning. Weigh the tax benefit against the friction before selling.
Every one of these is a process failure rather than a bad holding, which is the theme worth carrying out of this ledger note: harvesting works when it runs on the rules, the right account, and a replacement chosen in advance, and it fails on impulse or a missed detail.
Troubleshooting your tax-loss harvest
What if I have no capital gains to offset this year? The harvest still has value. With no gains to cancel, your net loss goes straight to offsetting ordinary income up to the commonly cited annual limit, and anything beyond that carries forward to future years. So even in a year with no realized gains, a harvested loss can shield some ordinary income now and wait to offset gains or income later. Confirm the current annual limit, which can change.
What if I accidentally triggered a wash sale? The loss is not lost, only deferred. The disallowed amount is added to the cost basis of the shares you repurchased, so you recover the benefit when you eventually sell those shares, and the holding period may be adjusted too. Your broker generally flags wash sales on the 1099-B, but confirm the basis adjustment is recorded correctly, and take a complicated case to a tax professional.
What if my replacement fund is very similar to the one I sold? Similarity is fine as long as it is not substantially identical, and the classic illustrative move is swapping funds that track different but comparable indexes. The risk zone is two funds tracking the exact same index, especially from the same provider, which can be treated as too alike. Because the line is a judgment call, confirm the current IRS guidance or ask a professional before a close swap.
What if I want to hold the original security again? You can return to it after the 30-day window closes, at least 31 days past the sale, without disturbing the harvested loss. Weigh the trading costs and any new tax consequences of switching back, since some investors simply keep the replacement to avoid churn. If the round trip nudges your allocation, check it against your target as in our rebalancing note.
What if the loss is larger than I can use this year? That is normal and not a problem. The loss offsets all your gains first with no cap, then up to the annual limit of ordinary income, and the rest carries forward indefinitely under current rules for an individual. Keep records of the carryforward so future returns claim it correctly.
Your tax-loss harvesting checklist
Save this and work down it each time you harvest:
- Confirm the losing position is in a taxable account, not an IRA or 401(k), and note its cost basis and holding period (Step 1).
- Check the loss against your realized gains and bracket to confirm the benefit beats the trading friction (Step 2).
- Sell the specific losing lots using specific-lot identification, and keep the confirmation (Step 3).
- Map the wash-sale window: no repurchase of the same or substantially identical security within 30 days before or after, in any account, and pause dividend reinvestment on it (Step 4).
- Buy a suitable, non-identical replacement at the time you sell so you stay invested (Step 5).
- Apply the loss to gains first, then up to the annual limit of ordinary income (Step 6).
- Record the sale, the replacement, and any carryforward, and confirm the current IRS limits with a tax professional before filing (Step 7).
The bottom line
Tax-loss harvesting is less about a clever trade and more about a handful of deliberate steps done in the right account and the right order: find the losses worth taking, confirm the benefit clears the friction, sell to realize the loss, respect the wash-sale window, buy a replacement so you stay invested, apply the loss to gains and then to ordinary income up to the annual limit, and carry forward the rest. The discipline rewards the investor who plans the replacement in advance and treats the wash-sale rule as the tripwire it is, because a loss disallowed by a careless repurchase helps no one this year. On your inputs, the companion shows an illustrative harvestable loss, how much offsets your gains, how much offsets ordinary income, and what carries forward, so you can see the shape of the benefit before you act. The investors who get the most from harvesting are rarely the ones chasing every tiny dip; they are the ones who harvest real losses against real gains, stay invested through a clean swap, and keep good records. Run your own numbers in the companion or our calculator, read our note on dividend taxes and rebalancing walkthrough for the rest of the taxable-account picture, and confirm the current IRS rules with a qualified tax professional before you trade.
Dividora writes for readers who would rather understand the machine than be handed a hot tip, and this ledger note is exactly that: general information and education, not financial, tax, or investment advice, and not a recommendation about any security, fund, account, or transaction. Every dollar figure, percentage, and split above is an illustrative planning device rather than a forecast or a promise of tax savings; the $6,000 loss, the $2,000 of gains, and the $3,000 ordinary-income offset are one arbitrary scenario chosen to show the arithmetic, not your numbers. Tax limits, the wash-sale definition, the substantially-identical test, and the carryforward treatment are set by the IRS and can change, so confirm the current rules rather than relying on any figure here. Whether harvesting helps you, which lots to sell, what replacement is safe, and how a loss applies to your return depend on your full tax picture, and harvesting also lowers your basis in the replacement, which can raise a future taxable gain. Before you sell, swap, or claim a loss with real money, take your specific holdings, accounts, and tax situation to a qualified tax or financial professional who can weigh them against your circumstances.
Frequently asked questions
What is tax-loss harvesting?
Tax-loss harvesting is the practice of selling an investment that has dropped below what you paid for it, on purpose, so the realized loss can offset taxable gains and a limited amount of ordinary income. It only works inside a taxable brokerage account, because losses inside a tax-advantaged account like an IRA or 401(k) have no tax effect. The point is not to lock in a permanent loss but to stay invested while turning a paper decline into a real tax benefit, usually by replacing the sold holding with a similar but not identical one. Done carefully, it lowers your tax bill without changing your overall market exposure much. Everything here is illustrative and general information, not advice for your situation.
What is the wash-sale rule?
The wash-sale rule disallows the tax loss if you buy the same security, or one the tax rules treat as substantially identical, within 30 days before or after the sale that created the loss. That makes a 61-day window centered on the sale date in which the repurchase would void the harvest. When a wash sale is triggered, the disallowed loss is not lost forever; it is added to the cost basis of the replacement shares, deferring the benefit rather than erasing it. The rule also reaches across your accounts, including a spouse's accounts and a repurchase inside an IRA, which surprises many people. Because the definition of substantially identical is not always obvious, confirm the current IRS rules or ask a tax professional before you trade.
How much can tax-loss harvesting save on taxes?
The benefit has two parts. First, realized losses offset realized capital gains dollar for dollar, so a harvested loss can wipe out the tax on gains you took elsewhere that year. Second, if losses exceed gains, you can generally use up to a commonly cited $3,000 of the remaining net loss to offset ordinary income each year, with any excess carried forward to future years; confirm the current IRS limit, which can change. The actual dollars saved depend on your tax rates, so a $3,000 ordinary-income offset is worth more to someone in a higher bracket than a lower one. None of these figures are a promise of savings, and the exact result turns on your full tax picture. Treat every number here as illustrative and check it against current rules.
Can you buy back the same stock after selling it for a loss?
You can, but not within the wash-sale window without losing the deduction. If you sell a holding for a loss and rebuy the same security, or one that is substantially identical, within 30 days before or after the sale, the wash-sale rule disallows the loss for that year. To stay invested while keeping the harvest valid, many investors buy a similar but not identical replacement, such as a different fund that tracks a comparable but distinct index, then wait out the 30-day window before returning to the original if they wish. Waiting at least 31 days after the sale before repurchasing the identical security is the simplest way to avoid the problem. Because what counts as substantially identical is a judgment call, confirm current rules with a tax professional.
Does tax-loss harvesting work in a retirement account?
No. Selling at a loss inside a traditional IRA, Roth IRA, or 401(k) produces no deductible loss, because gains and losses inside those accounts are not taxed year to year. Tax-loss harvesting only has an effect in a taxable brokerage account, where sales are reported on your return. Worse, the wash-sale rule can reach into a retirement account: if you harvest a loss in your taxable account and buy the same security in your IRA within the window, the loss can be disallowed. That cross-account trap catches investors who hold the same fund in both places. Keep the harvest and any replacement buying within the taxable account, and confirm the current rules if you hold overlapping funds.
What makes a good replacement security after harvesting a loss?
A good replacement keeps your market exposure roughly the same while being different enough not to count as substantially identical to what you sold. A common illustrative approach is swapping one broad index fund for another that tracks a similar but distinct index, or a fund from a different provider covering the same asset class, so you stay invested in the market you want without repurchasing the exact holding. The goal is to avoid sitting in cash during the 30-day window, which exposes you to missing a rebound. Watch for differences in expense ratio, holdings overlap, and how closely the replacement tracks your target market. Because the substantially identical test is not precisely defined, confirm the current IRS guidance or ask a tax professional before choosing a swap.
Do harvested losses expire, or can you carry them forward?
Net capital losses that exceed your gains and the annual ordinary-income limit are generally carried forward to future tax years rather than lost. In a later year, a carried-forward loss first offsets that year's capital gains, then can offset up to the commonly cited annual limit of ordinary income again, and any remainder continues to carry forward. There is generally no expiration on the carryforward for an individual during their lifetime, though rules and limits can change, so confirm the current IRS treatment. This is why a large harvested loss in one year keeps delivering value across several later years. The carryforward is tracked on your tax return, so keep records of the original loss and how much you use each year.
When does tax-loss harvesting not make sense?
It adds little or nothing when you have no taxable gains to offset and little ordinary income to shield, when the loss is tiny relative to the trading costs and effort, or when the position is inside a tax-advantaged account where losses do not count. It can also backfire if harvesting forces you into cash or a poor replacement and you miss a market rebound, or if repurchasing too soon triggers the wash-sale rule and defers the benefit anyway. There is also a subtle cost: harvesting lowers your cost basis in the replacement, which can mean a larger taxable gain later. Because whether it is worthwhile depends on your gains, bracket, and time horizon, treat the decision as a personal one and take it to a qualified tax professional.
Find a fiduciary financial advisor
Tell us about your portfolio and what you want it to do. We will connect you with fiduciary advisors who work in your interest.