S&P 500 7,431.46 ▲ 0.5%Dow Jones 51,202.26 ▲ 0.7%Nasdaq 25,888.84 ▲ 0.31%BTC $64,320 ▲ 0.8%ETH $1,670 ▼ 0.2%EUR/USD 1.1567Inflation 4.2% YoYLive market data
Advanced Learning Academy crestA Division ofAdvanced Learning Academy

Tax-Loss Harvesting: How to Turn Losses Into Tax Savings

A paper loss in a taxable account is not just a bruise. Here is how to turn it into a real, spendable cut to your tax bill without breaking the rules.
Tax-Loss Harvesting: How to Turn Losses Into Tax Savings

Key takeaways

Almost nobody buys an investment hoping it will fall. But some of yours will, at least for a while, and that is normal. The market does not move in a straight line, and any portfolio held long enough will hold a few positions that are worth less than you paid. Here is the part most people never learn: a paper loss is not just a bruise. If it sits inside a regular taxable brokerage account, it can be turned into a real, spendable reduction in your tax bill. That move has a name. It is called tax-loss harvesting, and once you understand it, you will never look at a red number on your statement quite the same way again.

The idea is simple even if the rules around it are fussy. You sell something that has dropped below your purchase price, you lock in that loss on paper for tax purposes, and the IRS lets you use that loss to cancel out gains you made elsewhere. If your losses are bigger than your gains, you can even shave a chunk off your ordinary income. Done carefully, you stay invested the whole time, your long-term plan barely changes, and you hand less money to the government in April. Done carelessly, you trip over a rule called the wash sale and get nothing. This guide walks through all of it, with real dollar examples and honest warnings about when the whole exercise is not worth your time.

What tax-loss harvesting actually is

Tax-loss harvesting is the practice of selling an investment that has lost value so you can claim a capital loss on your tax return. The loss is only "realized" once you sell. Until then it is an unrealized loss, a number on a screen that the IRS does not care about. The moment you sell, that loss becomes official, and official losses are useful. They offset capital gains dollar for dollar, and beyond that they can offset a limited amount of your regular paycheck income.

Think of it as a coupon you generate by selling a loser. The coupon does not disappear if you cannot use all of it this year. It carries forward into future years until it is fully spent. That is what makes harvesting so powerful for patient investors. You are not betting that the investment will keep falling. In most cases you immediately buy something very similar so you stay in the market. You are simply choosing the moment to recognize a loss you already have, because that moment is worth money at tax time.

One thing to be clear about up front: this only matters in a taxable account. That is a standard brokerage account where you owe tax on gains and dividends each year. Inside a 401(k), a traditional IRA, a Roth IRA, or an HSA, there are no taxable gains or losses to harvest in the first place, so the entire strategy is irrelevant there. We will come back to this, because it is the single most common reason people waste effort trying to harvest where it does nothing.

How gains and losses net against each other

To see why a loss is worth anything, you have to understand how the IRS adds up your capital gains and losses at the end of the year. It is a tidy little tournament with brackets. First, your investments are sorted into two buckets based on how long you held them. Anything you owned for more than one year produces a long-term gain or loss. Anything you held for one year or less produces a short-term gain or loss. This split matters a lot, because long-term gains are taxed at gentle rates of 0, 15, or 20 percent for most people, while short-term gains are taxed as ordinary income at your regular bracket, which can run much higher.

Inside each bucket, gains and losses cancel out first. Your short-term losses knock out your short-term gains. Your long-term losses knock out your long-term gains. If you still have a leftover loss in one bucket and a leftover gain in the other, the two buckets then net against each other. Only after all of that shakes out do you arrive at a single number: either a net capital gain you owe tax on, or a net capital loss you get to use.

Here is a worked example. Say during the year you took a $4,000 short-term gain flipping a stock you held for eight months, and a $1,000 long-term gain on a fund you held for three years. You also harvested a $3,000 short-term loss and a $2,500 long-term loss. The short-term side nets to a $1,000 gain ($4,000 minus $3,000). The long-term side nets to a $1,500 loss ($1,000 gain minus $2,500 loss). Then the two buckets meet: the $1,500 long-term loss wipes out the $1,000 short-term gain, leaving you with a net capital loss of $500 for the year. You owe zero capital gains tax, and you still have a $500 loss to put to work against your ordinary income.

