Tax Loss Harvesting Calculator

Tax savings will appear here.

Strategically Realizing Losses to Cut Your Tax Bill

Investors in taxable brokerage accounts often face a bittersweet reality: not every position will move higher. Market downturns or individual stock slumps can leave a portfolio dotted with red numbers. Yet those paper losses hold latent value because tax law allows them to offset capital gains and even a portion of ordinary income. This maneuver, known as tax loss harvesting, involves selling securities at a loss, realizing that loss for tax purposes, and using it to reduce current or future tax liabilities. The calculator above models the potential benefit by comparing your realized gains with the losses you plan to harvest. By entering amounts for short-term gains, long-term gains, and both categories of losses, you receive an estimate of how much tax you might save this year and how much loss could carry forward to later years.

The mechanics of tax loss harvesting hinge on the distinction between short-term and long-term capital assets. Short-term positions, held for one year or less, are taxed at ordinary income rates, which can climb as high as 37% at the federal level. Long-term holdings enjoy preferential rates of 0%, 15%, or 20% depending on taxable income thresholds. Because losses must first offset gains of the same type, the timing and classification of your trades materially affect tax outcomes. The calculator uses a straightforward hierarchy: short-term losses offset short-term gains, long-term losses offset long-term gains, and any remaining net loss up to $3,000 can reduce ordinary income. Additional unused loss carries forward indefinitely, waiting to offset gains in future years.

The central equation underpinning the calculator aggregates these interactions. In MathML form, the tax savings are expressed as S=L_s×r_s+L_l×r_l+C×r_o. Here, S represents total savings, L_s is the portion of short-term losses that offset short-term gains, r_s the ordinary tax rate, L_l the long-term losses applied to long-term gains at rate r_l, and C is the amount of net loss used to offset ordinary income at rate r_o. The calculator computes these variables based on the values you supply, ensuring that losses are applied in the proper order and that no more than $3,000 of excess loss is used against ordinary income in a single year.

Consider an investor who realized $4,000 of short-term gains and $6,000 of long-term gains during the year. The portfolio also contains $5,000 in short-term losses and $8,000 in long-term losses that could be harvested. With a 24% ordinary tax rate and a 15% long-term capital gains rate, the calculator shows that harvesting all available losses would eliminate the entire $4,000 of short-term gains and $6,000 of long-term gains. The remaining net loss of $3,000 could be applied against ordinary income, generating additional savings. In total, the strategy would reduce the current year's tax bill by $4,000×24% + $6,000×15% + $3,000×24% = $3,090. Any leftover loss after the $3,000 ordinary income offset would carry forward to future years, creating an ongoing tax asset.

The table below summarizes the order in which losses apply under U.S. tax rules, highlighting how the calculator mirrors real-world treatment.

StepDescription
1Subtract long-term losses from long-term gains
2Subtract short-term losses from short-term gains
3If one category has net loss and the other net gain, offset the gain
4Apply remaining net loss (if any) to ordinary income up to $3,000
5Carry forward any unused loss to future years

While tax loss harvesting can yield immediate benefits, it is not without nuance. A critical rule is the wash sale provision, which disallows a loss if you purchase the same or substantially identical security within 30 days before or after the sale that generated the loss. The calculator assumes compliance with the wash sale rule; if you inadvertently trigger it, the disallowed loss is added to the cost basis of the new shares and cannot be used for current tax savings. Keeping meticulous records of trade dates and ensuring sufficient time elapses between sale and repurchase are essential practices for anyone employing a harvesting strategy.

Another consideration is the impact on portfolio allocation. Selling a losing asset may skew your holdings away from target percentages, potentially increasing risk or drifting from long-term goals. Many investors address this by purchasing a similar, but not substantially identical, security to maintain exposure. For example, one might sell an S&P 500 index fund and temporarily buy a total market fund or a different S&P 500 ETF from another provider. The calculator focuses on the tax math and does not evaluate portfolio fit, but its outputs should be interpreted alongside an investment policy statement to ensure that harvesting does not inadvertently derail broader strategies.

