Capital Gains Tax Calculator — Free 2025 Long & Short Term Capital Gains Calculator | AllInOneTools
📈 Free Finance Tool

Capital Gains Tax Calculator

Calculate long-term and short-term capital gains tax on stocks, real estate, crypto, and other investments. Accurate 2025 IRS rates with NIIT calculation and long-term vs short-term comparison.

$
$
$
%
Total Capital Gains Tax
$3,750
on $25,000 long-term gain (Single, $75,000 income)
Federal CG Tax
$3,750
CG Tax Rate
15%
NIIT (3.8%)
$0
After-Tax Proceeds
$31,250
💰 Tax Breakdown
Sale Price$35,000
Cost Basis$10,000
Capital Gain$25,000
Federal Tax Rate15%
Federal Tax$3,750
NIIT (3.8%)$0
State Tax$0
Total Tax$3,750
⚖ Long-Term vs Short-Term Comparison
🟢 Long-Term (over 1 year)
$3,750
15% rate. You keep $31,250.
🔴 Short-Term (under 1 year)
$5,500
22% rate. You keep $29,500.

Capital Gains Tax Explained: How Investment Profits Are Taxed in the United States

Capital gains tax is levied on the profit from selling an asset that has increased in value. Whether you are selling stocks, real estate, cryptocurrency, or a business, understanding how capital gains are taxed can save you thousands of dollars through informed timing and strategic planning. The US tax code draws a critical distinction between short-term and long-term capital gains, with dramatically different tax rates that make the holding period one of the most consequential factors in investment returns.

Short-Term vs Long-Term Capital Gains

The IRS defines the holding period threshold at one year. Assets held for one year or less generate short-term capital gains, which are taxed at your ordinary income tax rate (10% to 37% depending on your bracket). Assets held for more than one year generate long-term capital gains, which are taxed at preferential rates of 0%, 15%, or 20%. This differential is enormous: on a $50,000 gain, a taxpayer in the 32% bracket would owe $16,000 in short-term tax but only $7,500 in long-term tax — a difference of $8,500 simply by holding the investment for one additional day beyond the one-year mark.

2025 Long-Term Capital Gains Brackets

Single Filer:
0%: Taxable income up to $48,350
15%: $48,351 – $533,400
20%: Over $533,400

Married Filing Jointly:
0%: Taxable income up to $96,700
15%: $96,701 – $600,050
20%: Over $600,050

Head of Household:
0%: Taxable income up to $64,750
15%: $64,751 – $566,700
20%: Over $566,700

+ 3.8% NIIT if MAGI exceeds $200K (single) or $250K (MFJ)

The 0% rate is particularly powerful for strategic tax planning. A married couple with $80,000 in taxable income (after deductions) could realize up to $16,700 in long-term capital gains completely tax-free, because their total taxable income including gains would stay below the $96,700 threshold. This is an exceptional opportunity for retirees or taxpayers with lower-income years.

The Net Investment Income Tax (NIIT)

High earners face an additional 3.8% surtax on investment income under the Net Investment Income Tax, enacted as part of the Affordable Care Act. The NIIT applies when modified adjusted gross income (MAGI) exceeds $200,000 for single filers or $250,000 for married couples filing jointly. It covers capital gains, dividends, interest, rental income, and other passive investment income. Importantly, these thresholds are not adjusted for inflation, meaning more taxpayers fall under NIIT each year as incomes rise. The maximum effective federal rate on long-term capital gains is therefore 23.8% (20% + 3.8% NIIT).

Strategies to Minimize Capital Gains Tax
Hold investments over 1 year to qualify for long-term rates (potential 50%+ tax reduction). Use tax-loss harvesting: sell losing investments to offset gains dollar-for-dollar, then deduct up to $3,000 of net losses against ordinary income. Maximize retirement account contributions (gains inside 401k/IRA grow tax-deferred). Consider donating appreciated assets to charity (you get a deduction for fair market value and avoid the capital gain entirely). Time asset sales for years when your income is lower to potentially qualify for the 0% long-term rate.

