# Capital Gains Tax Calculator

Estimate the federal and state taxes you may owe when selling an investment. Supports stocks, ETFs, cryptocurrency, home sales, rental property, and collectibles.

## Asset Type

- Stocks / ETFs
- Crypto
- Home Sale
- Rental Property
- Collectibles

## Ticker Symbol

## Shares

## Cost / Share

## Long-term / Short-term

## Add another position

### Tax Profile

- Filing Status
  - Single
  - Married Filing Jointly
  - Married Filing Separately
  - Head of Household
- Taxable Income (Excluding This Gain)
- Location
- Advanced options

## How Capital Gains Tax Works

A capital gain occurs when an asset is sold for more than its cost basis. Cost basis generally includes the purchase price plus adjustments such as commissions, fees, reinvested dividends, and certain improvements.

Capital gains are classified as either **short-term** (held one year or less) or **long-term** (held more than one year). The holding period is measured from the day after the asset is acquired through the day it is sold. This distinction matters because short-term gains are taxed at ordinary income rates (10%–37%), while long-term gains receive preferential rates (0%, 15%, or 20%).

You only owe capital gains tax when you _realize_ a gain by selling the asset. Unrealized gains (paper profits on assets you still hold) are not taxed.

## 2026 Federal Capital Gains Tax Rates

### Long-Term Capital Gains Rates

Long-term capital gains are taxed at preferential federal rates that depend on your taxable income and filing status:

| Rate | Single | Married Filing Jointly | Head of Household |
| --- | --- | --- | --- |
| **0%** | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| **15%** | $49,451 – $545,500 | $98,901 – $613,700 | $66,201 – $579,600 |
| **20%** | Over $545,500 | Over $613,700 | Over $579,600 |

### Short-Term Capital Gains Rates

Short-term capital gains are taxed as ordinary income. The 2026 federal income tax brackets range from **10% to 37%**, depending on your total taxable income and filing status.

### Net Investment Income Tax (NIIT)

An additional **3.8% Net Investment Income Tax** may apply when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married filing jointly. The tax applies to the lesser of net investment income or the amount by which income exceeds the threshold.

## State and Local Capital Gains Taxes

Most states tax capital gains as ordinary income. State tax rates vary widely, from 0% in states like Texas, Florida, and Nevada to potentially over 13% in California for high earners. Eight states have no broad income tax: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, and Wyoming.

## Capital Gains Tax by Asset Type

### Stocks and ETFs

When you sell stocks or ETFs at a profit, the gain is taxed as a short-term or long-term capital gain depending on how long you held the shares. Your cost basis includes the purchase price plus any commissions or fees.

### Cryptocurrency

The IRS treats qualifying cryptocurrency as property. Selling, trading, or spending crypto triggers a taxable event. The same short-term and long-term capital gains rules apply as with stocks.

### Primary Residence

If you sell your primary residence, you may exclude up to **$250,000** of gain (**$500,000** for married filing jointly) under the Section 121 exclusion, provided you owned and lived in the home for at least 2 of the last 5 years.

### Rental and Investment Property

When selling rental or investment property held for more than one year, the gain is divided into two components: any previously claimed depreciation is subject to unrecaptured Section 1250 recapture, taxed at a max federal rate of 25%, and the remaining gain is taxed at standard long-term capital gains rates (0%, 15%, or 20%).

### Collectibles

Long-term gains on collectibles are taxed at a maximum federal rate of 28% under IRC §1(h)(4). Short-term collectibles gains are taxed at ordinary income rates.

## Strategies to Manage Capital Gains Taxes

- **Hold for more than one year.** Long-term capital gains rates are significantly lower than short-term rates.
- **Harvest tax losses.** Selling investments at a loss can offset capital gains dollar-for-dollar.
- **Use tax-advantaged accounts.** Holding investments in IRAs or 401(k)s defers or eliminates capital gains taxes on trades within the account.

## Capital Gains Tax Examples

### Example 1: Selling Vested RSUs (Single Filer, California)

**Scenario:** A senior engineer sells $400,000 worth of shares, realizing a $250,000 long-term capital gain.

| Layer | How it’s calculated | Tax |
| --- | --- | --- |
| Federal LTCG | Falls entirely within the 15% LTCG bracket. | **$37,500** |
| NIIT | 3.8% on the lesser of net investment income or excess over $200K. | **$9,500** |
| California | Pushes through the 9.3%, 10.3%, and 11.3% brackets. | **$24,478** |
| **Estimated total tax** | **$71,478** |

### Example 2: Large Concentrated Position (MFJ, Washington State)

**Scenario:** A couple sells a $1.3M long-term gain.

| Layer | How it’s calculated | Tax |
| --- | --- | --- |
| Federal LTCG | Stacks on top of salary. | **$246,815** |
| NIIT | 3.8% on the full $1.3M of net investment income. | **$49,400** |
| Washington | Imposes a capital gains excise tax. | **$72,178** |
| **Estimated total tax** | **$368,393** |

### Example 3: Home Sale with Section 121 Exclusion (MFJ, New York City)

**Scenario:** A couple sells their apartment for a $750,000 gain.

| Layer | How it’s calculated | Tax |
| --- | --- | --- |
| Section 121 exclusion | Taxable gain: $750,000 − $500,000 = **$250,000**. | — |
| Federal LTCG | Stacks through NY’s progressive brackets. | **$39,315** |
| New York State | Stacks on top of salary through progressive brackets. | **$17,125** |
| New York City | Additional progressive city income tax. | **$9,690** |
| **Estimated total tax** | **$75,630** |

## Frequently Asked Questions

**What is capital gains tax?**  
Capital gains tax is the tax you pay on the profit from selling an investment or asset.

**How do I calculate capital gains tax?**  
To calculate capital gains tax: (1) Determine your gain by subtracting your cost basis from the sale price. (2) Determine whether the gain is short-term or long-term. (3) Apply the appropriate tax rate based on your income and filing status.

**Do I pay capital gains tax on my home sale?**  
You may be able to exclude up to $250,000 of gain ($500,000 for married filing jointly) if you owned and used the home as your primary residence for at least 2 of the last 5 years before the sale.