State taxes further complicate the picture. Some states conform closely to federal capital gains rules, while others have flat rates or no capital gains distinction at all. High-tax jurisdictions may offer additional savings when losses offset gains. However, a handful of states disallow the $3,000 ordinary income offset or have their own wash sale interpretations. The calculator's simplified framework uses a single set of rates for federal purposes, but you can approximate state effects by adjusting the ordinary and capital gains rate inputs to reflect combined tax burdens.

Time horizon also matters. If you expect your income to fall significantly next year, it may be advantageous to defer harvesting until then, especially if lower rates would apply to gains. Conversely, realizing losses during high-income years can prevent them from being taxed at the top marginal brackets. The calculator supports such analysis by allowing users to adjust rates and gain levels for multiple scenarios. Running various inputs can illuminate whether harvesting now or later yields the greatest net benefit.

Some investors mistakenly believe that tax loss harvesting is a free lunch that always improves after-tax returns. In reality, it often defers taxes rather than eliminating them. When you eventually sell the replacement asset for a gain, your cost basis is lower, increasing taxable profit later. However, the time value of money means that deferring taxes—even if they ultimately must be paid—can still enhance wealth. The calculator's output shows current-year savings but does not model future tax liabilities; users should consider long-term implications in conjunction with their investment horizon.

Record keeping remains vital. Brokerages issue Form 1099-B reporting sales proceeds and cost basis, but they may not track disallowed wash sale losses across multiple accounts or spouses. Manually documenting harvested losses, replacement purchases, and carryforward amounts ensures accuracy when completing Schedule D and Form 8949. The calculator's results can be copied and pasted into personal spreadsheets or notes, serving as a starting point for a detailed log.

Beyond traditional stocks and bonds, tax loss harvesting applies to a range of assets including cryptocurrencies, mutual funds, and exchange-traded funds. The IRS currently treats cryptocurrencies as property, meaning they are subject to capital gains rules but not the wash sale rule under existing guidance. This opens opportunities to harvest losses and immediately repurchase the same coin, though future regulation may change this. The calculator's generic design accommodates such assets by focusing on gain and loss amounts rather than asset types, making it a versatile planning tool.

Ultimately, tax loss harvesting is best viewed as part of a comprehensive tax and investment strategy. It works hand in hand with asset location decisions, charitable gifting, and retirement account contributions. The calculator supports this holistic view by providing quick feedback on the tax consequences of realizing losses. By experimenting with different combinations of gains, losses, and rates, you can gauge whether the effort of executing trades and maintaining records is justified by the potential savings. In bull markets, opportunities may be scarce, but during downturns the ability to harvest meaningful losses can soften the blow and set the stage for future tax efficiency.

Use the Tax Loss Harvesting Calculator whenever market volatility tempts you to lock in losses. It will not make investment decisions for you, but it offers clarity about the fiscal side of trading. With careful application and adherence to rules, harvesting can be a valuable ally in the quest to maximize after-tax returns.

Related Calculators

Personal Injury Settlement Calculator - Estimate Your Claim Value

Use our Personal Injury Settlement Calculator to estimate how much your accident or injury claim could be worth based on medical expenses, lost wages, and more.

personal injury calculator injury settlement estimator accident claim calculator injury claim value

Alimony Calculator - Estimate Spousal Support Payments

Estimate your spousal support payments quickly using our Alimony Calculator. Simply enter incomes and marriage length to get your results instantly.

alimony calculator spousal support calculator divorce payments calculate alimony divorce finances

College Savings Goal Calculator - Plan for Future Education Costs

Determine how much you need to save each month to reach your college fund goal with this College Savings Goal Calculator. Estimate tuition, earnings, and current savings to create a realistic plan.

college savings goal calculator education fund planner tuition savings