Capital Gains Tax Calculator 2026
Last verified: May 2026 · IRS Schedule D
Calculate your federal and state capital gains tax on the sale of stocks, real estate, crypto, or any investment. See how holding period changes your tax bill.
Total Capital Gains Tax
$14,000
Capital Gain
$70,000
Federal Tax
$10,500
Effective Rate
15.0%
Net Proceeds
$56,000
Sale Proceeds Breakdown
Short-Term vs Long-Term Federal Tax
2026 Long-Term Capital Gains Rates
| Rate | Single | Married Filing Jointly |
|---|---|---|
| 0% | Up to $47,025 | Up to $94,050 |
| 15% | $47,026–$518,900 | $94,051–$583,750 |
| 20% | Over $518,900 | Over $583,750 |
Start Investing Today
* Partner links. CalcProLabs may earn a referral fee at no cost to you.
Related Calculators
This tool is for educational purposes only and does not constitute financial, tax, or investment advice. Consult a qualified financial professional for advice specific to your situation.
Analysis & insights
Your fed tax is $10,500, based on the inputs above. Tax outcomes drive the math behind nearly every other financial decision — savings rate, affordability, retirement.
Calculation summary
Result derived from 6 inputs. Adjust any one to test sensitivity.
Risk & benchmark gauge
Current band
Low
Fed Tax: $10,500
Industry benchmarks
- Gain$70,000
- Fed Tax$10,500
- Niit0.000
- State Tax$3,500
- Total Tax$14,000
- Net Proceeds$56,000
Key insights
Pre-tax contributions reduce taxable income
Every dollar to 401(k), HSA, or traditional IRA reduces taxable income at your marginal bracket — typically 12-32% federal.
Sensitivity testing
Adjust each input by ±10% to find the most impactful variable — that's the one to focus your real-world decisions on.
Recommended actions(4)
Test the realistic range of each input
High priorityTry the lowest and highest realistic value for each input. The spread of results is the range you should actually plan for — point estimates lie.
Impact: Reveals which inputs matter most and where uncertainty hides.
Compare against published benchmarks
Medium priorityWhatever you're calculating, there's likely an industry benchmark for it. Google "[topic] average" or "[topic] median" to sanity-check the result.
Save or download a copy
Medium priorityFor calculators that offer it, use "Download report (PDF)" to keep a snapshot. Otherwise screenshot the inputs + result before navigating away.
What is Capital Gains Tax?
Capital gains tax is charged on profit from selling an asset, not on the sale itself. Sell something for $50,000 that cost you $40,000 and the taxable event is the $10,000 of gain — the return of your original $40,000 is not income and is never taxed.
The single most consequential rule is the holding period. Assets held more than one year qualify for long-term rates, which run 0%, 15% or 20%. Held a year or less, the gain is short-term and taxed as ordinary income at rates reaching 37%. For a higher-rate taxpayer, selling one day early can cost 17 percentage points on the entire gain.
The second thing worth internalising is that a gain is only taxed when realised. An investment that has quadrupled on paper creates no tax liability until you sell, which is why the timing of a sale is one of the few genuine levers an ordinary investor controls.
The formula — how to calculate Capital Gains Tax
- Cost basis
- = what you paid plus anything that added to it — commissions, capital improvements, reinvested dividends
- Holding period
- = more than one year is long-term; one year or less is short-term
- Applicable rate
- = long-term uses its own 0/15/20% schedule; short-term uses your ordinary bracket
Long-term capital gains sit on a separate rate schedule from ordinary income, but your ordinary income determines which capital gains band you land in. The two interact even though they are taxed differently.
Step-by-step example
- 01You bought shares for $40,000 including commission and sell for $70,000, having held them 18 months. Your other taxable income is $80,000, filing single.
- 02Gain: $70,000 − $40,000 = $30,000. Held over a year, so long-term.
- 03For 2026 single filers, the 0% band runs to $49,450 of taxable income and 15% applies from there to $545,500.
- 04Your ordinary taxable income of $80,000 already exceeds the 0% ceiling, so the whole gain falls in the 15% band.
- 05Federal capital gains tax: $30,000 × 15% = $4,500. State tax would be additional.
- 06Now suppose you had sold at 11 months instead. The gain becomes short-term and is taxed as ordinary income — at $80,000 that is the 22% bracket, so $30,000 × 22% = $6,600.
- 07One month of patience is worth $2,100 on this trade, and the difference widens sharply at higher incomes.
The 2026 rate schedules
Long-term gains have their own thresholds, which are not the same numbers as the ordinary income brackets. This surprises people who assume there is one set of bands.
2026 long-term capital gains thresholds (taxable income)
| Rate | Single | Married filing jointly | Head of household |
|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| 15% | To $545,500 | To $613,700 | To $579,600 |
| 20% | Above $545,500 | Above $613,700 | Above $579,600 |
Per IRS Rev. Proc. 2025-32. A 3.8% Net Investment Income Tax applies on top for income above $200,000 single or $250,000 joint — thresholds fixed in statute and never inflation-adjusted, so more people cross them each year.
The 0% band is real and widely missed
A married couple with taxable income under $98,900 pays nothing federally on long-term gains. Retirees between finishing work and starting Social Security often have a window of low taxable income where gains can be realised at 0% — sometimes called tax gain harvesting. It is the mirror image of loss harvesting and rather less well known.
Cost basis is where most errors live
Understating your basis means overpaying tax, and basis is easy to understate because it accumulates over years.
For shares, basis includes purchase commissions and — critically — reinvested dividends. Every reinvested dividend was already taxed as income in the year received, so it adds to your basis. Investors who ignore this pay tax twice on the same money, and over a decade of reinvestment the error can be substantial.
For property, basis includes the purchase price, closing costs and capital improvements — a new roof, an extension, a replaced heating system. Routine repairs do not count. Keeping receipts for improvements over decades is tedious and is exactly what reduces the eventual bill.
Inherited assets receive a step-up in basis to market value at the date of death, which frequently eliminates decades of accumulated gain entirely. Gifted assets do not — the recipient inherits the giver's original basis, which is why gifting an appreciated asset transfers the tax liability along with it.
- FIFO —
- the default for shares — the oldest lots are treated as sold first, which often means the largest gains.
- Specific identification —
- you may instead nominate which lots to sell, allowing you to choose high-basis shares and reduce the gain. Must be done at the time of sale.
- Wash sale rule —
- a loss is disallowed if you buy a substantially identical security within 30 days before or after the sale. The loss is not lost — it is added to the basis of the replacement.
Losses, and how they offset
Capital losses offset capital gains, and the ordering is set by law rather than by choice. Short-term losses first offset short-term gains, long-term losses offset long-term gains, and any remainder crosses over.
If losses exceed gains, up to $3,000 of net loss can be deducted against ordinary income each year — a figure that has not been indexed for inflation since 1978 and is now worth a fraction of its original value in real terms.
Losses beyond that carry forward indefinitely. Someone who realised a large loss can offset gains for many years afterwards, which is a genuine asset even though it appears nowhere on a balance sheet.
Tax loss harvesting deliberately realises losses to offset gains, then reinvests in something similar but not substantially identical to stay outside the wash sale rule. Done well it defers tax; done carelessly it triggers the disallowance and achieves nothing.
The main residence exclusion
Selling your home is the largest capital gains exemption most people ever use. Up to $250,000 of gain is excluded for a single filer and $500,000 for a married couple filing jointly.
The conditions are ownership and use: you must have owned the property and lived in it as your main residence for at least two of the five years before the sale. The two years need not be continuous, and the exclusion can generally be used once every two years.
Partial exclusions exist for sales forced by a change of employment, health, or certain unforeseen circumstances, prorated by the fraction of the two-year requirement met.
Gain above the exclusion is taxable at long-term rates. Depreciation claimed while the property was rented is recaptured separately and taxed at up to 25%, which catches out owners who let a property before selling it.
Key considerations
- Hold more than one year where you can — the rate difference is often 10–17 points.
- Track cost basis carefully, including reinvested dividends and property improvements.
- Use specific identification to sell high-basis lots when it suits you.
- Check whether your taxable income falls in the 0% band before assuming tax is due.
- Watch the 30-day window either side of a sale to avoid a wash sale.
- Remember the 3.8% NIIT above $200,000 single or $250,000 joint.
- Inherited assets get a stepped-up basis; gifted assets carry the giver's basis.
- Most states tax capital gains as ordinary income, with no preferential rate.
Common mistakes to avoid
- Selling days before the one-year mark and converting a 15% rate into 22% or higher.
- Omitting reinvested dividends from basis and paying tax twice on the same money.
- Repurchasing within 30 days and having a harvested loss disallowed.
- Assuming long-term thresholds match the ordinary income brackets — they are separate schedules.
- Forgetting depreciation recapture on a property that was once rented.
- Overlooking the 0% band, which applies to more households than expected.
- Ignoring state tax, which frequently applies at full ordinary rates.
Frequently asked questions
Sources & references
Written and fact-checked by the CalcProLabs Editorial Team against IRS Rev. Proc. 2025-32 and Schedule D. Read our calculation methodology and editorial policy.
Last updated