Capital Gains Tax Calculator

Estimate capital gains tax based on holding period and income bracket

Calculate Tax Impact

Estimate your capital gains tax liability for stock sales (US tax rates)

2024 single filer rates (approximate)

Understanding Capital Gains Tax

When you sell stocks for a profit, you owe capital gains tax on the gain. The tax rate depends on how long you held the investment and your income tax bracket.

Long-Term vs. Short-Term

Long-Term Capital Gains (held > 1 year)

  • 0% rate: If you're in the 10% or 12% ordinary income tax brackets
  • 15% rate: If you're in the 22%, 24%, 32%, or 35% brackets
  • 20% rate: If you're in the 37% bracket

Short-Term Capital Gains (held ≤ 1 year)

Taxed at your ordinary income tax rate (10% to 37%). This is typically much higher than long-term rates, which is why holding investments for over a year can save significant taxes.

Important Disclaimers

This calculator provides estimates only and is not tax advice. Actual tax liability depends on many factors including:

  • • Your total taxable income
  • • State and local taxes
  • • Net investment income tax (3.8% for high earners)
  • • Tax loss harvesting opportunities
  • • Filing status (single, married, etc.)

Always consult a qualified tax professional for personalized advice.

Tax Optimization Strategies

  • Hold investments for over one year to qualify for lower long-term rates
  • Use tax-advantaged accounts like IRAs and 401(k)s when possible
  • Consider tax-loss harvesting to offset gains with losses
  • Time sales strategically across tax years
  • Be aware of wash sale rules when repurchasing securities

The One-Year Rule

Holding just one extra day can save thousands. If you bought a stock 364 days ago with a $10,000 gain, selling today costs you $3,700 in taxes (37% short-term rate). Waiting one more day drops your tax to $2,000 (20% long-term rate) - saving $1,700 by waiting 24 hours.

This is why sophisticated investors track purchase dates religiously. Set calendar reminders before the one-year mark. If the stock is volatile, consider whether tax savings justify the price risk of waiting. Often, they do.

Tax-Loss Harvesting

Every portfolio has losers. Sell them strategically to offset gains. If you have a $15,000 capital gain and a stock down $5,000, selling the loser reduces your taxable gain to $10,000 - saving $1,000-$1,850 in taxes depending on your bracket.

The wash-sale rule blocks this if you rebuy the same security within 30 days. Solution: buy a similar but not identical investment. Sold Apple at a loss? Buy Microsoft instead. Sold an S&P 500 fund? Buy a total market fund. You maintain market exposure while harvesting the loss.

State Taxes Add Up

This calculator shows federal taxes only. California adds up to 13.3% on capital gains. New York: 10.9%. Texas and Florida: 0%. A $100,000 gain costs $37,000 federal plus $13,300 California tax - 50.3% total. The same gain in Texas costs just $37,000.

Some investors establish residency in no-tax states before realizing large gains. Others time sales for years when they're in lower tax brackets. Retirees often have lower income (and lower rates) than during working years.

Net Investment Income Tax (NIIT)

High earners (over $200,000 single / $250,000 married) owe an additional 3.8% NIIT on investment income. This stacks on top of capital gains rates. Your effective long-term rate becomes 23.8% instead of 20% - and short-term can hit 40.8%.

Plan around NIIT thresholds when possible. If you're close to the cutoff, consider deferring some income or accelerating deductions to stay below it.

Capital Losses Carry Forward

If you lose $50,000 on stocks this year, you can deduct $3,000 against ordinary income and carry the remaining $47,000 forward indefinitely to offset future gains. These losses are valuable - don't waste them on small gains if bigger ones are coming.

Track your loss carryforwards carefully. They follow you across tax years until fully used. Many investors forget about them and pay taxes unnecessarily on gains that could have been offset.

Tax-Advantaged Accounts

Roth IRAs eliminate capital gains tax entirely. All growth is tax-free forever. Traditional IRAs and 401(k)s defer taxes until withdrawal - you pay ordinary income rates then, but decades of compounding make this worthwhile.

Max these accounts first before taxable investing. A $10,000 gain in a Roth IRA is worth $10,000. The same gain in a taxable account is worth $8,000-$6,300 after taxes. That 26-37% difference compounds dramatically over decades.

Common Tax Mistakes

Many investors sell winning stocks too early (before one year) to "lock in profits," triggering unnecessary short-term taxes. They'd keep more money by holding slightly longer. Others ignore cost basis tracking, paying taxes on gains they already paid taxes on.

Another mistake: forgetting to report dividend reinvestments. Each reinvested dividend increases your cost basis. If you reinvested $5,000 in dividends over 10 years but don't adjust your basis, you'll overpay taxes on that $5,000 when you sell.

Example: $50,000 Gain

You're in the 24% bracket with a $50,000 stock gain. Short-term (held 10 months): $12,000 tax, $38,000 net. Long-term (held 14 months): $7,500 tax, $42,500 net. Waiting 4 extra months saved $4,500 - more than 10% of your gain.

Use our Stock Profit Calculator to calculate your pre-tax gains, then this calculator to see your after-tax reality. The difference is often sobering.

Frequently Asked Questions

How accurate is this calculator?

The calculator provides accurate federal tax estimates based on 2024 tax brackets. However, actual tax liability depends on your total income, deductions, state taxes, and other factors. Always consult a tax professional for personalized advice.

What's the difference between short-term and long-term capital gains?

Short-term gains (held ≤ 1 year) are taxed at your ordinary income rate (10-37%). Long-term gains (held > 1 year) enjoy preferential rates of 0%, 15%, or 20%, resulting in significant tax savings.

Does this include state taxes?

No, this calculator shows federal capital gains tax only. State taxes vary widely - from 0% in states like Texas and Florida to 13.3% in California. Add your state's capital gains tax rate to get your total tax liability.

Can I offset gains with losses?

Yes, capital losses offset capital gains dollar-for-dollar. If you have a $10,000 gain and a $4,000 loss, you only owe tax on $6,000. Excess losses can offset $3,000 of ordinary income annually, with remaining losses carrying forward.