Tax loss harvesting explained simply: it is the practice of selling an investment that has declined in value, using the realized loss to offset certain investment gains, and then choosing a suitable replacement investment for your portfolio. The goal is to manage taxes without abandoning your long-term investment strategy.
Tax loss harvesting is most relevant to investments held in taxable brokerage accounts. It generally does not provide an immediate tax benefit in tax-advantaged accounts such as traditional IRAs, Roth IRAs, or 401(k) plans because trades inside those accounts are not usually reported as current taxable gains and losses. The rules can also become complicated when you own similar investments across multiple accounts, reinvest dividends, or trade frequently.
What Tax Loss Harvesting Means
Suppose you bought shares of an index fund for $8,000 and their current market value is $6,500. If you sell the shares, you have a realized capital loss of $1,500 before considering fees and other adjustments. You could then buy a different fund that gives your portfolio similar market exposure, allowing you to remain invested while potentially using the loss on your tax return.
A loss is generally unrealized while you still own the investment. It becomes realized when you sell. Tax loss harvesting concerns realized losses, not simply a decline shown on a brokerage statement.
Realized capital losses are first used to offset realized capital gains under applicable tax rules. If your losses exceed your gains, a limited amount may generally be usable against other income for federal tax purposes, with unused losses carried forward to future tax years. The exact treatment depends on your filing status, income, type of gain or loss, and state tax rules.
How the Tax Benefit Works

