Sold a stock, a rental, crypto, or any other investment? Find out exactly what the IRS will want from your profit. This calculator separates short-term gains (taxed like your paycheck) from long-term gains (taxed at the friendlier 0%, 15%, or 20% rates) and shows the tax, your take-home profit, and your effective rate.
2025 tax year (filed 2026)
Here's the part that trips most people up: the IRS doesn't tax your whole sale, only your profit — and how long you held the asset changes everything. If you owned it for one year or less, your gain is "short-term" and gets stacked on top of your salary, taxed at your ordinary income rate (anywhere from 10% to 37%). Hold it for more than a year and it becomes a "long-term" gain, which enjoys special lower rates of 0%, 15%, or 20% depending on your total income. That single year of patience can easily cut your tax bill in half.
Long-term rates are also stacked. Your gain sits on top of your other taxable income, and the portion that falls inside each band is taxed at that band's rate. So a modest earner with a big gain might pay 0% on the first slice and 15% on the rest. That's exactly what this calculator models — it doesn't just slap one flat rate on your profit, it walks the gain through the 0/15/20 thresholds the way a tax pro would.
A few things worth knowing before you sell: your "cost basis" is what you paid plus commissions and any reinvested dividends — getting that number right lowers your taxable gain. Selling at a loss isn't all bad either; capital losses offset capital gains dollar-for-dollar, and up to $3,000 of net loss can offset ordinary income each year. And high earners may owe an extra 3.8% Net Investment Income Tax on top of what you see here — this tool covers the core federal capital gains tax, not state tax or the NIIT surcharge.
Held 366+ days? You unlock the 0/15/20% long-term rates. A day short and it's taxed like ordinary income.
Capital losses cancel gains, and up to $3,000 of leftover loss can reduce your regular taxable income.
Cost basis = price paid + fees + reinvested dividends. A higher basis means a smaller taxable gain.
Capital gains are taxed on the profit from selling an asset, and the holding period changes the rate dramatically. Assets held over one year qualify for long-term rates of 0%, 15% or 20% — substantially below ordinary income rates — while anything sold within a year is short-term and taxed as ordinary income. The bracket thresholds work unusually: long-term gains stack on top of your ordinary income, so the same gain can straddle two rates. Cost basis is where most errors live, because it includes purchase price plus commissions plus improvements, and reinvested dividends raise the basis of a fund holding.
Gain = Sale proceeds − Cost basisLong-term (held > 1 year): 0% / 15% / 20% depending on total incomeShort-term (≤ 1 year): taxed at ordinary income ratesGains stack on top of ordinary taxable incomewhere:
Assumptions: Federal only. Net investment income tax adds 3.8% above $200,000 single / $250,000 joint. State treatment varies widely and several states tax gains as ordinary income. Collectibles and depreciation recapture use different rates.
A single filer with $90,000 of salary sells stock held three years at a $40,000 profit.
Result$6,000 tax on the gain — $2,800 less than selling before one year
Had ordinary taxable income been only $30,000, the first $18,350 of gain would have been taxed at 0%, cutting the bill to $3,248. This is why realising gains in a low-income year — between jobs, or early in retirement — is one of the few genuinely large levers in personal tax.