Capital Gains Tax Calculator (2026) | Federal, State & Local | Cache

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

Ticker Symbol

Shares

Cost / Share

Add another position

Tax Profile

Filing Status

Taxable Income (Excluding This Gain)

Location

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 either 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. Any gain above the exclusion is taxed at capital gains rates.

Rental and Investment Property

When selling rental or investment property held for more than one year, your gain is divided into two components. First, any depreciation previously claimed on the structure is subject to unrecaptured Section 1250 recapture, taxed at a maximum federal rate of 25%. The remaining gain above your original cost basis is taxed at standard long-term capital gains rates (0%, 15%, or 20%, depending on income).

Collectibles

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

Strategies to Manage Capital Gains Taxes

Capital Gains Tax Examples

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

Estimated total tax on the $250K gain: $71,478

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

Estimated total tax on the $1.3M gain: $368,393

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

Estimated total tax on the $250K taxable gain: $75,630

Alternatives to Selling Concentrated Stock

For investors holding large appreciated positions in a single stock, selling outright often means giving up 25–35% of the gain to taxes.

Methodology & Sources

This calculator uses 2026 federal tax brackets and long-term capital gains thresholds from IRS Revenue Procedure 2025-32.

Frequently Asked Questions

  1. What is capital gains tax?

Capital gains tax is the tax on the profit from selling an investment or asset.

  1. How do I calculate capital gains tax?

Determine your gain by subtracting your cost basis from the sale price.

  1. What is the difference between short-term and long-term capital gains?

Short-term gains apply to assets held for one year or less.

  1. Do I pay capital gains tax on my home sale?

You can exclude up to $250,000 of gain ($500,000 for married filing jointly).

  1. How do capital losses offset gains?

Capital losses can offset capital gains of the same type.

  1. Does my state tax capital gains?

Most states tax capital gains as ordinary income.