Tax Loss Harvesting Calculator
Calculate potential tax savings from harvesting investment losses against capital gains. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Sahil, Senior Finance & Tax Editor
Tax Loss Harvesting Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Tax Savings = (Gains Offset x Gains Rate) + (Ordinary Income Offset x Income Rate)
Worked example โ Tax Savings: $1,600 | Tax reduced from $4,000 to $2,400 | No carryforward losses
Formula
Tax Savings = (Gains Offset x Gains Rate) + (Ordinary Income Offset x Income Rate)
Harvested losses first offset capital gains dollar-for-dollar, eliminating tax at the capital gains rate. Excess losses offset up to $3,000 of ordinary income at your marginal rate. Remaining losses carry forward to future years indefinitely.
Worked Examples
Example 1: Offsetting Capital Gains
Problem:You have $20,000 in realized capital gains (long-term) and $8,000 in unrealized losses available to harvest. Federal bracket 24%, state 5%, income $100,000.
Solution:Without harvesting: Tax = $20,000 x (15% + 5%) = $4,000 After harvesting $8,000 loss: Net gains = $20,000 - $8,000 = $12,000 Tax = $12,000 x (15% + 5%) = $2,400 Tax savings = $4,000 - $2,400 = $1,600 No excess losses (gains > losses)
Result:Tax Savings: $1,600 | Tax reduced from $4,000 to $2,400 | No carryforward losses
Example 2: Losses Exceeding Gains with Carryforward
Problem:You have $5,000 in short-term gains and $15,000 in unrealized losses plus $3,000 in loss carryforward. Federal bracket 32%, state 6%.
Solution:Total losses: $15,000 + $3,000 = $18,000 Offset gains: $18,000 - $5,000 = $13,000 excess Ordinary income offset: $3,000 (max) New carryforward: $13,000 - $3,000 = $10,000 Gains tax saved: $5,000 x (32% + 6%) = $1,900 Ordinary income saved: $3,000 x (32% + 6%) = $1,140 Total savings: $1,900 + $1,140 = $3,040
Result:Tax Savings: $3,040 | $10,000 carried forward | Gains fully offset | $3,000 ordinary income deduction
Frequently Asked Questions
What is tax-loss harvesting and how does it reduce my taxes?
Tax-loss harvesting is an investment strategy where you sell securities that have declined in value to realize capital losses, then use those losses to offset capital gains and reduce your tax liability. The IRS allows you to first offset capital gains dollar-for-dollar with capital losses, and if losses exceed gains, you can deduct up to $3,000 of excess losses against ordinary income per year. Any remaining losses carry forward to future tax years indefinitely. For example, if you have $20,000 in capital gains and harvest $8,000 in losses, your taxable gains drop to $12,000, saving approximately $2,320 at a combined 29% tax rate. After selling the losing position, you typically reinvest in a similar but not substantially identical security to maintain your market exposure. This strategy is essentially a timing optimization that defers taxes rather than eliminating them permanently, but the time value of money makes this deferral genuinely valuable.
What is the wash sale rule and how do I avoid violating it?
The wash sale rule prevents you from claiming a tax loss if you purchase a substantially identical security within 30 days before or after the sale, creating a 61-day window where you must avoid repurchasing the same or substantially identical investment. If you violate the wash sale rule, the disallowed loss is added to the cost basis of the replacement security, deferring rather than permanently losing the deduction. The rule applies across all your accounts including IRAs, though IRA violations are particularly punitive because the loss is permanently disallowed. To avoid wash sales, you can wait 31 days before repurchasing the same security, buy a similar but not identical investment immediately such as a different index fund tracking a different index or ETF from a different provider, or harvest losses in taxable accounts and avoid buying the same security in retirement accounts during the 61-day window. The IRS has not provided a definitive list of what constitutes substantially identical, but switching from an S&P 500 ETF to a total market ETF is generally considered acceptable.
How much can I deduct from tax-loss harvesting?
There is no limit on the amount of capital losses you can use to offset capital gains in any given year. If you have $50,000 in gains and $50,000 in harvested losses, your taxable gains are reduced to zero. Beyond offsetting gains, excess capital losses can offset up to $3,000 per year of ordinary income, which at a 24% federal bracket saves approximately $720 in federal tax alone. Any losses beyond the capital gains offset plus $3,000 ordinary income deduction carry forward to future years indefinitely. This carryforward is one of the most valuable aspects of tax-loss harvesting because large losses harvested in a down year like 2008 or 2022 can offset gains for many years to come. Short-term losses first offset short-term gains which are taxed at higher ordinary rates, then offset long-term gains. This ordering maximizes the tax benefit since short-term capital gains rates can be nearly double long-term rates.
When is the best time to harvest tax losses?
While tax-loss harvesting is commonly associated with year-end planning, the optimal approach is to monitor your portfolio throughout the year and harvest losses whenever they become available. Market volatility creates harvesting opportunities at unpredictable times, and waiting until December means you may miss opportunities from earlier in the year. After a significant market decline of 10% or more is an excellent time to review your portfolio for harvesting opportunities. Some automated platforms like Betterment and Wealthfront perform daily tax-loss harvesting, identifying opportunities as they arise. However, be strategic about timing within the year: losses harvested in January have a longer time value than those harvested in December of the same tax year. Also consider your overall tax situation: if you anticipate unusually high income this year from a bonus or asset sale, harvesting losses becomes more valuable because they offset income taxed at your highest marginal rate. Avoid harvesting losses on positions you expect to rebound quickly if you cannot find an acceptable substitute investment.
Does tax-loss harvesting actually save money or just defer taxes?
Tax-loss harvesting primarily defers taxes rather than eliminating them, because when you repurchase a similar investment at the lower cost basis, your future gains will be larger. However, this deferral creates genuine economic value through the time value of money: a dollar saved today is worth more than a dollar paid in the future. If you harvest a $10,000 loss saving $2,900 in taxes today and invest that savings, it compounds over time. At 7% annual return over 20 years, that $2,900 grows to approximately $11,221, while the deferred tax of $2,900 remains constant in nominal terms. Additionally, tax-loss harvesting can permanently save money if you donate the appreciated replacement shares to charity, die holding the shares which receive a stepped-up basis, or use the losses to offset higher-taxed short-term gains while eventually paying long-term rates on the replacement. Research from Vanguard estimates that systematic tax-loss harvesting adds approximately 0.50% to 1.50% in after-tax return annually for taxable portfolios.
What securities are best for tax-loss harvesting?
The best candidates for tax-loss harvesting are positions with significant unrealized losses that have readily available substitute investments to maintain your desired asset allocation. Broad market index funds and ETFs are ideal because there are many similar but not substantially identical alternatives. For example, you can swap between the Vanguard Total Stock Market ETF and the iShares Core S&P Total US Stock Market ETF, or between S&P 500 funds from different providers. International funds, bond funds, and sector-specific ETFs also have numerous alternatives available. Individual stocks are trickier because there may not be a substantially similar substitute, and staying out of the position for 31 days creates concentration risk. Avoid harvesting losses on positions where you have very strong conviction about near-term recovery, as the wash sale rule prevents immediate repurchase. Tax-managed mutual funds automatically perform internal harvesting, which can reduce but not eliminate the benefit of additional portfolio-level harvesting.
How does tax-loss harvesting interact with the $3,000 ordinary income deduction?
When your capital losses exceed your capital gains, the IRS allows you to deduct up to $3,000 of the excess against ordinary income each year, with unused losses carrying forward indefinitely. This $3,000 deduction is particularly valuable because it offsets ordinary income taxed at your marginal rate, which is typically higher than capital gains rates. At a 32% federal bracket plus 5% state tax, the $3,000 deduction saves $1,110 annually. If you accumulate $30,000 in excess losses, you can deduct $3,000 per year for 10 years, generating $11,100 in cumulative tax savings. This ongoing deduction provides steady value even in years when you have no capital gains to offset. For married couples filing separately, the limit is $1,500 per spouse. Strategic planning around this threshold is important: if you already have $3,000 in excess losses for the year, additional harvesting provides value only if you expect future capital gains to offset. Some advisors recommend maintaining a reserve of carryforward losses to offset unexpected gains from mutual fund distributions or forced realizations.
Can I use tax-loss harvesting in retirement accounts?
Tax-loss harvesting does not work in tax-advantaged retirement accounts like traditional IRAs, Roth IRAs, or 401(k)s because gains and losses within these accounts are not taxable events. Selling at a loss in an IRA provides no tax deduction because the entire account will be taxed as ordinary income upon withdrawal for traditional accounts or has already been taxed for Roth accounts. Furthermore, purchasing a security in an IRA within 30 days of selling it at a loss in a taxable account can trigger the wash sale rule, permanently disallowing the loss rather than deferring it. This is one of the most costly tax mistakes investors make. To maximize harvesting benefits, perform all loss-harvesting transactions in taxable accounts and be careful to coordinate with any automatic purchases happening in retirement accounts such as 401(k) payroll contributions. If you want to adjust allocations in retirement accounts, do so independently and ensure the transactions do not conflict with your taxable account harvesting strategy.
What are the transaction costs and risks of tax-loss harvesting?
While tax-loss harvesting provides clear tax benefits, several costs and risks should be considered. Trading commissions have largely been eliminated by major brokers, but bid-ask spreads on less liquid securities still create friction costs of $5 to $50 per trade. The tracking error risk from holding a substitute investment that performs differently from the original position can work for or against you during the 31-day waiting period. Administrative complexity increases with frequent harvesting, requiring careful record-keeping of cost basis adjustments and wash sale monitoring across accounts. Over-harvesting can create a portfolio with a very low cost basis, creating a large deferred tax liability that becomes problematic when you need to sell. There is also the risk of missing a rebound: if you sell a losing stock and it immediately recovers before you can repurchase, you miss those gains. For most investors with diversified portfolios using index funds, the benefits substantially outweigh the risks, but active stock pickers should carefully evaluate each harvesting decision against their investment thesis for the position.
How do automated tax-loss harvesting platforms compare to doing it manually?
Automated tax-loss harvesting through robo-advisors like Betterment, Wealthfront, and Schwab Intelligent Portfolios offers several advantages over manual harvesting. Automated platforms scan portfolios daily or even intra-day, capturing short-lived harvesting opportunities that manual investors would miss. They automatically manage wash sale compliance across the portfolio and handle the purchase of substitute securities seamlessly. Betterment estimates their automated harvesting adds approximately 0.77% in annual after-tax returns. However, automated platforms typically charge management fees of 0.25% to 0.50% annually, partially offsetting the harvesting benefit. Manual harvesting works best for larger portfolios where the dollar value of tax savings justifies the time investment, and for investors who want control over which specific positions to harvest and which substitutes to purchase. A middle ground is using tax-loss harvesting software or alerts that identify opportunities while you retain control over execution. For portfolios under $100,000, the automated approach is often more cost-effective than paying an advisor to manually harvest.
References
Background & Theory
History
Reviewed for accuracy by Sahil, Senior Finance & Tax Editor ยท Editorial policy
Related Calculators
๐งฎSalary Tax Take-Home Pay Calculator
Calculate salary tax take home with inputs, formulas, and instant results.
๐งฎRental Income Tax Calculator โ Deductions Included
Calculate tax on rental income after deducting mortgage interest, depreciation, and expenses.
๐งฎTax Withholding Calculator
Calculate the right federal tax withholding from pay frequency, filing status, and allowances.
๐งฎHourly to Salary Converter with Overtime
Calculate hourly to salary converter with inputs, formulas, and instant results.
๐งฎTax Bracket Estimator with Deductions
Estimate your federal tax liability after standard or itemized deductions, with effective tax rate and take-home pay.
๐งฎProperty Tax Calculator
Calculate property tax with inputs, formulas, and instant results.
๐งฎPaycheck Calculator
Calculate paycheck with inputs, formulas, and instant results.
๐งฎHourly to Annual Salary Calculator
Calculate hourly to salary with inputs, formulas, and instant results.