Capital Gains Tax Calculator
Calculate federal capital gains tax on investment sales. Compare short-term (ordinary income) vs long-term (0%, 15%, 20%) rates.
Enter Your Details
This calculator is for informational and educational purposes only. Results are estimates based on the information you provide and standard financial formulas. This is not financial advice. Consult a qualified financial advisor for decisions specific to your situation. Full Disclaimer
Things to Know
Essential concepts for understanding your results
Short vs Long TermWhat is the difference between short and long-term capital gains?
Short-term (held under 1 year): taxed as ordinary income at your marginal rate (10-37%). Long-term (held over 1 year): taxed at preferential rates of 0%, 15%, or 20% depending on income. For a married couple, the 0% rate applies to taxable income up to $94,050. The difference is massive: selling $50,000 in gains as short-term at the 24% bracket costs $12,000 in tax; as long-term at 15%, only $7,500.
Tax-Loss HarvestingWhat is tax-loss harvesting?
Selling investments at a loss to offset capital gains. If you have $10,000 in gains and $7,000 in losses, you only pay tax on $3,000 net gain. Excess losses above gains can offset up to $3,000 of ordinary income per year, with remaining losses carried forward indefinitely. The wash-sale rule prohibits repurchasing a substantially identical investment within 30 days — buy a similar but not identical fund instead.
Net Investment Income TaxWhat is the 3.8% NIIT surtax?
The Net Investment Income Tax adds 3.8% on investment income (capital gains, dividends, interest, rental income) for taxpayers with MAGI above $200,000 (single) or $250,000 (married). This effectively raises the top long-term capital gains rate to 23.8% (20% + 3.8%). Strategies to minimize: contribute to tax-deferred accounts, time income recognition across years, and use qualified opportunity zone investments.
Avoiding Capital GainsHow can you legally minimize capital gains tax?
Hold investments over 1 year for long-term rates. Use tax-advantaged accounts (401(k), Roth IRA) where gains are deferred or tax-free. Harvest losses to offset gains. Donate appreciated assets to charity — you get a deduction for the full value and pay zero capital gains tax. At death, heirs receive a stepped-up basis, eliminating all unrealized gains. Strategic timing of sales across tax years can keep you in lower brackets.
Understanding Capital Gains Tax
Whether you are looking for a capital gains tax estimator, calculate capital gains tax, how to calculate capital gains tax, capital gains tax formula, capital gains tax returns, or capital gains tax growth — this free capital gains tax calculator provides accurate estimates to help you plan and make informed financial decisions.
Capital gains tax applies whenever you sell an asset for more than you paid for it. This includes stocks, bonds, mutual funds, ETFs, real estate, cryptocurrency, collectibles, and any other investment or property that appreciated in value. The tax rate depends on two factors: how long you held the asset and your total taxable income.
The fundamental distinction: short-term gains (assets held under one year) are taxed at your ordinary income rate (10-37%). Long-term gains (over one year) receive preferential rates: 0%, 15%, or 20%. This massive tax difference — potentially cutting your tax in half — is why buy-and-hold investing is so tax-efficient compared to frequent trading.
Cost basis is what you paid for the asset, including purchase commissions and fees. Your gain = sale price - cost basis. If you bought 100 shares at $50 ($5,000 + $0 commission at a modern broker) and sold at $75 ($7,500), your capital gain is $2,500. If the same shares dropped to $40 ($4,000), you have a $1,000 capital loss — which can offset gains and reduce your tax bill.
2026 Long-Term Capital Gains Tax Brackets
Long-term capital gains are taxed at three rates based on your total taxable income (not just the gain amount):
0% rate — Single: $0-$47,025 | Married Filing Jointly: $0-$94,050
If your total taxable income (including the gain) falls below these thresholds, you pay zero federal tax on long-term gains. This is incredibly powerful for retirees with modest income, early retirees living off savings, or anyone in a low-income year. You can sell appreciated stock completely tax-free up to these limits.
15% rate — Single: $47,026-$518,900 | MFJ: $94,051-$583,750
The vast majority of Americans fall into this bracket. A $10,000 long-term gain at 15% costs $1,500 in federal tax — compared to $2,200-$3,700 if it were short-term in the 22-37% brackets.
20% rate — Single: over $518,900 | MFJ: over $583,750
Only applies to very high earners. Those above $200,000/$250,000 AGI also owe a 3.8% Net Investment Income Tax (NIIT), bringing the effective long-term rate to 23.8% for the highest earners.
Tax-Efficient Investing Strategies
Hold for over one year: The single most impactful tax strategy. Converting a short-term gain (22-37% tax) to a long-term gain (0-15% tax) on a $20,000 profit saves $1,400-$4,400. Mark your calendar when you buy — do not sell before the one-year anniversary unless you have a compelling reason.
Harvest gains at the 0% rate: If your taxable income is below $47,025 (single) or $94,050 (married), you can realize long-term gains tax-free. In retirement or low-income years, deliberately sell appreciated positions up to this threshold, then immediately repurchase (no wash sale rule for gains) — this raises your cost basis to the current price, eliminating future tax on that appreciation.
Use tax-advantaged accounts: Gains inside a 401(k), Traditional IRA, or Roth IRA are not subject to capital gains tax. Roth accounts are the best for high-growth investments — all gains are permanently tax-free. Traditional accounts defer the tax until withdrawal (then taxed as ordinary income). Place your highest-growth, highest-turnover investments in tax-advantaged accounts.
Tax-loss harvesting: Sell losers to offset winners. Net capital losses offset capital gains dollar-for-dollar. Up to $3,000 in excess losses offset ordinary income annually. Carry forward unlimited losses to future years. Combined with buying similar (not identical) replacement investments, you maintain your market position while generating tax deductions.
Donate appreciated stock: Instead of selling stock and donating cash, donate the appreciated shares directly to charity. You receive a deduction for the full market value and avoid paying capital gains tax entirely. On a $10,000 stock with $7,000 in gains: donating the stock saves $1,050 in capital gains tax (15%) compared to selling first. The charity receives the same $10,000 either way.
Capital Gains on Real Estate
Home sales have a powerful exclusion: $250,000 in gains for single filers and $500,000 for married couples are completely tax-free if you have owned and lived in the home for at least 2 of the last 5 years. This means most homeowners pay zero capital gains tax when selling their primary residence.
Example: A couple bought their home for $300,000 and sold for $750,000. Gain: $450,000. Since this is under the $500,000 married exclusion, they pay $0 in capital gains tax. Without the exclusion, the tax would be approximately $67,500 (at 15% long-term rate).
Investment properties do NOT receive this exclusion — all gains are taxable. However, the 1031 exchange allows deferral: sell an investment property and reinvest in a like-kind property within 180 days to defer all capital gains taxes indefinitely. Combined with a step-up in basis at death, the gains can be permanently eliminated.
Depreciation recapture: If you claimed depreciation on a rental property, the depreciation is "recaptured" at sale and taxed at a flat 25% rate. On $50,000 of accumulated depreciation: $12,500 in recapture tax, regardless of your income level. Factor this into your sale proceeds calculation.
Frequently Asked Questions
The Weekly Financial Pulse
Every Monday: rate changes, one money move, calculator spotlight — in under 3 minutes. Free forever.
No spam, ever. Unsubscribe anytime.
FinCalcs AI
Financial guidance powered by AI