The $3,000 rule and the carryforward that never expires

When your total losses for the year exceed your total gains, you are left with a net capital loss. The tax code lets you deduct up to $3,000 of that net loss against your ordinary income each year. Ordinary income means your wages, your salary, your freelance earnings, the interest from your savings account. Knocking $3,000 off that income is genuinely valuable, because ordinary income is taxed at your full marginal rate. If you are in the 24 percent federal bracket, a $3,000 deduction puts $720 back in your pocket. The $3,000 cap is per tax return, so married couples filing jointly share one $3,000 limit, not two. If you are married filing separately, the cap drops to $1,500 each.

Now for the best part. What happens to losses above that $3,000? They do not vanish. They roll forward to next year, and the year after, and as far into the future as you need. There is no expiration date on a capital loss carryforward while you are alive. Suppose a rough market year leaves you with a $20,000 net capital loss. You deduct $3,000 this year. The remaining $17,000 carries over. Next year you might use $5,000 of it to cancel a gain when you sell an appreciated stock, then deduct another $3,000 against income, and so on, until the whole $20,000 is gone. You banked a tax asset that quietly works for you for years.

There is one caveat worth stating plainly. A capital loss carryforward does not transfer to your heirs in most cases. Any unused loss generally dies with the taxpayer. That is a reason not to hoard an enormous loss carryforward for decades without ever using it against real gains. For the vast majority of people, though, the carryforward is simply a generous safety net that smooths your taxes across good years and bad.

The wash-sale rule: the 30-day trap

If harvesting losses were as easy as selling and instantly rebuying the same thing, everyone would do it on every dip and the IRS would collect nothing. So there is a guardrail called the wash-sale rule, and it is the single most important thing to understand before you start. The rule says you cannot claim a loss if you buy the same or a "substantially identical" security within 30 days before or after the sale. That is a 61-day window in total: 30 days on each side of the sale plus the day of the sale itself.

Break the rule and the loss is not gone forever, but it is disallowed for now. The disallowed loss gets added to the cost basis of the new shares you bought, which means you recover the tax benefit later when you eventually sell those replacement shares. Still, the point of harvesting is usually to capture the loss this year, and a wash sale defeats that. The rule also reaches into your other accounts. If you sell a fund at a loss in your taxable brokerage and your IRA buys the same fund within the window, that triggers a wash sale too, and in the IRA case the loss can be permanently lost. Automatic dividend reinvestment is a sneaky way people accidentally trigger it, because a reinvested dividend counts as a purchase.

The good news is that the rule only blocks "substantially identical" securities, and that phrase leaves you plenty of room. The classic approach is to sell one broad fund at a loss and immediately buy a different fund that tracks a different index but gives you nearly the same market exposure. For example, an investor might sell an S&P 500 index fund at a loss and buy a total US stock market fund, or swap one provider's large-cap fund for another provider's. The IRS has never said two funds tracking different indexes are substantially identical, so this keeps you invested while sidestepping the wash-sale problem. After 31 days, if you really want the original fund back, you can switch back.

A full worked example, start to finish

Numbers make this concrete. Imagine Maria has a taxable brokerage account. Early in 2026 she put $30,000 into a broad international stock fund. By autumn, a rough stretch overseas has pushed it down to $24,000. That is a $6,000 unrealized loss sitting in her account. Separately, earlier in the year she sold some company stock and booked a $6,000 long-term capital gain, the kind she would normally owe tax on.

Maria decides to harvest. She sells the international fund, realizing the $6,000 loss. The same day, to stay invested, she buys a different international fund that tracks a different index but covers nearly the same set of foreign companies. Her money never leaves the market for foreign stocks. Now at tax time, her $6,000 harvested loss exactly cancels her $6,000 gain. The capital gains tax she would have paid, which at a 15 percent long-term rate would have been $900, drops to zero. She kept that $900 and barely changed her portfolio.

