Investment & SavingsVerified

Capital Gains Calculator

Calculate your capital gains tax liability on investment profits, distinguishing between short-term and long-term holding periods.

capital-gains.calculatorready

Capital Gains Calculator: Understanding Capital Gains Tax and Minimization Strategies for 2026

Capital gains taxes significantly impact investment returns, often reducing your profits by 15-40% depending on your income and holding period. Understanding how capital gains are calculated, the difference between short-term and long-term treatment, and strategies to minimize taxes helps you keep more of what you earn. Whether you're selling stocks, real estate, or other appreciated assets, mastering capital gains tax planning is essential for maximizing after-tax wealth.

Tax-Loss Harvesting: Turning Losses Into Tax Savings

Tax-loss harvesting is one of the most powerful strategies to reduce capital gains taxes. By strategically selling investments at a loss, you offset gains and reduce taxable income.

Here's how it works: capital losses offset capital gains dollar-for-dollar. If you have $15,000 in capital gains and $8,000 in capital losses, your net taxable gain is only $7,000. If your losses exceed your gains, you can deduct up to $3,000 of excess loss against ordinary income each year, with remaining losses carried forward indefinitely to future years.

Consider Amanda's 2026 tax situation. She has $30,000 in long-term capital gains from selling stocks that performed well. She also holds stocks that have declined in value, currently worth $18,000 less than she paid. If she sells the losing positions, she can offset $18,000 of her gains, reducing her taxable gains to $12,000. At a 15% capital gains rate, this saves $2,700 in taxes.

After selling the losing positions, Amanda can immediately purchase similar but not substantially identical investments to maintain her portfolio allocation. For example, if she sold a large-cap growth ETF at a loss, she could purchase a different large-cap growth ETF or fund. This maintains her exposure to that market segment while capturing the tax loss.

The wash sale rule prevents you from claiming a loss if you repurchase the same or a "substantially identical" security within 30 days before or after the sale. If you sell Stock ABC at a loss and buy it back 20 days later, you cannot deduct that loss. The loss is instead added to your cost basis in the repurchased shares, deferring the tax benefit until you eventually sell.

To avoid wash sales while maintaining market exposure, use these strategies:

Swap similar securities: Sell an S&P 500 index fund and buy a total market index fund. They're similar but not substantially identical. After 30 days, you can swap back if desired.

Wait 31 days: If you want to repurchase the exact same security, wait 31 days after the sale. The 30-day period includes both the 30 days after the sale and the 30 days before it, creating a 61-day window where you cannot own the security.

Buy first, sell second: Purchase the replacement security first, then 31 days later sell the losing position. You maintain continuous market exposure, though this requires additional capital temporarily.

Tax-loss harvesting is most beneficial in years when you have substantial gains. If you have little or no gains, losses are limited to the $3,000 annual deduction against ordinary income, which is still valuable but less impactful. Excess losses carry forward, though, so harvesting losses even in low-gain years builds a "bank" of losses to offset future gains.

Be strategic about short-term versus long-term losses. Long-term losses must first offset long-term gains, and short-term losses must first offset short-term gains. Only after offsetting same-category gains can losses offset the other category. Since short-term gains are taxed at higher rates, short-term losses are actually more valuable because they offset the higher-taxed gains.

If you have $20,000 in short-term gains (taxed at 24%, or $4,800) and $20,000 in long-term losses, the long-term losses offset those short-term gains, saving you $4,800. This is better than offsetting $20,000 in long-term gains taxed at 15%, which would save only $3,000.

Related Calculators

Tax

Income Tax Calculator

Estimate your federal income tax liability based on your income, filing status, deductions, and credits for the current tax year.

Open calculator
Investment & Retirement

ROI Calculator

Calculate the return on investment (ROI) for any investment by comparing your initial cost to the final value or profit.

Open calculator
Investment & Retirement

Stock Return Calculator

Calculate the total return on a stock investment including purchase price, selling price, dividends received, and trading fees.

Open calculator