Capital Gains Tax Calculator.
Know Your Tax Before You Sell.
Calculate short-term and long-term capital gains tax on stocks, real estate, and mutual funds. Supports US federal rates and all 50 states.
Capital Gains Inputs
Enter your investment details and tax information
Tax Calculation Results
Your capital gains tax breakdown
Enter your investment details to calculate capital gains tax
How Capital Gains Tax Works
Capital gains tax is applied to the profit you make when selling investments. The calculation depends on how long you held the investment:
Long-Term Capital Gains (LTCG)
- Asset held for more than 1 year
- Federal rates: 0%, 15%, or 20%
- 0% if taxable income is under $47,025 (single)
- 15% for most middle-income earners
- 20% for high earners above $518,900
Short-Term Capital Gains (STCG)
- Asset held for 1 year or less
- Taxed as ordinary income (10%–37%)
- Day trading taxes apply at ordinary income rates
- Much higher than long-term rates
- Net investment income tax (3.8%) may also apply
Capital Gains Tax Formula
Capital Gain = Sale Price − Cost Basis (Purchase Price + Fees)Your cost basis includes the original purchase price plus any commissions. Use our cost basis calculator approach — enter purchase price, shares, and sale price to get your exact tax liability.
Capital Gains Tax by State (2026)
Most states tax capital gains as ordinary income. A few have no state income tax at all. This is on top of the federal rate.
Highest in the US — no LTCG break
NYC adds up to 3.876% on top
Taxed as ordinary income
No sales tax, but high capital gains
Flat rate; short-term gains at 8.5%
Flat rate on all capital gains
Flat income tax rate
Taxed as ordinary income
Flat rate
Flat rate (reduced 2023)
Graduated income tax
Flat rate
Taxed as ordinary income
Graduated income tax
No state income or capital gains tax
No state income tax
No state income tax
On long-term gains over $262,000
Rates are for 2026. Consult a tax professional for your specific situation.
How to Reduce Capital Gains Tax
Tax-Loss Harvesting
Sell losing positions to offset capital gains. Up to $3,000 of losses can offset ordinary income annually. Unused losses carry forward to future years (capital loss carryforward).
Hold Over 1 Year (LTCG)
Simply holding an asset beyond 12 months drops your rate from ordinary income (up to 37%) to 0–20% long-term capital gains rates — one of the simplest tax strategies.
Use Tax-Advantaged Accounts
Gains inside a Roth IRA or 401(k) are not subject to capital gains tax. Selling within these accounts lets your investments grow tax-free or tax-deferred.
Gift or Donate Appreciated Assets
Gifting appreciated stock to charity avoids capital gains entirely while you get a full market-value deduction. Gifting to family members in lower tax brackets can also reduce the overall tax.
Offset with Capital Losses
Long-term capital losses can offset long-term gains; short-term losses offset short-term gains. You can also use long-term losses to offset short-term gains after netting same-type gains first.
Frequently Asked Questions
What is the capital gains tax rate in California?▾
California taxes capital gains as ordinary income with no preferential long-term rate. The top California capital gains tax rate is 13.3% for income over $1 million. Combined with the 20% federal rate and 3.8% net investment income tax, California residents can pay up to 37.1% on capital gains — the highest effective rate in the US.
Does Florida have a capital gains tax?▾
No. Florida has no state income tax and therefore no state capital gains tax. Florida residents only pay the federal capital gains tax rate (0%, 15%, or 20% for long-term gains). This makes Florida one of the most tax-efficient states for investors.
What is the capital gains tax in Texas?▾
Texas has no state income tax and no capital gains tax at the state level. Texas investors pay only federal capital gains rates. Combined with no estate tax, Texas is one of the most investor-friendly states for capital gains.
How much is capital gains tax in New York?▾
New York taxes capital gains as ordinary income at state rates up to 10.9%. New York City residents pay an additional 3.876% city tax. Combined with federal rates, NYC residents can pay up to 34.7% on long-term capital gains and up to 54.7% on short-term gains.
Why are capital losses limited to $3,000?▾
The IRS limits the deduction of net capital losses against ordinary income to $3,000 per year ($1,500 if married filing separately). This cap has been in place since 1978. Losses exceeding $3,000 carry forward indefinitely (capital loss carryforward) and can be used in future tax years to offset gains or ordinary income.
Can long-term capital losses offset short-term gains?▾
Yes, but in a specific order. First, long-term losses offset long-term gains; short-term losses offset short-term gains. If there is still a net loss in one category, it can then offset gains in the other category. This netting process is done on Schedule D of your federal tax return.
What is tax-loss harvesting?▾
Tax-loss harvesting is selling investments at a loss to offset capital gains tax on profitable sales. For example, if you have $10,000 in gains from selling Stock A, you can sell Stock B at a $10,000 loss to bring your net gain to zero. Be aware of the wash-sale rule — you can't repurchase a substantially identical security within 30 days before or after the sale.
What is the capital gains tax on real estate?▾
For primary residences, you can exclude up to $250,000 of capital gains ($500,000 for married filing jointly) from tax if you owned and lived in the home for at least 2 of the last 5 years. Gains above that exclusion are taxed at long-term capital gains rates. Rental properties don't qualify for this exclusion and are also subject to depreciation recapture at 25%.