Last updated:
What Is Tax Loss Harvesting?
Tax loss harvesting is the practice of deliberately selling an investment that has declined in value to realize the capital loss on paper, then using that loss to reduce your taxable capital gains from other investments. Because the IRS taxes net capital gains, gains minus losses, harvesting losses directly lowers the amount of gain subject to capital gains tax in the current year. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income, with any remaining balance carried forward to future tax years indefinitely.
The strategy does not eliminate your tax liability permanently; it defers it. When you sell a losing position, you immediately reinvest the proceeds in a similar asset with a lower cost basis, so your unrealized gain in the replacement position is higher. However, because tax is deferred, the money you save today continues compounding in your portfolio for months or years before the deferred liability comes due. Over a long investment horizon, this compounding benefit can be significant, sometimes adding tens of thousands of dollars to retirement wealth compared with a buy-and-hold approach that ignores harvesting opportunities.
According to IRS Topic 409 on capital gains and losses, individual investors can use capital losses to offset capital gains dollar-for-dollar, with short-term losses first offsetting short-term gains and long-term losses first offsetting long-term gains before crossing categories. This netting order matters because short-term gains are taxed at higher ordinary income rates, so harvesting short-term losses typically produces larger immediate savings than harvesting long-term losses of the same dollar amount.
How the Tax Loss Harvesting Calculator Works
The tax loss harvesting calculator above requires four inputs: your current portfolio value, the total dollar amount of unrealized losses you could harvest, your applicable capital gains tax rate, and the wash-sale wait period (informational). Hit Calculate to see three key outputs instantly.
First, tax savings from harvesting is simply your unrealized losses multiplied by your tax rate. If you have $12,000 in losses and face a 22% rate, your tax savings are $2,640. This represents cash that stays in your portfolio instead of going to the IRS. Second, after-harvest portfolio value reflects what your account looks like immediately after selling all the losing positions, your original value minus the losses you crystallized. Third, the break-even recovery percentage tells you how much the replacement investment must appreciate to restore your portfolio to its original dollar value. A lower break-even percentage signals a more favorable harvesting decision relative to the tax benefit.
To choose the right tax rate, enter your ordinary income rate for assets held under one year or your long-term capital gains rate (0%, 15%, or 20%) for assets held longer than one year. Higher-income taxpayers subject to the 3.8% net investment income tax should add that surcharge to their long-term rate. For a deeper breakdown of which rate applies to your situation, use our capital gains tax calculator, which walks through all the holding-period and income-level thresholds.
Tax Loss Harvesting Strategy Tips
Executing a tax loss harvesting strategy effectively requires more than just selling losers. Here are the most important best practices that maximize the value shown by the tax loss harvesting savings calculator:
Harvest continuously, not just in December. The biggest harvesting opportunities often appear during midyear corrections when year-end tax planning has not yet begun. Investors who set up price-alert thresholds, for example, selling any position down more than 10% from cost basis; capture losses opportunistically while maintaining their target asset allocation.
Reinvest immediately in a similar asset. The goal of harvesting is to capture the tax benefit while keeping your money working in the market. If you sell a losing U.S. large-cap ETF, immediately reinvest the proceeds in a different U.S. large-cap ETF that tracks a different index. Your market exposure is preserved, your tax loss is crystallized, and you are compliant with the wash-sale rule.
Match losses to your highest-rate gains first. Short-term gains are taxed at ordinary income rates, which can reach 37% federally. If you have both short-term and long-term losses available to harvest, apply short-term losses against short-term gains first to maximize savings. Use the tax bracket calculator to confirm your marginal rate before deciding which losses to prioritize.
Account for state taxes. Most states tax capital gains at ordinary income rates, which can add an additional 5 to 13% on top of the federal rate in high-tax states. When you enter your tax rate in the investment loss tax calculator, include your combined federal and state rate for the most accurate savings estimate. Explore all of your financial planning tools to build a complete picture of your annual tax position.
Wash Sale Rule and How to Avoid It
The wash-sale rule under IRC Section 1091 is the primary compliance risk in any tax loss harvesting strategy calculator scenario. It disallows a loss deduction if you purchase a "substantially identical" security within the 30-day window before or after the sale that generated the loss. The combined blackout window is 61 days, 30 days before, the sale date, and 30 days after. Violating the rule does not permanently lose the deduction; it adds the disallowed loss to the cost basis of the repurchased shares. However, this deferral may push the tax benefit into a future year when your rate is higher, reducing the strategy's value.
Substantially identical securities include shares of the same company or fund. The IRS has not ruled definitively that two ETFs tracking different indexes (e.g., the S&P 500 and the Russell 1000) are substantially identical, so most tax practitioners treat them as safe replacements. However, two share classes of the same fund, such as Vanguard Admiral and Investor shares of the same portfolio, are substantially identical and would trigger the wash-sale rule.
According to Investopedia's explanation of the wash-sale rule, the 30-day window applies to purchases in your IRA or your spouse's accounts as well, not just your taxable brokerage account. This cross-account dimension catches many investors off guard: selling a fund at a loss in your taxable account and buying it in your IRA the same day still triggers a wash sale. Always check all accounts, individual, joint, and retirement, before repurchasing a recently sold security.
Cryptocurrency is currently exempt from the wash-sale rule because the IRS classifies it as property rather than a security. This makes crypto one of the most powerful arenas for tax loss harvesting: you can sell and immediately rebuy the same coin with no disallowance. Use our capital gains tax calculator alongside this tool to quantify total tax exposure across your crypto and stock holdings.
Tax Loss Harvesting vs Capital Gains
Understanding the interplay between tax loss harvesting and capital gains is essential to using the capital loss tax offset calculator strategically. Capital gains taxes are owed when you sell an asset for more than you paid. Short-term gains, on assets held one year or less, are taxed at ordinary income rates ranging from 10% to 37%. Long-term gains, on assets held longer than one year, are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. Tax loss harvesting lets you use realized losses to cancel out realized gains, directly reducing the taxable gain base that these rates apply to.
The leverage is highest when you are realizing large short-term gains, perhaps from selling a profitable stock position before the one-year mark or from a business sale. Harvesting $50,000 in losses against $50,000 in short-term gains at a 37% rate saves $18,500 in federal tax alone. The same harvest against long-term gains at 20% saves $10,000, still valuable, but meaningfully lower. Running both scenarios through the tax loss harvesting calculator before you execute trades helps you prioritize which losses to harvest first and whether to accelerate any loss harvesting before year-end to offset anticipated gains.
For investors with large, concentrated stock positions, tax loss harvesting in other parts of the portfolio can partially offset gains that arise from diversifying out of the concentrated holding. Pair this tool with our tax bracket calculator to model how harvested losses change your effective rate across all income types, and with our capital gains tax calculator to see the gross gain liability before offsets. Together, these three tools give you the full picture needed for a disciplined, tax-efficient investment plan.