Capital gains and losses are commonly classified as short-term or long-term based on how long you held the asset. The distinction matters because short-term and long-term gains can receive different tax treatment. In broad terms, short-term losses are generally applied against short-term gains first, and long-term losses against long-term gains first. Netting rules then determine how remaining amounts are combined.
For example, assume an investor sells one taxable investment for a $2,000 gain and another for a $1,200 loss during the same tax year. The loss may reduce the taxable net gain to $800, subject to the applicable rules. The tax savings are not the same as the amount of the loss. A $1,200 loss does not create a $1,200 refund. Its value depends on the gains or income it offsets and the investor’s applicable tax rates.
Tax loss harvesting can defer taxes rather than eliminate them. If you sell an investment at a loss and buy a replacement investment, the replacement may later be sold at a gain. The timing and amount of tax may change, but the underlying economic result still matters. A tax decision should therefore be evaluated alongside asset allocation, fees, risk, and investment goals.
Practical Steps for Tax Loss Harvesting
1. Review your taxable investments
Start with taxable brokerage accounts and identify positions trading below their adjusted cost basis. Your cost basis can be affected by purchases, reinvested dividends, corporate actions, and previous transactions. Brokerage records are useful, but investors remain responsible for reviewing tax reporting information and keeping appropriate records.
Look at the position’s purchase lots rather than only its total account value. One group of shares may have a loss while another group of the same security has a gain. Selling a specific tax lot can produce a different result from selling shares under an average-cost or default lot-selection method.
2. Check realized gains and losses
Harvesting is often most useful when you already have realized gains that could be offset. Review transactions from the current tax year and any capital losses carried forward from prior years. Your tax software, brokerage tax documents, and prior tax returns may help, but they do not replace professional advice for complicated situations.
Do not sell solely because a position shows a loss. Consider whether the investment still fits your target allocation, risk tolerance, and time horizon. A tax benefit is not a reason to hold an unsuitable investment or to create unnecessary trading costs.
3. Decide whether to sell the position
Before placing an order, estimate the loss after commissions, bid-ask spreads, and other transaction costs. Also consider whether the sale could create a gain in another tax lot, trigger an unwanted tax consequence, or change your portfolio’s risk exposure.
Tax loss harvesting may be more straightforward when an investment has become too concentrated, when an index fund no longer matches your plan, or when you are rebalancing. It requires more care when the investment is a single stock, a narrowly focused fund, or an asset with no close substitute.
4. Choose a replacement carefully
Investors often replace a sold fund with another fund that has a similar, but not substantially identical, investment role. For example, a broad domestic equity fund might be replaced with another broad domestic equity fund using a different index or portfolio construction approach. The replacement should match the intended level of market exposure without violating the wash-sale rules.
Do not assume that two funds are different enough merely because they have different names or fund providers. Their holdings, objectives, index methodology, and tax characteristics may matter. A qualified tax professional can help assess difficult cases.
5. Follow the wash-sale rules
The wash-sale rules can disallow a loss when you sell a security at a loss and acquire the same or a substantially identical security within the relevant period. The period generally includes the 30 days before the sale, the sale date, and the 30 days after the sale. If the rule applies, the disallowed loss is typically added to the basis of the replacement shares rather than immediately used on the tax return.
The rule can be overlooked when automatic dividend reinvestment purchases replacement shares, when a spouse buys the same security, or when a similar transaction occurs in another account. Employer stock plans and retirement accounts may create additional complications. Account records should be reviewed across the household, not only within one brokerage screen.
6. Keep the portfolio aligned
After selling and replacing an investment, check whether the transaction changed your intended allocation. Taxable investing should still support your broader plan, which may include index fund investing, retirement planning, an emergency fund, debt payoff, and other financial priorities.
If you want to return to the original investment after the wash-sale window, track the dates and confirm that doing so will not create a wash-sale problem. The replacement investment may also move differently from the original during the waiting period, so there is no guarantee that the strategy will produce the desired result.
Simple Example
Imagine that you own a taxable fund with a cost basis of $10,000 and a current value of $8,500. You decide that the fund’s role in your portfolio is still appropriate, but you want to realize the loss. You sell it and realize a $1,500 loss. You then buy a different fund designed to provide comparable, though not necessarily identical, exposure.
That $1,500 loss may offset eligible capital gains, subject to the tax rules and your other transactions. If your total allowable losses exceed your gains, some amount may be available to offset other income or carry forward, depending on federal and state law. The result is not automatic, and it may change if you purchased the same or a substantially identical security during the applicable period.
The example also shows why the investment decision and tax decision should be considered together. If the replacement fund has higher expenses, a wider spread, different diversification, or a different risk profile, the tax benefit may not justify the change.
Potential Advantages
- It may reduce current tax liability. Realized losses can offset eligible realized gains and may help with other income under applicable federal rules.
- It can support rebalancing. Selling a declining position may help move the portfolio toward its intended mix of stocks, bonds, or other assets.
- It can preserve market exposure. A carefully selected replacement may keep the portfolio invested rather than leaving proceeds in cash while waiting for a tax opportunity.
- It may improve tax coordination. Investors can consider taxable accounts alongside retirement accounts and asset-location decisions as part of broader tax optimization.
Potential Drawbacks
- The tax benefit may be delayed. A loss may offset gains carried into future years rather than produce an immediate benefit.
- Rules can be complex. Wash sales, cost-basis adjustments, multiple accounts, and different holding periods can make the outcome difficult to calculate.
- Trading creates costs and risk. Prices may move between the sale and replacement purchase. Spreads, commissions, and fund expenses can reduce the benefit.
- A replacement may not behave the same way. Similar market exposure does not mean identical performance, holdings, volatility, or tax characteristics.
- The strategy may encourage unnecessary activity. Frequent transactions can distract from a long-term plan and create recordkeeping work.
- Tax rules can change. Federal, state, and local treatment may differ, and a result that works for one investor may not work for another.
Important Limitations
Tax loss harvesting is generally more relevant to taxable accounts than to tax-advantaged accounts. It also cannot turn a poor investment into a good one. If an asset is down because its long-term outlook has changed, selling it may be appropriate for investment reasons, but buying a similar asset only for a tax benefit may not be.
Losses can be limited or deferred by the wash-sale rules. Purchases by a spouse, reinvested distributions, or transactions in an IRA or other account can affect the analysis. A replacement purchase in an IRA may receive different treatment from a purchase in a taxable account, and a disallowed loss may not receive the same basis adjustment that would occur in a taxable account.
State tax treatment may differ from federal treatment. Some states have different deductions, rates, carryforward rules, or definitions of taxable income. Investors with municipal bonds, partnerships, options, restricted stock, employee stock purchase plans, digital assets, or substantial concentrated positions should be especially cautious.
Tax loss harvesting should also be distinguished from tax-gain harvesting. In some situations, realizing a gain can fit a long-term tax plan, particularly when an investor has a low taxable income or needs to simplify a portfolio. The right approach depends on the entire tax picture rather than on whether a position is currently up or down.
How It Fits Into a Broader Financial Plan
Tax loss harvesting is one tool within a larger investing process. A sound plan usually begins with a workable budget, an emergency fund, manageable high-interest debt, and appropriate insurance. Retirement contributions and asset allocation may have a larger effect on long-term outcomes than occasional tax transactions.
Other financial activities can affect the same plan. Side hustles may create estimated tax obligations. Real estate investing can involve depreciation, rental income, passive-activity rules, and different reporting requirements. Passive income is not automatically tax-free, and credit score optimization does not replace saving or investing decisions. Coordinating these areas can help prevent a tax strategy from being viewed in isolation.
Investors who use diversified index funds may find tax loss harvesting easier to organize because replacement options are often available across broad market categories. However, index funds can still be substantially identical for tax purposes, and fund names alone are not enough to establish compliance.
Sources and Comparison Methodology
The primary federal reference for investment tax topics is the Internal Revenue Service, Publication 550, Investment Income and Expenses. The IRS also publishes instructions for Form 8949 and Schedule D, which address reporting sales and exchanges of capital assets. These sources explain concepts such as basis, holding period, capital gains and losses, and wash-sale reporting.
For investor education and general securities information, Investor.gov, operated by the U.S. Securities and Exchange Commission, provides explanations of investing risks, diversification, and account considerations. Replacement investments should be compared by objective, holdings, index methodology, expense ratio, diversification, volatility, and tax characteristics. No comparison should rely only on a fund’s name or recent performance.
Q&A
Does tax loss harvesting mean I permanently lose money?
The sale realizes an economic loss on that position, but a suitable replacement may keep your portfolio invested. The tax benefit can reduce taxable gains, but it does not erase the investment loss.
Can I buy the same fund immediately after selling it?
That may create a wash-sale issue if the fund is the same or substantially identical and the purchase falls within the relevant period. Review all household accounts and automatic reinvestments before trading.
Is tax loss harvesting useful in a Roth IRA?
Usually not in the same way as in a taxable brokerage account. Trades inside a Roth IRA generally do not create current reportable capital gains or losses, and special rules can apply when a taxable-account loss is connected with an IRA purchase.
How often should I harvest losses?
There is no universal schedule. Some investors review portfolios near year-end, while others review after major market movements or during planned rebalancing. A review should consider taxes, allocation, costs, and investment objectives together.
Should I use tax loss harvesting software or an adviser?
Software can help identify lots and transactions, but it may not understand every household account, state rule, employer plan, or investment-specific issue. A tax professional or investment adviser may be useful when the transactions are substantial or complex.
Final Takeaway
Tax loss harvesting is the deliberate realization of investment losses to manage taxable gains while maintaining an appropriate portfolio. The basic process is straightforward: review taxable lots, understand gains and losses, sell only when it fits the investment plan, choose a suitable replacement, and check the wash-sale rules across all relevant accounts.
The strategy is not a guaranteed profit and does not remove market risk. Because tax treatment depends on personal facts and can change, use current IRS guidance and consider consulting a qualified tax professional before acting. This article is for general informational purposes and is not individualized tax, legal, or investment advice.

