US Capital Gains Tax Calculator
The federal tax one sale really adds to your year, with every rate band shown.
Tax year 2026 US federal tax · IRS brackets and thresholds · Sources
The gain
| Item | Amount |
|---|
Your federal tax for the year, without and with the sale
Rules used and official sources
Long-term capital gains rates, tax year 2026
| Filing status | 0% up to | 15% up to | NIIT above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $200,000 |
| Married filing jointly, qualifying surviving spouse | $98,900 | $613,700 | $250,000 |
| Married filing separately | $49,450 | $306,850 | $125,000 |
| Head of household | $66,200 | $579,600 | $200,000 |
Taxable income, gains included. Above the 15% amount: 20%. Collectibles: at most 28%; unrecaptured section 1250 gain: at most 25%.
- IRS Rev. Proc. 2025-32 — tax rate tables, capital gains rate amounts and standard deduction for tax year 2026
- IRS Topic 409 — capital gains and losses, holding period, $3,000 loss limit, 28% and 25% rates
- IRS Instructions for Schedule D — Schedule D Tax Worksheet, 28% rate gain and unrecaptured section 1250 gain worksheets
- IRS Topic 559 — Net Investment Income Tax
- IRS Publication 523 — selling your home ($250,000 / $500,000 exclusion)
- IRS Publication 544 — holding period, inherited property, section 1231 gains and losses
- IRS Publication 915 — taxable part of Social Security benefits (Worksheet 1)
- IRS Schedule 1-A (Form 1040) — enhanced deduction for seniors
Tax rules and rates change. This calculator follows the rules described on this page and may not cover every situation. Check the official source or a qualified tax professional before filing or invoicing.
About the US Capital Gains Tax Calculator
Selling shares, funds, crypto, a rental, your home or a collectible creates a capital gain or loss, and the US federal tax on it depends on how long you held it, what it is and the rest of your income: a long-term gain is stacked on top of your other taxable income and taxed at 0%, 15% or 20%, a short-term gain at your ordinary rates. This calculator classifies the sale, works out the gain from your cost basis and costs, and then computes your federal return twice — without the sale and with it — so the difference is the tax the sale really adds.
It follows the IRS worksheets line by line: the Schedule D Tax Worksheet with the 28% rate for collectibles and the 25% maximum on unrecaptured section 1250 gain (depreciation on real estate), the 3.8% Net Investment Income Tax, the $3,000 net capital loss limit with the carryover to next year, the $250,000 / $500,000 home-sale exclusion, the standard deduction with the extra amounts at 65, the senior deduction, and the taxable part of Social Security benefits, which a gain can raise. The tax year whose brackets it uses is shown in the calculator; nothing you enter leaves your browser.
How to use it
- Choose what you sold and how you got it (bought, inherited or a gift), then enter the purchase and sale dates. Inherited property is always long-term.
- Enter the sale price, your selling costs (commissions, closing costs) and your cost basis — what you paid plus buying costs. For real estate add improvements and the depreciation you took; for your home, check the exclusion.
- Choose your filing status and enter your other income for the year (wages, interest, pensions, IRA withdrawals), any Social Security benefits (the whole amount: the calculator works out the taxable part) and your deduction. Tick 65 or older or blind where it applies.
- Open Other investment income to add qualified dividends, other gains and losses of the year, loss carryovers and the investment income that counts for the 3.8% NIIT.
- Read the federal tax due to the sale and the share of your gain it takes. The tables show how the gain was worked out and your whole year without and with the sale; copy the summary or download the CSV.
Examples
Single · $90,000 wages · standard deduction
Long-term gain $18,000 · federal tax $2,700 (15% of the gain)
Taxable income without the sale is $73,900, above the $49,450 top of the 0% band, so the whole gain falls in the 15% band.
Sale planned for August 14, 2026
Short-term · $3,960 (22%) · long-term from January 6, 2027 — about $1,260 less
Married filing jointly · standard deduction
Federal tax on the gain: $0
The $35,500 standard deduction and the $12,000 senior deduction leave $52,500 of taxable income, all of it gain inside the $98,900 zero-rate band.
Single · standard deduction
Federal tax due to the sale: $1,869, although the gain itself falls in the 0% band
The gain raises the taxable part of the benefits from $9,600 to $25,500 (85% of $30,000), and that is taxed at 10% and 12%.
Single
$15,000 at 15% + $3,040 NIIT (3.8% of the $80,000 above $200,000) = $18,040
Married filing jointly · $150,000 wages · $500,000 exclusion
Gain $590,000 · $90,000 taxable · $13,500 federal tax
Single
Collectibles at 28%: $14,000 + $1,900 NIIT = $15,900
Short-term or long-term?
An asset held more than one year gives a long-term gain or loss; one held a year or less, a short-term one. Count from the day after you bought it up to and including the day you sold it (IRS Topic 409): shares bought on June 17 of one year and sold on June 17 of the next are short-term; sold on June 18, long-term. For shares and other securities use the trade dates, not the settlement dates (Pub 550). The calculator shows the first long-term date and, for a planned sale, what waiting would save.
- Inherited property is always long-term, whatever the holding period, and its basis is generally the fair market value at the date of death (Pub 544, Pub 551).
- Gifts: when your basis is the giver’s basis, your holding period starts when theirs did, so enter the giver’s purchase date and cost.
- Short-term gains have no special rate: they are added to your ordinary income.
Long-term rates: 0%, 15% and 20%
The thresholds apply to taxable income including the gain, so a gain fills the 0% band first only if your other taxable income leaves room in it (IRS Rev. Proc. 2025-32, section 4.03):
- 0% while taxable income is at most $49,450 single or married filing separately, $98,900 married filing jointly or qualifying surviving spouse, $66,200 head of household.
- 15% above that, up to $545,500 single, $306,850 married filing separately, $613,700 joint, $579,600 head of household.
- 20% above those amounts.
Qualified dividends share these bands with long-term gains. Collectibles (works of art, rugs, antiques, metals such as gold, silver and platinum bullion, gems, stamps, coins, alcoholic beverages) and the taxable part of section 1202 small-business stock gains are taxed at your ordinary rate but at most 28%; unrecaptured section 1250 gain — the part of a real-estate gain that comes from depreciation — at most 25% (Schedule D instructions).
Net Investment Income Tax (3.8%)
On top of income tax, a 3.8% NIIT applies to the smaller of your net investment income and the amount by which your modified adjusted gross income exceeds $200,000 (single, head of household), $250,000 (married filing jointly, qualifying surviving spouse) or $125,000 (married filing separately). Gains from selling shares, funds and real estate count, as do interest, dividends and rents; wages, the excluded part of a home-sale gain and income from an active business do not (IRS Topic 559). For most people MAGI is their AGI.
Losses: the $3,000 limit and carryover
Short-term and long-term results are netted. If the year ends with a net capital loss, up to $3,000 ($1,500 married filing separately) is deducted from other income and the rest carries forward to later years, keeping its short- or long-term character (Topic 409); the calculator works the carryover out with the IRS Capital Loss Carryover Worksheet. Losses on personal-use property — your home, your car — are not deductible. A loss on shares is disallowed if you buy substantially identical shares within 30 days before or after the sale (a wash sale; Pub 550); the calculator does not check for that.
Selling your home, rental or business property
Main home (Pub 523): you can exclude up to $250,000 of gain, or $500,000 on a joint return when both spouses lived there, if you owned the home and lived in it for at least 2 of the 5 years before the sale (730 days in all) and have not excluded a gain on another home in the 2 years before. A surviving spouse who sells within 2 years of the spouse’s death and has not remarried can also exclude up to $500,000. Depreciation you took for business or rental use after May 6, 1997 cannot be excluded; it is taxed as unrecaptured section 1250 gain.
Owned for less than 2 years, the calculator applies no exclusion: a move for work, health or an unforeseeable event can still give a reduced exclusion — the shortest of your ownership, your residence and the time since your last exclusion, divided by 730 days, times $250,000 (for each spouse on a joint return). The notes show the most it can be for your dates; enter the amount you work out.
Rental and business real estate held more than a year is section 1231 property (Pub 544): a net gain is taxed as a long-term capital gain (the depreciation part at up to 25%), while a net loss is an ordinary loss, deductible in full. Held a year or less, the whole gain or loss is ordinary.
Limitations
- Federal tax only: state and local income taxes on capital gains are not included.
- One sale at a time, with your other gains, losses and dividends of the year entered as totals. Wash sales, installment sales, like-kind exchanges, Opportunity Zone deferrals and section 1202 exclusions are not applied.
- Rental property is assumed to use straight-line depreciation and to have no unrecaptured section 1231 losses from the previous 5 years. Its gain is counted as investment income for the NIIT; property used in an active business you run is not investment income, so the NIIT shown would be too high for it.
- For a home, the part of the gain from nonqualified use (time after 2008 when neither you nor your spouse used it as your main home, apart from the time after you last lived there and the other exceptions in Pub 523) is not split out, and a reduced exclusion depends on days of residence the calculator cannot know: enter the exclusion you qualify for.
- The taxable part of Social Security follows Pub 915 Worksheet 1; lump-sum payments for earlier years (Pub 915 Worksheets 2 to 4) are not modelled.
- The alternative minimum tax, credits, the qualified business income deduction rules and the phase-out of other deductions are not modelled; enter other deductions as one amount.
- Tax is computed from the rate schedules to the cent; the IRS Tax Table used for taxable income under $100,000 works in $50 steps and can differ by a few dollars.
- For a sale in a year whose brackets the calculator does not hold, it uses the latest tax year it has, and says so.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How much tax will I pay on a long-term capital gain?
It depends on your taxable income with the gain included: 0% on the part that falls under the zero-rate amount ($49,450 single, $98,900 married filing jointly), 15% up to $545,500 single or $613,700 joint, and 20% above — plus 3.8% NIIT when your income is above $200,000 single or $250,000 joint. The calculator shows exactly how your gain splits across those bands.
Is it really 0% if my income is low?
Yes. If your taxable income — after the standard deduction and including the gain — stays at or below the zero-rate amount, the long-term gain is taxed at 0%. Only the part that pushes your taxable income above it is taxed at 15%.
Do capital gains push my salary into a higher tax bracket?
No: long-term gains are stacked on top of your ordinary income and taxed at their own rates, so your wages are taxed the same. But the gain raises your adjusted gross income, which can trigger the 3.8% NIIT, make more of your Social Security benefits taxable and reduce income-based deductions such as the senior deduction. The without-and-with comparison includes those effects.
Can a capital gain make my Social Security taxable?
Yes. The IRS adds half your benefits, your other income (gains included) and any tax-exempt interest; above $25,000 ($32,000 married filing jointly) up to 50% of the benefits are taxable, and above $34,000 ($44,000) up to 85% (Pub 915). So a gain taxed at 0% can still raise your tax by making more of your benefits taxable. Enter your total benefits and the calculator includes that effect.
What counts in my cost basis?
What you paid plus buying costs such as commissions, and for real estate the closing costs and capital improvements, minus any depreciation you took. A broker’s Form 1099-B shows the cost or other basis it has on record in box 1e (Form 1099-DA, box 1g, for digital assets). Inherited assets generally get a basis equal to their value at the date of death (Pub 551).
How is crypto taxed?
For US tax purposes digital assets are property, not currency (IRS digital assets): selling, swapping or spending crypto you held as an investment gives a capital gain or loss, short- or long-term by the same one-year rule, figured like shares — choose “Stocks, funds, ETFs, bonds or crypto”.
When do I have to pay the tax?
With your return for the year of the sale, but a large gain may require an estimated tax payment during the year to avoid an underpayment penalty (IRS Topic 409 points to Pub 505).