Capital Gains Tax Calculator
Federal · 2026 IRS Rates
Enter your purchase price, sale price, and income to calculate capital gains tax.
Capital Gains Tax Owed
$0
0% rate
BreakdownAmount
Cost Basis—
Sale Price—
Capital Gain—
Tax Rate Applied—
NIIT (3.8%)—
Total Tax—
After-Tax Proceeds—
Ad · 300×250
Ad · 728×90
📊
Minimize capital gains with tax-loss harvesting
TurboTax · H&R Block · TaxAct · Expert guidance available
Sponsored — we may earn a commission at no cost to you.
Capital Gains Tax Explained
Capital gains tax is owed when you sell an asset for more than you paid. The rate depends on how long you held it and your total income. Long-term gains (assets held 1+ year) are taxed at preferential rates: 0%, 15%, or 20%. Short-term gains are taxed as ordinary income — your marginal bracket rate.
High earners also owe the 3.8% Net Investment Income Tax (NIIT) on gains if modified AGI exceeds $200K (single) or $250K (MFJ).
2026 Long-Term Rates
0% — income up to $47,025 (single) / $94,050 (MFJ). 15% — up to $518,900 (single) / $583,750 (MFJ). 20% — above those thresholds. Plus 3.8% NIIT if income exceeds $200K/$250K.
Primary Home Exclusion
If selling your primary residence, you can exclude up to $250,000 ($500,000 MFJ) of gain if you've lived there 2 of the last 5 years. Gains above the exclusion are taxed at long-term rates if held 1+ year.
Tax-Loss Harvesting
You can offset capital gains with capital losses. If losses exceed gains, up to $3,000 can be deducted against ordinary income per year. Remaining losses carry forward to future years. This is a core strategy in tax-efficient investing.
Collectibles & Section 1202
Collectibles (art, coins, wine, stamps) have a maximum 28% long-term rate. Qualified Small Business Stock (Section 1202) may qualify for 0% federal rate on up to $10M in gains — one of the most powerful tax breaks for startup investors.
This calculator provides estimates for federal capital gains tax only. State taxes, alternative minimum tax, depreciation recapture on real estate, and other factors may apply. Consult a tax professional for advice specific to your situation.
Frequently Asked Questions
What is capital gains tax?+
Capital gains tax is a federal (and often state) tax on the profit from selling a capital asset — stocks, bonds, real estate, cryptocurrency, collectibles. The gain is the difference between what you paid (cost basis) and what you sold it for. Short-term gains (held under 1 year) are taxed as ordinary income. Long-term gains (held 1+ year) receive preferential rates of 0%, 15%, or 20% depending on your income.
What are the 2026 long-term capital gains tax rates?+
For 2026 (single filers): 0% on gains if taxable income is under $47,025. 15% if income is $47,025–$518,900. 20% if income exceeds $518,900. For married filing jointly: 0% under $94,050. 15% up to $583,750. 20% above that. High earners (AGI above $200K single / $250K MFJ) also owe 3.8% Net Investment Income Tax on top of these rates.
How long do I need to hold an asset for long-term treatment?+
You must hold the asset for more than one year — specifically, more than 365 days (366 in a leap year). The holding period begins the day after you acquire the asset and ends on the day you sell it. If you sell on exactly the one-year anniversary, it's still short-term. Inherited assets are automatically treated as long-term regardless of how long the heir holds them.
Do I owe capital gains tax when I sell my house?+
If the home is your primary residence and you've lived there 2 of the last 5 years, you can exclude up to $250,000 of gain ($500,000 if married). Most homeowners owe nothing. Gains above the exclusion are taxed at long-term rates. Investment properties and rental real estate don't qualify for this exclusion, and depreciation taken during ownership must be "recaptured" at 25% when you sell.
Are cryptocurrency gains subject to capital gains tax?+
Yes. The IRS treats cryptocurrency as property. Every sale, trade, or use of crypto to buy goods/services is a taxable event. Short-term gains (held under 1 year) are taxed as ordinary income. Long-term gains (held 1+ year) qualify for preferential rates. Crypto-to-crypto trades are also taxable. Receiving crypto as payment for services is taxed as ordinary income at the fair market value when received.
What is tax-loss harvesting?+
Tax-loss harvesting is selling investments at a loss to offset capital gains elsewhere in your portfolio. The losses reduce your taxable gains dollar-for-dollar. If losses exceed gains, up to $3,000 can be deducted against ordinary income per year. Any remaining losses carry forward indefinitely to future years. Watch out for the wash-sale rule: you cannot buy substantially identical securities within 30 days before or after the sale and still claim the loss.
What is the Net Investment Income Tax (NIIT)?+
The 3.8% NIIT applies to the lesser of your net investment income or the amount your modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly). Net investment income includes capital gains, dividends, interest, rental income, and passive income. For a high earner with $300K income and $50K in long-term gains, the effective capital gains rate could be 23.8% (20% + 3.8% NIIT).
Can I avoid capital gains tax by gifting assets?+
Gifting an appreciated asset does not trigger capital gains tax for you — but the recipient inherits your cost basis (carryover basis). When they sell, they owe gains based on what you originally paid. However, assets inherited at death receive a "stepped-up" basis to fair market value at the date of death — the built-in gain disappears. This is why holding appreciated assets until death is one of the most powerful estate planning strategies.
What states have no capital gains tax?+
States with no income tax (and therefore no state capital gains tax): Florida, Nevada, Texas, Washington, Wyoming, South Dakota, Alaska, Tennessee, New Hampshire (on wages only). Washington state has a 7% capital gains tax on gains over $250,000 (passed 2021, upheld 2023). Other states tax capital gains as ordinary income at state income tax rates, ranging from 3% (North Dakota) to 13.3% (California, which has some of the highest capital gains taxes in the world).
How do I calculate my cost basis?+
Cost basis is what you paid for the asset plus any commissions or fees. For stocks bought in multiple lots, you can use FIFO (first in, first out, the default), LIFO (last in, first out), specific identification (most tax-efficient), or average cost (for mutual funds). For real estate, cost basis includes purchase price, closing costs, and capital improvements. Correct basis tracking is critical — IRS studies show basis errors are among the most common tax mistakes.