tabularo

Capital Gains Tax Calculator

How It Works

Capital gains tax applies when you sell an asset for more than you paid for it. The difference between your sale price and your cost basis (original purchase price plus qualifying expenses) is your capital gain. In the United States, capital gains are taxed at different rates depending on how long you held the asset before selling it, making the distinction between short-term and long-term gains one of the most important factors in investment tax planning.

Short-term capital gains apply to assets held for one year or less and are taxed as ordinary income using the standard 2026 federal tax brackets. This means short-term gains can be taxed at rates from 10% to 37% depending on your total taxable income. Long-term capital gains, on assets held for more than one year, receive preferential tax treatment with rates of 0%, 15%, or 20% based on your taxable income and filing status.

For 2026, single filers pay 0% on long-term gains if their taxable income (including the gain) is below $49,450, 15% on gains up to $545,500, and 20% on gains above that threshold. Married filing jointly filers benefit from higher thresholds: 0% up to $98,900, 15% up to $610,350, and 20% above. These thresholds are adjusted annually for inflation.

High-income taxpayers may also owe the Net Investment Income Tax (NIIT) of 3.8% on capital gains. This surtax applies when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married filing jointly. The NIIT is calculated on the lesser of your net investment income or the amount by which your MAGI exceeds the threshold, and it applies to both short-term and long-term gains.

Understanding your cost basis is essential for accurate capital gains calculations. Cost basis typically includes the original purchase price plus any commissions, fees, or improvements (for real estate). For inherited assets, the cost basis is generally stepped up to the fair market value at the date of death. For gifted assets, the basis is usually the donor's original basis. Accurate record-keeping of your cost basis can significantly reduce your tax liability when you eventually sell.

Formula Breakdown

Capital gains tax is calculated based on the type of gain and your total income:

1. Capital Gain = Sale Price - Cost Basis

2. Short-Term Gains: Taxed at ordinary income rates (10% to 37%)
   Applied using 2026 federal tax brackets on total taxable income

3. Long-Term Gains (2026 thresholds for single filers):
   - 0% rate: taxable income up to $49,450
   - 15% rate: taxable income $49,451 - $545,500
   - 20% rate: taxable income over $545,500

4. Net Investment Income Tax (NIIT):
   3.8% on investment income if MAGI > $200,000 (single) / $250,000 (MFJ)

5. Total Tax = Federal Capital Gains Tax + NIIT (if applicable)
6. Net Proceeds = Sale Price - Total Tax
7. Effective Rate = Total Tax / Capital Gain x 100

Example: Single filer, $20,000 long-term gain, $75,000 other income:
- Total income = $95,000 (above $49,450 threshold)
- Long-term rate = 15%
- Federal tax = $20,000 x 15% = $3,000
- NIIT = $0 (MAGI under $200,000)
- Net proceeds = $50,000 - $3,000 = $47,000

Related Calculators

Frequently Asked Questions