Change the story slightly. Suppose Maria had no gains to offset this year. Her $6,000 loss still does work. She deducts $3,000 against her ordinary income this year, saving roughly $720 if she is in the 24 percent bracket. The other $3,000 carries forward to 2027, ready to cancel a future gain or take another $3,000 bite out of next year's income. Either way, a position that fell in value handed her real tax savings, and she never abandoned her investment plan.

Deferring tax versus erasing it: the cost-basis catch

This is the part the cheerleaders gloss over, and it deserves an honest paragraph. Tax-loss harvesting usually defers tax rather than erasing it. When you sell the replacement fund and rebuy in, your new shares have a lower cost basis, because you bought back in at the depressed price. A lower basis means a larger taxable gain whenever you eventually sell down the road. So the loss you harvested today can come back as a bigger gain tomorrow.

That does not make harvesting pointless. Far from it. Deferral itself has real value, because a dollar of tax you pay years from now costs you less than a dollar you pay today, and the money you did not send to the IRS stays invested and compounding in the meantime. The benefit is even better in three specific situations. First, if you use the loss against short-term gains taxed at high ordinary rates but later realize the offsetting gain at the lower long-term rate, you have converted expensive tax into cheap tax. Second, if your future self lands in a lower tax bracket, perhaps in retirement, the deferred gain is taxed more gently. Third, and most powerful, is the step-up in basis at death. Under current law, when you die, your heirs inherit your investments at their market value on that date, which erases the built-up gain entirely. An investor who harvests losses across a lifetime and never sells the appreciated replacements can turn lifelong deferral into permanent savings. For most people the realistic framing is this: harvesting is a very good deal, but understand you are usually borrowing tax savings from the future, not getting them for free.

When harvesting is worth it, and when it is a waste

Harvesting is not always smart. There are clear cases where it earns you little or nothing, and chasing it anyway just adds cost and clutter to your life.

The first dead zone is tax-advantaged accounts. There are no taxable events inside a 401(k), traditional IRA, Roth IRA, or HSA, so there is nothing to harvest. If all your investing happens inside retirement accounts, this entire strategy does not apply to you, full stop.

The second is the 0 percent long-term capital gains bracket. If your taxable income is low enough that your long-term gains are already taxed at 0 percent, harvesting a long-term loss to offset those gains saves you nothing, because you owed nothing on the gain anyway. You would just be lowering your future basis for no benefit and possibly creating a future tax bill. In a low bracket, the related move of tax-gain harvesting, where you deliberately realize gains at 0 percent to reset your basis higher, is often the smarter play.

The third is when the dollar amounts are tiny. A $40 loss is real, but the time, the transaction tracking, and the risk of fumbling the wash-sale rule may not be worth $10 of tax savings. Harvesting shines when you have meaningful losses, meaningful gains to offset, and a high enough tax rate that the offset matters. It also shines in volatile years, which is exactly when red numbers are plentiful. Finally, never let the tax tail wag the investment dog. Do not sell a position you believe in purely for a harvest if the only replacement available drifts you away from the allocation you actually want.

How robo-advisors automate the whole thing

If reading the wash-sale section made your eyes cross, you are not alone, and this is exactly the problem that automated investing services set out to solve. Many robo-advisors offer automatic tax-loss harvesting as a built-in feature. Their software watches your taxable account continuously, and when a holding drops below its purchase price by enough to be worth harvesting, it sells, books the loss, and instantly buys a carefully chosen alternative fund that keeps your target allocation intact without tripping the wash-sale rule. It can do this far more often than a human would bother to, sometimes capturing small losses during ordinary market wobbles that you would never act on by hand.

This is genuinely useful, and for many people it is the easiest way to capture the benefit without studying the rulebook. But keep your expectations grounded. The value of automated harvesting is real yet modest for most investors, and it is largest for people in high tax brackets with large taxable balances and frequent gains to offset. It does almost nothing if your money is mostly in retirement accounts or if you are in a low bracket. Robo-advisors also charge an annual fee, often around a quarter of a percent of your balance, so weigh that ongoing cost against the tax savings you realistically expect. Automation is a convenience and a discipline, not a money machine.

