Skip to main content

Capital Gains Tax Calculator US

Calculate federal capital gains tax on stock sales. Short-term gains taxed at ordinary income rates. Long-term gains at 0%, 15%, or 20% based on your income.

Calculate Your Tax

Check brackets below for exact rate.

What this calculator does

  • Calculates capital gain from your stock sale
  • Applies short-term (10-37%) or long-term (0%, 15%, 20%) rates
  • Factors in your income bracket for accurate tax estimate
  • Shows net profit after federal tax

How to Use

1

Enter cost basis

Total amount paid including any commissions

2

Enter sale proceeds

Amount received from selling shares

3

Add number of shares

Quantity of shares sold in this transaction

4

Select holding period

Over 1 year = long-term, under = short-term

5

Choose income bracket

Determines your applicable tax rate

6

View results

See gain, federal tax, and net profit

Example

You bought 50 shares of Apple (AAPL) at $150 per share in January 2023. You sold them at $200 per share in March 2025 (held for over 2 years). Your taxable income puts you in the 15% long-term capital gains bracket.

Cost Basis (50 × $150)$7,500
Sale Proceeds (50 × $200)$10,000
Capital Gain$2,500
Long-Term Rate (15%)15%
Federal Tax-$375
Net Profit$2,125

Since you held the shares for more than 1 year, this qualifies for the lower long-term rate. State taxes may apply depending on where you live.

US Capital Gains Tax Rates (2024)

Long-Term Capital Gains (held > 1 year)

Tax RateSingle FilersMarried Filing Jointly
0%Up to $47,025Up to $94,050
15%$47,026 – $518,900$94,051 – $583,750
20%Over $518,900Over $583,750

Short-Term Capital Gains (held ≤ 1 year)

Taxed as ordinary income at your marginal tax rate:

Tax RateSingle FilersMarried Filing Jointly
10%Up to $11,600Up to $23,200
12%$11,601 – $47,150$23,201 – $94,300
22%$47,151 – $100,525$94,301 – $201,050
24%$100,526 – $191,950$201,051 – $383,900
32%$191,951 – $243,725$383,901 – $487,450
35%$243,726 – $609,350$487,451 – $731,200
37%Over $609,350Over $731,200

Note: High earners may also owe 3.8% Net Investment Income Tax (NIIT) on capital gains.

Frequently Asked Questions

Long-term capital gains (assets held over 1 year) are taxed at 0%, 15%, or 20% depending on your taxable income. For 2024, single filers pay 0% up to $47,025, 15% from $47,026 to $518,900, and 20% above $518,900.

Key Terms

Cost Basis

The original purchase price of an asset plus any commissions or fees. Used to calculate capital gain or loss.

Long-Term Gain

Profit from selling an asset held for more than one year. Taxed at preferential rates of 0%, 15%, or 20%.

Short-Term Gain

Profit from selling an asset held for one year or less. Taxed as ordinary income at your marginal rate.

NIIT

Net Investment Income Tax. An additional 3.8% tax on investment income for high earners.

Wash Sale

Selling a security at a loss and buying the same security within 30 days. The loss is disallowed for tax purposes.

Tax-Loss Harvesting

Selling losing investments to offset gains and reduce tax liability. Must avoid wash sale rules.

Related Tools

Disclaimer: This calculator provides estimates for educational purposes only. It calculates federal tax only—state taxes vary. Tax laws change frequently. Consult a qualified tax professional or CPA for advice specific to your situation.