Real Estate Capital Gains

Real estate sales have special rules. If you sell your primary residence, you can exclude up to $250,000 of gain ($500,000 for married couples filing jointly) under the Section 121 exclusion, provided you owned and lived in the home for at least 2 of the last 5 years. This is one of the most valuable tax breaks in the entire code. A couple who bought a home for $300,000 and sells it for $750,000 would exclude the entire $450,000 gain from taxation. Investment properties do not qualify for this exclusion but may benefit from a 1031 like-kind exchange, which allows deferring capital gains tax by reinvesting proceeds into a similar property.

Wash Sale Rule
If you sell a security at a loss and repurchase a substantially identical security within 30 days before or after the sale, the loss is disallowed under the wash sale rule. The disallowed loss is added to the cost basis of the replacement shares. This rule prevents investors from claiming a tax loss while maintaining the same investment position. Note: the wash sale rule currently applies to stocks and securities but the IRS has signaled potential expansion to cryptocurrency.

Cryptocurrency Capital Gains

The IRS treats cryptocurrency as property, meaning every sale, swap, or use for purchases triggers a capital gain or loss event. Short-term crypto gains (held under one year) are taxed as ordinary income, while long-term gains benefit from the preferential 0%/15%/20% rates. Crypto-to-crypto trades (e.g., converting Bitcoin to Ethereum) are taxable events — you must calculate the gain on the crypto you disposed of. The complexities of tracking cost basis across multiple wallets, exchanges, and DeFi protocols make crypto tax compliance particularly challenging. Tax software like CoinTracker or Koinly can help automate this process.

Capital Losses: Your Tax Offset Tool

Capital losses are the mirror image of capital gains and serve as a powerful tax planning tool. Losses first offset gains of the same type (short-term losses offset short-term gains; long-term losses offset long-term gains). Any remaining net losses then offset gains of the opposite type. If net losses still exceed net gains after this netting process, you can deduct up to $3,000 ($1,500 for married filing separately) against ordinary income per year. Any unused losses carry forward indefinitely to future tax years — they never expire. Strategic loss harvesting near year-end is one of the most reliable ways to reduce your overall tax burden.

Frequently Asked Questions

What are the 2025 long-term capital gains rates?
0%, 15%, or 20% depending on taxable income. Single: 0% up to $48,350, 15% up to $533,400, 20% above. MFJ: 0% up to $96,700, 15% up to $600,050, 20% above. Plus 3.8% NIIT for high earners (MAGI over $200K single / $250K MFJ).
How is short-term capital gains tax calculated?
Short-term gains (assets held 1 year or less) are taxed as ordinary income at rates from 10% to 37%. The gain is added to your regular income and taxed at your marginal rate. There is no preferential rate for short-term gains.
What is the NIIT and does it apply to me?
The Net Investment Income Tax is an additional 3.8% on investment income when MAGI exceeds $200,000 (single) or $250,000 (MFJ). These thresholds are NOT inflation-adjusted. It covers capital gains, dividends, interest, and rental income. Maximum federal rate with NIIT: 23.8% long-term, 40.8% short-term.
Can I offset gains with losses?
Yes. Capital losses first offset gains of the same type, then opposite type. Net losses exceeding gains can offset up to $3,000 of ordinary income per year ($1,500 MFS). Unused losses carry forward indefinitely. This makes tax-loss harvesting a powerful year-end strategy.
How is real estate taxed?
Primary residence: exclude up to $250K gain ($500K MFJ) if you owned and lived there 2+ of last 5 years. Investment property: taxed at standard capital gains rates, but can defer using 1031 exchange. Depreciation recapture is taxed at 25% maximum rate on the portion attributable to prior depreciation deductions.
How is crypto taxed?
Crypto is treated as property. Short-term gains taxed as ordinary income, long-term gains at 0%/15%/20%. Every sale, swap, or purchase is a taxable event. Crypto-to-crypto trades are taxable. Use tax software to track cost basis across exchanges and wallets.