Tax-loss harvesting can turn an investment loss into a potential tax-planning opportunity without abandoning your long-term portfolio strategy. This guide explains how to identify eligible losses, estimate their possible tax effect, avoid wash-sale problems, compare replacement investments, and decide when selling is or is not worthwhile.
Overview
Tax-loss harvesting is the deliberate sale of an investment in a taxable brokerage account for less than its tax basis. The realized loss may then be used to offset realized capital gains, subject to applicable tax rules. If losses exceed gains, some rules may permit a limited amount of the remaining loss to offset other income, with additional losses carried forward. The exact treatment depends on your tax situation and the rules in effect for the relevant tax year.
The strategy is not a reason to sell an investment solely because its price fell. A sale can create trading costs, change your portfolio exposure, interrupt an investment thesis, or cause you to miss a rebound. The central question is whether the potential tax benefit is worth the operational and investment consequences.
Tax-loss harvesting generally applies to taxable accounts, not to assets held inside tax-deferred or tax-free retirement accounts in the same way. A transaction in an IRA can also create complications if you sell a security at a loss in a taxable account and repurchase it in an IRA. Review the current rules before acting, particularly when multiple accounts, spouses, or automated investment services are involved.
For broader portfolio decisions, pair this process with an investment policy statement, such as the framework in How to Build an Investment Policy Statement. A tax benefit should support your allocation plan rather than replace it.
How to estimate
Use a simple worksheet for each tax lot. Record the security, purchase date, number of shares, adjusted cost basis, current sale proceeds, unrealized gain or loss, and whether the lot is short-term or long-term under the tax rules that apply to you.
- Identify realized gains. List gains already created by sales during the tax year, separating short-term and long-term transactions when your records do so.
- Find eligible losses. Review taxable holdings that are below their adjusted cost basis. Compare lots individually rather than relying only on the total position value.
- Estimate the loss. A basic estimate is: sale proceeds minus adjusted basis, less any relevant transaction costs. A negative result is the realized loss.
- Net gains and losses. Apply the loss against gains according to the tax treatment applicable to your filing situation. Do not assume every loss produces an immediate refund.
- Estimate the marginal tax effect. Multiply the amount expected to reduce taxable income by an appropriate marginal tax rate. This is only an estimate; capital-gains treatment, state taxes, income thresholds, deductions, and other items can change the result.
- Subtract implementation costs. Include commissions if any, bid-ask spreads, fund expenses, market movement during the replacement trade, and the value of time spent documenting the transaction.
A practical decision formula is:
Estimated net value = estimated tax benefit − trading and administrative costs − value of investment risks created by the sale.
This formula is not a tax return calculation. It is a screening tool to help determine whether a transaction deserves closer review.
Inputs and assumptions
Adjusted basis and tax lots
Your brokerage statement may show cost basis, but verify whether it reflects reinvested dividends, corporate actions, prior transfers, and any lots purchased at different times. Choosing specific lots can produce a different result from using an average or default disposal method. Keep confirmations and year-end tax documents with your records.
Short-term versus long-term results
The holding period can affect how a gain or loss is classified. A loss that offsets a gain with the same classification may have a different practical value from a loss used against another type of gain. Review the lot dates and do not rely on memory, especially near year-end.
The wash-sale rule
The wash-sale rule can defer recognition of a loss when you sell an investment and acquire the same or a substantially identical security within the relevant window before or after the sale. The adjustment may be added to the basis of the replacement investment rather than disappearing permanently, but that does not make the transaction harmless: it can delay the tax benefit and create recordkeeping issues.
Check purchases across every account you control, including an individual account, a joint account, an employer plan, an IRA, and accounts managed by a spouse where applicable. Automatic dividend reinvestment and recurring purchases can unintentionally undermine a harvest. Because the definition of substantially identical depends on the facts, many investors use a replacement fund or security with similar market exposure but different holdings or structure. Similar is not automatically safe, so review current IRS guidance or consult a qualified tax professional.
Account type and investment purpose
Tax-loss harvesting is most relevant to taxable brokerage assets. Retirement accounts have different tax mechanics, and selling inside them does not generally create the same reportable capital gain or loss. Also consider whether the position is needed for a specific purpose, such as a concentrated-stock reduction plan, a charitable gift, or a near-term spending need.
| Situation | Potentially useful approach | Key risk to check |
|---|---|---|
| Realized gains and a diversified taxable holding below basis | Sell a selected loss lot and use a suitable replacement | Wash-sale exposure and changed allocation |
| No realized gains and a small unrealized loss | Compare the possible future benefit with costs and disruption | Immediate tax value may be limited |
| Automatic purchases in several accounts | Pause or review recurring transactions before selling | An unnoticed purchase can trigger wash-sale treatment |
| Investment thesis has deteriorated | Consider selling based on the investment decision, with tax treatment as a secondary factor | Replacing the position solely for tax reasons |
Worked examples
Example 1: Loss used against a realized gain
Assume an investor sells one taxable-account holding and realizes a $4,000 gain during the year. A separate lot has an adjusted basis of $10,000 and could be sold for $7,000, creating an estimated $3,000 loss before transaction costs. If the loss is eligible and no wash-sale issue applies, the investor may use it to reduce the net capital gain reported for the year. The remaining $1,000 gain is not automatically tax-free; the investor must still apply the rules for the relevant holding periods, income level, and jurisdiction.
The investor should also decide whether to buy a replacement. If the original allocation is still appropriate, remaining out of the market can create more risk than the estimated tax benefit. A replacement with similar but not substantially identical exposure may preserve the intended allocation, but it requires careful review.
Example 2: Losses exceed gains
Suppose an investor realizes $1,500 in gains and identifies $5,000 of eligible losses. The losses may first be netted against gains under the applicable rules. The excess may have a limited current-year use and may be carried forward, but the precise result depends on the taxpayer's circumstances and current law. The investor should record the unused amount and confirm that the tax software or preparer handles the carryforward correctly.
Example 3: When harvesting may not be worthwhile
Consider a $600 unrealized loss in a broadly diversified fund with no realized gains, a wide bid-ask spread, and a strong preference to keep the exact fund. If selling would create a meaningful chance of a wash sale, disrupt an allocation, or expose the investor to a rebound during the replacement process, the expected benefit may be too small. A paper loss is not by itself a sufficient reason to trade.
When to recalculate
Review tax-loss harvesting whenever your taxable portfolio changes materially, not only during the last weeks of the calendar year. Useful checkpoints include after a broad market decline, after realizing a large gain, after a merger or fund conversion, and during an annual tax-document review.
Before year-end, allow time for trade settlement, brokerage reporting, and a review of purchases made in the applicable period around the sale. Do not wait until the final trading session if a missed deadline or operational error could change the result. Recheck the current IRS treatment, capital-gains thresholds, state rules, and filing instructions each tax season because tax guidance and your personal circumstances can change.
Use this action list:
- Download current transaction and cost-basis records.
- Separate realized gains from unrealized gains and losses.
- Review individual tax lots, holding periods, and account locations.
- Search for recurring purchases, dividend reinvestments, and spouse or retirement-account transactions.
- Estimate the tax benefit conservatively and subtract trading costs.
- Choose a replacement only after confirming that it fits your target allocation and does not create an avoidable wash-sale concern.
- Save confirmations, calculations, and the reason for the trade.
Tax-loss harvesting works best as part of a repeatable portfolio process. Revisit the worksheet when gains, losses, prices, account activity, or tax rules change, and seek individualized advice when the transaction involves concentrated holdings, large amounts, complex basis, or several account types.