Investment Tax Tool

Capital Gains Tax Calculator

Calculate federal and state capital gains taxes on investments, real estate, and other assets. See short-term vs long-term rates and NIIT impact.

Sale Details

What you originally paid

Tax Estimate

Total Tax

$60,400

30.2% effective rate

Capital Gain

$200,000

Long-term

Tax Breakdown

Sale Price$500,000
Cost Basis-$300,000
Capital Gain$200,000
Federal Long-term Tax-$30,000
NIIT (3.8%)-$3,800
California State Tax-$26,600
Net After Tax$439,600

Federal Tax

$33,800

State Tax

$26,600

Effective Rate

30.2%

California Capital Gains:

California taxes capital gains as ordinary income at rates up to 13.3%

Net Investment Income Tax Applied

Your income exceeds $200,000, triggering the 3.8% NIIT on investment income.

2025 Federal Long-Term Capital Gains Rates

0% Rate

$0 - $47K

Single filers

$0 - $94K married joint

15% Rate

$47K - $519K

Single filers

$94K - $584K married joint

20% Rate

$519K+

Single filers

$584K+ married joint

+3.8% NIIT for high earners. Short-term gains taxed at ordinary income rates (10-37%).

Frequently Asked Questions

2026 Long-Term Capital Gains Tax Brackets

Long-term capital gains (assets held more than 12 months) receive preferential tax rates under IRC Section 1(h). For the 2026 tax year, the three rate tiers are 0%, 15%, and 20%, determined by your total taxable income (not just the gain):

RateSingleMarried Filing JointlyHead of Household
0%$0 - $48,350$0 - $96,700$0 - $64,750
15%$48,351 - $533,400$96,701 - $600,050$64,751 - $566,700
20%Over $533,400Over $600,050Over $566,700

Short-term capital gains (assets held 1 year or less) are taxed at ordinary income rates of 10% to 37%. This means a short-term gain on a $100,000 stock sale could cost $37,000 in federal tax at the top bracket, compared to $20,000 maximum for a long-term gain. Holding an asset for just one extra day past the 12-month mark can save thousands.

Collectibles such as art, antiques, coins, and precious metals are taxed at a maximum rate of 28% regardless of holding period, under IRC Section 1(h)(4). Section 1250 unrecaptured gain on real estate depreciation is taxed at a maximum of 25%.

Net Investment Income Tax (NIIT) and How It Adds 3.8%

The Net Investment Income Tax under IRC Section 1411 imposes an additional 3.8% tax on the lesser of net investment income or the amount by which MAGI exceeds the threshold. The NIIT thresholds are not indexed for inflation and have remained fixed since 2013:

Filing StatusMAGI ThresholdEffective Max Rate (LTCG + NIIT)
Single$200,00023.8%
Married Filing Jointly$250,00023.8%
Married Filing Separately$125,00023.8%
Head of Household$200,00023.8%

Net investment income includes capital gains, dividends, interest, rental income, royalties, and passive business income. It does not include wages, self-employment income, Social Security, or distributions from qualified retirement plans. For a single filer with $250,000 in MAGI and $80,000 in capital gains, the NIIT applies to the lesser of $80,000 (investment income) or $50,000 ($250,000 - $200,000 threshold) = $50,000 x 3.8% = $1,900 additional tax.

Cost Basis Methods and the Wash Sale Rule

Your cost basis is the original purchase price plus any adjustments (commissions, fees, reinvested dividends). The IRS allows several methods for determining which shares you sold:

  • FIFO (First In, First Out): Default method. Oldest shares are deemed sold first, often resulting in the largest gain (and highest tax).
  • Specific identification: You choose exactly which lots to sell, allowing you to sell high-basis shares first to minimize gain.
  • Average cost: Available only for mutual fund shares and certain dividend reinvestment plans. Averages the cost of all shares owned.

The wash sale rule under IRC Section 1091 disallows a capital loss if you purchase a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares. This rule applies across all your accounts (brokerage, IRA, spouse accounts). It does not apply to gains -- only losses.

Section 1031 like-kind exchanges allow deferral of capital gains on real property (but not stocks or personal property since 2018). The replacement property must be identified within 45 days and closed within 180 days. Section 1202 QSBS allows up to 100% exclusion of gain (up to $10 million or 10x basis) on qualified small business stock held for at least 5 years.

Official References

Learn more about capital gains taxes:

This calculator provides estimates. Tax situations vary and you should consult a tax professional for advice on your specific situation.

Track Investment Gains Automatically

Jupid AI Accountant helps you track investment income, calculate gains, and stay on top of your tax obligations.