How to use this capital gains tax calculator
- Choose what you sold: stocks and other assets, or a home. Home sales add a checkbox for the main-home exclusion.
- Enter the sale price and your cost basis. Basis is what you paid plus commissions, improvements and reinvested dividends. Add your selling costs, such as commissions or agent fees.
- Pick how long you owned it. More than one year is long-term; one year or less is short-term.
- Enter your other income for 2026 (wages and other ordinary income, before deductions and without this sale) and your filing status. The gain is stacked on top of it.
- Open “More options” to add a state, capital losses to offset, other investment income or itemized deductions.
Capital gains tax rates for 2026
Long-term gains are taxed at 0%, 15% or 20% depending on your total taxable income, which includes the gain itself. Short-term gains are taxed as ordinary income at your regular rate, 10% to 37%; see the 2026 tax brackets. The long-term thresholds for 2026 are below, and the 2026 capital gains rates page has more detail.
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451 to $545,500 | Over $545,500 |
| Married filing jointly | Up to $98,900 | $98,901 to $613,700 | Over $613,700 |
| Married filing separately | Up to $49,450 | $49,451 to $306,850 | Over $306,850 |
| Head of household | Up to $66,200 | $66,201 to $579,600 | Over $579,600 |
Taxable income is measured after deductions. With the $16,100 standard deduction, a single filer could have about $65,550 of total income before any long-term gain is taxed at more than 0%.
How the capital gains tax is calculated
First, the gain is what you received minus what you put in:
Gain G = sale price P − selling costs S − cost basis B
- G
- gain (a negative number is a loss)
- P
- sale price
- S
- selling costs, such as commissions and agent fees
- B
- cost basis: what you paid plus purchase costs, improvements and reinvested dividends
Then the tax on the sale is the difference between your tax with the taxable part of the gain and your tax without it:
Tax on the sale T = Tax(other income I + taxable gain G) − Tax(other income I)
- T
- tax added by the sale, including any net investment income tax
- I
- your other income, after deductions
- G
- taxable gain, after the home-sale exclusion and any capital losses
Worked example
A single filer has $55,000 of other income. Taxable income before the sale is $55,000 − $16,100 standard deduction = $38,900. They sell stock held more than a year for $50,000 that cost $30,000, a gain of $20,000.
The 0% bracket ends at $49,450 of taxable income, so $49,450 − $38,900 = $10,550 of the gain is taxed at 0%. The remaining $9,450 is taxed at 15%: $9,450 × 15% = $1,417.50. Total federal tax on the sale: $1,417.50, or 7.1% of the gain. Modified AGI with the sale is $75,000, below the $200,000 net investment income tax threshold, so no 3.8% tax is added.
Short-term vs. long-term capital gains
The holding period decides which rates apply. An asset held more than one year produces a long-term gain; one year or less produces a short-term gain. The IRS counts from the day after you acquired the asset through the day you sold it. In its own example, property bought on January 31, 2024 and sold on January 29, 2025 is short-term, while the same property sold on February 6, 2025 is long-term.
Here is the same $20,000 gain, taxed both ways for a single filer at different levels of other income:
| Other income | Long-term tax | Short-term tax | Extra tax if short-term |
|---|---|---|---|
| $30,000 | $0 | $2,400 | $2,400 |
| $55,000 | $1,418 | $3,250 | $1,833 |
| $100,000 | $3,000 | $4,400 | $1,400 |
| $200,000 | $3,760 | $5,730 | $1,970 |
Waiting a few weeks to pass the one-year mark can matter a lot, but weigh it against the risk that the price moves while you wait. If you are still choosing investments, the investment calculator shows how returns compound before tax.
How much tax on a $10,000, $50,000 or $100,000 gain?
Federal tax, including the net investment income tax where it applies, on a long-term gain at different levels of other income (standard deduction, no state tax). The percentage is the effective rate on the gain.
| Other income | $10,000 gain | $50,000 gain | $100,000 gain |
|---|---|---|---|
| $30,000 | $0 (0%) | $2,168 (4.3%) | $9,668 (9.7%) |
| $60,000 | $668 (6.7%) | $6,668 (13.3%) | $14,168 (14.2%) |
| $100,000 | $1,500 (15%) | $7,500 (15%) | $15,000 (15%) |
| $200,000 | $1,880 (18.8%) | $9,400 (18.8%) | $18,800 (18.8%) |
| $400,000 | $1,880 (18.8%) | $9,400 (18.8%) | $18,800 (18.8%) |
| Other income | $10,000 gain | $50,000 gain | $100,000 gain |
|---|---|---|---|
| $60,000 | $0 (0%) | $0 (0%) | $4,335 (4.3%) |
| $120,000 | $0 (0%) | $5,835 (11.7%) | $13,335 (13.3%) |
| $250,000 | $1,880 (18.8%) | $9,400 (18.8%) | $18,800 (18.8%) |
| $500,000 | $1,880 (18.8%) | $9,400 (18.8%) | $18,800 (18.8%) |
| $800,000 | $2,380 (23.8%) | $11,900 (23.8%) | $23,800 (23.8%) |
The 3.8% net investment income tax
High earners can owe an extra 3.8% tax on investment income, including capital gains. It applies to the smaller of your net investment income or the amount by which your modified adjusted gross income (MAGI) is over the threshold for your filing status. Gain on the sale of a main home counts only to the extent it is not excluded.
| Filing status | MAGI threshold |
|---|---|
| Single | $200,000 |
| Married filing jointly | $250,000 |
| Married filing separately | $125,000 |
| Head of household | $200,000 |
For a single filer with $600,000 of other income and a $100,000 long-term gain, the calculator shows $20,000 of tax at the 20% rate plus $3,800 of net investment income tax: $23,800 in all, or 23.8% of the gain.
Capital gains tax on selling your home
If you sell your main home, you may be able to exclude part of the gain from income. According to the IRS, you can exclude up to $250,000 of gain, or up to $500,000 if you file a joint return, when you meet these tests:
- Ownership: you owned the home for at least 24 months of the last 5 years before the sale.
- Use: you lived in it as your main home for at least 24 months of the last 5 years. For the joint limit, both spouses must meet the use test, and one of them must meet the ownership test.
- Look-back: you have not excluded gain from another home sale in the 2 years before this one (on a joint return, this applies to each spouse).
| Filing status | Maximum exclusion |
|---|---|
| Single, head of household or married filing separately | $250,000 |
| Married filing jointly | $500,000 |
Your gain is the sale price minus your selling costs minus your adjusted basis, which is what you paid plus improvements. On the example above, a married couple sells for $900,000 with $54,000 of selling costs and a $300,000 basis. The $546,000 gain, less the $500,000 exclusion, leaves $46,000 to tax; on a joint return with $120,000 of other income, that costs about $5,235. A single seller with the same numbers has $296,000 of taxable gain and owes about $52,608.
Two limits to know. A loss on the sale of your own home is not deductible. And the exclusion does not cover depreciation you claimed, or could have claimed, for a home office or rental use after May 6, 1997, or some gain tied to periods after 2008 when the home was not your main home; the IRS also allows a partial exclusion in some cases, such as a job change, health reasons or unforeseen events. This calculator does not model those situations.
Capital losses, the $3,000 limit and the wash-sale rule
Capital losses first offset capital gains. If losses are larger, you can deduct up to $3,000 of the excess against other income each year ($1,500 if married filing separately), and the unused part carries forward to later years, keeping its long-term or short-term character. Enter carried-over losses under “Capital losses to offset” in the calculator. The actual IRS carryover worksheet also looks at your taxable income, so treat the carryforward shown here as an estimate.
The wash-sale rule stops you from claiming a loss when you sell stock or securities and, within 30 days before or after the sale, buy substantially identical stock or securities, acquire a contract or option to buy them, or buy them for your IRA or Roth IRA. A purchase by your spouse or by a corporation you control counts too. The disallowed loss is generally added to the cost of the new shares instead.
How to reduce capital gains tax
- Hold longer than a year. On the example gain, that turns $3,250 of tax into $1,418.
- Harvest losses. Sell losing positions to offset gains, and watch the 30-day wash-sale window before you buy the same investment back.
- Count every cost in your basis. Commissions, reinvested dividends and (for a home) improvements raise your basis and shrink the gain; selling costs reduce the amount you realize.
- Use the 0% bracket. In a year with lower income, part of a long-term gain can be taxed at 0%. With $55,000 of other income, a single filer has room for $10,550 of gain at 0%.
- Use the home-sale exclusion. Live in the home long enough to meet the ownership and use tests before you sell.
To see your whole return, including wages, credits and deductions, use the income tax calculator.
Capital gains on inherited property
The basis of property you inherit is generally its fair market value on the date of the owner’s death (or on the alternate valuation date, if the estate elects it). So the taxable gain when you sell is usually only the growth since then. The IRS also treats gain or loss on inherited property you sell as long-term, no matter how long you held it. To model an inherited sale, enter the date-of-death value as your cost basis and choose “More than 1 year.”
What this calculator does not model
- The alternative minimum tax, and credits or deductions other than the standard or itemized deduction you enter.
- Collectibles (a 28% maximum rate), qualified small business stock (28%) and the 25% maximum rate on unrecaptured section 1250 gain from depreciated real estate.
- Depreciation recapture, installment sales, options, cryptocurrency-specific rules and the wash-sale adjustment itself.
- Partial home-sale exclusions, the surviving-spouse exclusion and nonqualified use of a home.
- Other capital gains you realize the same year (only losses can be entered), and children, age or earned income credits.
- State capital gains rules. The optional state figure taxes the gain like other income under the state’s brackets; some states tax gains differently or separately. See the state income tax rates for 2026.
For a full picture of your bracket, see the 2026 tax brackets and the 2026 standard deduction.
Frequently asked questions
What is the capital gains tax rate for 2026?
For assets held more than one year, the 2026 federal rates are 0%, 15% and 20%, based on your taxable income. A single filer pays 0% up to $49,450, 15% up to $545,500 and 20% above that; married couples filing jointly use $98,900 and $613,700. Assets held one year or less are taxed at ordinary rates, 10% to 37%.
How much tax will I pay when I sell stock?
It depends on how long you held it and on your other income. In our example, a single filer with $55,000 of other income sells stock held over a year for a $20,000 gain and owes about $1,418, or 7.1%, because $10,550 of the gain fits in the 0% bracket. Sold within a year, the same gain would cost $3,250.
How much tax will I pay when I sell my house?
Possibly none. If you owned and lived in the home as your main home for at least 2 of the last 5 years, you can exclude up to $250,000 of gain, or $500,000 on a joint return. In our example, a couple selling with a $546,000 gain has $46,000 left to tax and owes about $5,235. A single seller with the same numbers would owe about $52,608.
What is the difference between short-term and long-term capital gains?
The difference is how long you held the asset. Short-term gains come from assets held one year or less and are taxed like ordinary income. Long-term gains come from assets held more than one year and use the lower 0%, 15% and 20% rates. The IRS counts from the day after you acquired the asset through the day you sold it. On our example gain, that is $3,250 versus $1,418 in federal tax.
Do I owe capital gains tax if I sell at a loss?
No. A loss means no capital gains tax on that sale, and it can offset your other gains. If your losses exceed your gains, you can deduct up to $3,000 of the excess against other income each year ($1,500 if married filing separately) and carry the rest forward. In our example, a $10,000 loss deducts $3,000 now and carries $7,000 forward. Losses on personal-use property, such as your home or car, are not deductible.
What is the net investment income tax on capital gains?
It is an extra 3.8% tax on the smaller of your net investment income or the amount your modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). A single filer with $600,000 of other income and a $100,000 gain owes $3,800 of it on top of $20,000 of capital gains tax.
How can I reduce capital gains tax?
Hold assets more than a year, offset gains with losses, add every eligible cost to your basis, sell in a lower-income year when part of the gain can be taxed at 0%, and use the home-sale exclusion if you qualify. If you sell a stock at a loss and buy the same or substantially identical stock within 30 days before or after, the wash-sale rule disallows the loss for now.
Is inherited property taxed when I sell it?
Only on growth after the owner’s death, in most cases. The basis of inherited property is generally its fair market value on the date of death, so gain is measured from that value rather than from what the person originally paid. The IRS also treats gain or loss on inherited property as long-term regardless of how long you held it. Special elections, such as alternate valuation, can change the basis, so check the estate’s paperwork.