Practical rules to harvest without tripping

If you decide to harvest on your own, a short checklist keeps you out of trouble. Turn off automatic dividend reinvestment in any fund you plan to harvest, so a stray reinvested dividend does not create a wash sale. Keep a written list of what you sold and when, so you can count the 61-day window correctly. Pick your replacement fund in advance, one that tracks a different index but gives similar exposure, so you are never out of the market. Watch all your accounts together, including a spouse's accounts and your IRAs, because the wash-sale rule does not respect account boundaries. And mind the holding-period clock if you switch back, because rebuying the original too soon can undo your work.

Most importantly, treat harvesting as a tidy-up you do alongside your real plan, not the plan itself. The goal of investing is to own good assets for a long time. Tax-loss harvesting is just a way to be a little smarter with the inevitable down years, so the tax code works a bit more in your favor. If you keep a high-yield cash buffer in something like a high-yield savings account and let your taxable investments ride, the occasional well-timed harvest is the quiet bonus that turns a bad market moment into a small, lasting win. This is educational information rather than personalized advice, and a tax professional can confirm how these rules apply to your own return before you act.

Before you invest another dollar

Most investors cannot pass a basic money test. Can you?

The market charges tuition for every gap in your knowledge. The Financial IQ Test measures what you actually know across investing, banking, credit, and retirement, then shows you exactly which gaps to close before they get expensive.

Test your Financial IQ
The Financial IQ Test is built by our parent company, Advanced Learning Academy. Same family, same standards.

Questions people ask

How much capital loss can I deduct against my income in a year?

If your total capital losses exceed your total capital gains, you can deduct up to $3,000 of the net loss against ordinary income each year, or $1,500 if you are married filing separately. The $3,000 cap is per tax return, so married couples filing jointly share one limit. Any loss above $3,000 carries forward to future years.

What is the wash-sale rule in plain English?

It says you cannot claim a tax loss if you buy the same or a substantially identical security within 30 days before or 30 days after the sale. That creates a 61-day window to watch. If you trip it, the loss is disallowed for now and added to the cost basis of your replacement shares instead.

Can I harvest losses inside my 401(k) or IRA?

No. Retirement accounts like 401(k)s, traditional IRAs, Roth IRAs, and HSAs do not generate taxable capital gains or losses each year, so there is nothing to harvest. Tax-loss harvesting only works in a standard taxable brokerage account.

Does a capital loss carryforward ever expire?

Not during your lifetime. Unused capital losses carry forward indefinitely, letting you offset future gains and deduct $3,000 against income year after year until the loss is used up. In most cases, however, any remaining carryforward does not pass to your heirs and is lost at death.

Does tax-loss harvesting actually save money or just delay tax?

For most people it defers tax rather than erasing it, because rebuying at a lower price sets a lower cost basis and a larger future gain. Deferral still has real value, and the benefit becomes permanent if you convert short-term tax into long-term tax, retire into a lower bracket, or pass assets to heirs who get a step-up in basis at death.

How do robo-advisors handle tax-loss harvesting?

Many automated investing services scan your taxable account continuously and harvest losses for you, instantly swapping into a similar fund that keeps your allocation intact without triggering the wash-sale rule. The benefit is real but largest for high earners with big taxable balances, and you should weigh it against the advisor's annual fee.

Sources: IRS Topic No. 409, Capital Gains and Losses · IRS Topic No. 425, Determining the loss limit and carryover · IRS Publication 550, Investment Income and Expenses (wash sales) · IRS Schedule D (Form 1040), Capital Gains and Losses · SEC Investor.gov: Tax-loss harvesting and capital gains
Just so you know: DollarFlourish is an educational publisher, not a financial, tax, or investment advisor. Numbers and rates change. Verify anything important with a licensed professional before acting on it. Some links on this site may earn us a commission at no cost to you. See how we review.

Keep reading

The Flourish Letter

One smart money idea each week, charts included. Join free and get the printable 2026 Money Calendar in your welcome email.