What the sale costs you.
Federal capital gains tax on a sale, at long-term preferential rates or ordinary rates for assets held a year or less.
Federal rates and thresholds from IRS Revenue Procedure 2025-32 for the 2026 tax year.
| Sale proceeds | $120,000 |
| Cost basis | −$70,000 |
| Capital gain | $50,000 |
| Federal tax on gain | −$7,500 |
| Net after federal tax | $112,500 |
Excludes the 3.8% net investment income tax, state capital gains tax, wash-sale rules, carried-forward losses and the primary-residence exclusion.
The one-year line that moves the bill
Capital gains tax turns on a single date. Sell an asset you have held for a year or less and the gain is short-term, taxed at your ordinary income rate — up to 37% federally. Hold it a day past the anniversary and the same gain becomes long-term, taxed at 0%, 15% or 20%. On a $50,000 gain that timing is often worth five figures.
The long-term rates are not brackets on the gain alone; the gain stacks on top of your other taxable income. A modest earner can have part of a gain fall in the 0% band and the rest in the 15% band. This is why two people with identical gains and different salaries owe very different amounts, and why realising gains in a low-income year is a standard planning move.
Your cost basis is the lever most people get wrong. Basis includes commissions, reinvested dividends and improvements to real property — every dollar of basis you can document is a dollar of gain you do not pay tax on. Losses matter too: capital losses offset gains dollar for dollar, and up to $3,000 of excess loss offsets ordinary income each year, with the remainder carried forward indefinitely.
Two charges sit outside this estimate. High earners may owe the 3.8% net investment income tax above $200,000 single or $250,000 joint, and most states tax capital gains as ordinary income with no preferential rate at all.
Common questions
Does selling my house work this way?
Partly. A primary residence you owned and lived in for two of the last five years qualifies for an exclusion of $250,000 of gain single, $500,000 joint. Only the excess is taxed as shown here.
What if I sold at a loss?
The loss offsets other capital gains first, then up to $3,000 of ordinary income per year. Anything left carries forward to future years.
Do retirement accounts trigger this?
No. Sales inside a 401(k), IRA or similar account generate no capital gains tax; withdrawals from traditional accounts are taxed as ordinary income instead.
Sources & method
Long-term gains on assets held more than a year are taxed at 0%, 15% or 20% depending on total taxable income; short-term gains are taxed as ordinary income.
Taxable income is other income less the standard deduction, with the gain stacked on top — so a gain can straddle two preferential-rate bands.
The 3.8% net investment income tax and state capital gains tax are not included.
The Index
Every calculator is built the same way: real 2026 figures, method printed at the foot of the page.