We use privacy-friendly analytics to learn which calculators help, and nothing loads until you agree. Read our privacy policy.
Investment
How to turn an investment loss into a tax saving — selling losers strategically to offset gains, without breaking the wash-sale rule.
By FreeCalculators Editorial · Published 2026-08-21 · Updated 2026-08-21 · 9 min read · 1,930 words
A losing investment feels like pure waste, but in a taxable account it has one redeeming feature: the loss is worth real money at tax time. Tax-loss harvesting is the practice of selling an investment that is down, using that loss to cancel out taxable gains elsewhere, and immediately reinvesting so your portfolio barely changes. Done right, you keep your allocation and pocket a tax saving.
Say you sold a winning stock earlier this year and owe tax on a $5,000 gain. Elsewhere in your account, another fund is down $4,000. Sell the loser and you have a $4,000 loss that offsets most of the gain — you now owe tax on only $1,000. If your losses exceed your gains, you can use up to $3,000 of the excess against ordinary income each year, and carry the rest forward to future years.
A simple harvest
Realised gain earlier this year: +$5,000 Harvested loss from a down fund: -$4,000 Net taxable gain: $1,000 Tax saved at a 15% gains rate: about $600
The IRS will not let you sell at a loss and buy the same thing straight back. The wash-sale rule disallows the loss if you buy a 'substantially identical' security within 30 days before or after the sale. The way around it is to reinvest in something similar but not identical — sell one total-market index fund and buy another that tracks a different index. You stay invested and keep the loss.
The saving is real but modest, and it is a deferral, not magic — harvesting lowers your cost basis, which can mean a slightly larger gain when you eventually sell. The value is the time-value of the tax you did not pay this year, plus the $3,000 annual offset against ordinary income. For hands-off investors the benefit is small; for those with large taxable accounts and regular gains, it is one of the few reliable free lunches in investing.
Tax-Loss Harvesting Explained is a investing concept that comes up when you are making decisions about money. Understanding how it works — not just the definition, but the actual numbers behind it — is the difference between a decision that holds up over time and one that looks right today but falls apart when your circumstances change. The core idea is that financial outcomes are determined by a few key variables interacting in ways that are not always intuitive. Compound growth, tax treatment, inflation, and timing all interact, and small differences in any of them can produce large differences in the outcome over years or decades.
The practical version of this concept is simpler than the theoretical one. You do not need to understand every formula — you need to know which inputs matter, what a realistic range for each one is, and how sensitive the outcome is to changes in those inputs. That is what this article gives you: the variables, the ranges, and the sensitivity, so you can plug in your own numbers and get an answer that reflects your actual situation rather than a textbook example.
The arithmetic behind tax-loss harvesting comes down to a few moving parts. First, identify the key variables: these are typically an amount (a dollar figure), a rate (a percentage like a return rate, interest rate, or tax rate), and a time horizon (years or months). The interaction of these three — how a rate compounds over time on a given principal — is what produces the final number. The formulas themselves are standard financial arithmetic; the value is in knowing which formula applies to your situation and what realistic inputs look like.
A useful exercise is to run the calculation with three sets of inputs: a best case, a worst case, and a most likely case. The spread between best and worst tells you how much uncertainty you are dealing with. If the worst case is tolerable — you can live with the outcome even if things go badly — then the decision is safe to make. If the worst case is a disaster, you need either to reduce the size of the bet (save more, borrow less, insure more) or to find a way to shift the risk (diversify, hedge, or buy insurance). This framework — best case, worst case, most likely — works for nearly every financial decision and is more useful than a single point estimate.
For tax-loss harvesting, the main variables and their typical ranges are as follows. Amounts — whether income, savings, debt, or investment principal — should use your actual figures, not estimates. Pull them from your pay stubs, bank statements, or account dashboards. Rates — return rates, interest rates, inflation, tax brackets — should use realistic long-term expectations, not best-year figures. A 6% investment return is more realistic than 10% for planning purposes, because markets have long flat stretches that pull the average down. Time horizons should reflect your actual timeline, not an idealized one: if you might need the money in 5 years, use 5, not 30.
The most common mistake with tax-loss harvesting is using optimistic assumptions. People plan for 10% investment returns and 2% inflation, when 6% and 3% are more realistic. Over 30 years, the difference between 10% and 6% returns is not 4% — it is the difference between having $1.7 million and $570,000 on a $100 monthly contribution. Optimism in financial planning does not produce a plan; it produces a shortfall.
The practical application of tax-loss harvesting is straightforward once you have the numbers. Start with your actual figures — income, savings, debt, rates, and timeline. Run the calculation at your most likely inputs. Then change one variable at a time to see which factor has the largest impact on the outcome. The variable that moves the needle the most is the one worth optimizing — not the one you read about most often. In personal finance, the highest-leverage variable is usually the savings rate, because it affects both the accumulation phase (more principal) and the withdrawal phase (lower expenses). In investing, it is the return assumption, because small differences compound over decades. In debt management, it is the interest rate, because it determines how much of each payment goes to principal versus interest.
The second step is to stress-test the decision. If the outcome changes dramatically when you change one input — say, a 1% change in return rate produces a 40% change in the final balance — then that input is your risk variable. You can reduce the risk by being more conservative on that input, by diversifying the source of that input (e.g., across asset classes), or by buying insurance to cap the downside. If the outcome is relatively insensitive to all inputs, the decision is low-risk and you can proceed with confidence.
Tax-Loss Harvesting Explained is not about memorizing formulas or following rules of thumb — it is about understanding which variables matter, plugging in your real numbers, and seeing the result. The arithmetic is exact; the uncertainty is in your inputs. Use conservative assumptions, stress-test the decision by varying the inputs, and focus your energy on the variable that has the largest impact on the outcome. That is the entire framework, and it works for nearly every financial decision you will make. The calculators on this site exist to do the arithmetic for you — all you need to provide is honest inputs.
Comprehensive Guide
Read our investing guide for stocks, bonds, ETFs, and portfolio strategy.
Try the calculatorWas this page helpful?
How this guide was created
This guide was written and reviewed by FreeCalculators Editorial, drawing on published formulas, official government sources, and real calculator outputs from our 4 calculators in this category. Every claim is sourced; every formula is auditable. Read our review policy.