Calcupedia

Capital Gains Tax Calculator

Investing & Markets

Estimate capital gains tax owed on the sale of stocks or other investment assets.

Advertise in this space

Reach visitors on every calculator page, above the fold.

Get in touch →
USD
$0.00$100,000,000.00
USD
$0.00$100,000,000.00
USD
$0.00$100,000,000.00

Estimated Federal Tax Owed

$900.00

Estimated federal capital gains tax, calculated by stacking your taxable gain on top of your other income across the real 2026 IRS brackets for your filing status.

USD

Capital Gain

$6,000.00

Your raw gain before any exclusion: sale price minus cost basis.

Taxable Gain (After Exclusion)

$6,000.00

Your gain after subtracting the primary residence exclusion, if applicable. $0 if the exclusion fully covers your gain.

Share result
Reload calculator
Clear inputs

Found this calculator useful?

From Scratch To $10K/Month In 60 Days

This is a proven money making system that takes students by the hand to make at least $10,000 per month, every month. Students get 12 weeks of guided coaching in addition to the "MPS Super Funnel" and tools.

We value your privacy and promise not to sell or misuse your information. Here's our privacy policy.

Calculator Stats

Odeh Ahwal

Creators

Odeh Ahwal
Reviewed and verifiedThis calculator was reviewed and verified by the Calcupedia due diligence team.

Based on 2 sources

0people find this calculator helpful

Views

Helpful

Saved

Embeds

Like
Share
Embed this calculator
Cite
Save
SwagbucksSponsored
NordVPNSponsored

Capital gains tax is what you owe the IRS on the profit from selling an investment, a stock, a home, or another capital asset, for more than you paid for it. This calculator uses the real 2026 IRS tax brackets for your filing status to estimate what you actually owe, rather than asking you to already know your own tax rate.

How much you owe depends on two things: how long you held the asset, and where your gain lands once it's stacked on top of your other taxable income. Assets held over a year qualify for the lower long-term capital gains rates, 0%, 15%, or 20%. Assets held a year or less are taxed as short-term gains, at your regular income tax rate, which can run as high as 37%.

If you're selling your primary home, a separate rule can exclude up to $250,000 of gain ($500,000 if married filing jointly) from tax entirely. Check that box below if it applies to you.

This calculator estimates federal tax only. Most states also tax capital gains, usually as ordinary income, on top of the federal amount; a handful of states don't tax it at all. It also doesn't cover special cases like collectibles, qualified small business stock, or the net investment income tax, which can apply additional rates for some higher earners.

How Capital Gains Tax Is Actually Calculated

Your capital gain is your sale price minus your cost basis, generally what you originally paid, plus commissions or fees. The tax on that gain isn't a flat percentage of the gain alone: it depends on your other taxable income for the year, because the IRS calculates it by stacking your gain on top of that income.

Example: a single filer with $40,000 in other taxable income sells a stock held for two years, for a $20,000 long-term gain. The 2026 single-filer 0% bracket covers taxable income up to $49,450. Since $40,000 of ordinary income already fills part of that space, only $9,450 of the gain is tax-free; the remaining $10,550 falls into the 15% bracket, for $1,582.50 in tax. A flat-rate estimate would either overstate or understate this, depending on the assumed rate.

  • Enter your sale price and cost basis to get your raw capital gain.
  • Select whether you held the asset over a year (long-term) or a year or less (short-term).
  • Select your filing status and enter your other taxable income for the year, not including this gain.
  • The calculator stacks your gain on top of that income using the real 2026 IRS brackets and shows the tax owed.

2026 Long-Term Capital Gains Tax Brackets

These are the official 2026 thresholds from the IRS, published in Revenue Procedure 2025-32. Your ordinary income fills these brackets first; your long-term gain is then taxed at whatever rate the remaining space falls into, which can span more than one rate if your gain is large.

Filing Status0% Rate15% Rate20% Rate
SingleUp to $49,450$49,451 to $545,500Over $545,500
Married Filing JointlyUp to $98,900$98,901 to $613,700Over $613,700
Married Filing SeparatelyUp to $49,450$49,451 to $306,850Over $306,850
Head of HouseholdUp to $66,200$66,201 to $579,600Over $579,600

Short-term gains skip this table entirely and are taxed at your regular federal income tax rate instead, which has seven brackets from 10% to 37% depending on your filing status and income.

Selling Your Home: The Section 121 Exclusion

If you're selling your primary residence, you may be able to exclude up to $250,000 of the gain from tax entirely (up to $500,000 if you file jointly with your spouse). To qualify, you generally must have owned and lived in the home as your main residence for at least 2 of the 5 years before the sale.

This calculator applies the full exclusion amount when you select the primary residence option, since a partial-eligibility calculation depends on details this calculator doesn't collect. If you're not sure you qualify for the full exclusion, check the ownership and use tests against your actual situation before relying on this result.

State Taxes and What This Calculator Doesn't Cover

This calculator estimates federal tax only. Most states tax capital gains as part of ordinary income, on top of whatever you owe the IRS. A handful of states have no broad income tax and don't tax capital gains either: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, and Wyoming.

Washington is a real exception worth knowing about: it has no general income tax, but it does levy a separate 7% capital gains excise tax on long-term gains above an annually adjusted standard deduction ($278,000 as of 2025, adjusted for inflation each year), with real estate specifically exempted from that tax. If you're in Washington, don't assume gains are untaxed just because there's no state income tax.

This calculator also doesn't model a few real special cases: gains on collectibles or qualified small business stock (capped at a 28% rate rather than the standard long-term rates), unrecaptured Section 1250 real estate depreciation gain (capped at 25%), or the 3.8% net investment income tax that can apply on top of regular capital gains tax for higher earners. If any of these apply to your sale, your actual tax will differ from this estimate.

Frequently Asked Questions

Why does holding period matter for capital gains tax?

In the US, assets held over one year qualify for the lower long-term capital gains rates (0%, 15%, or 20%), while assets held one year or less are taxed at your regular federal income tax rate, which can run as high as 37%, more than double the top long-term rate.

Can capital losses offset capital gains?

Yes. Capital losses generally offset capital gains in the same tax year. If your losses exceed your gains, you can typically deduct up to $3,000 of the excess against ordinary income each year ($1,500 if married filing separately), and carry forward any remaining loss to future tax years.

What is my cost basis if I inherited the asset?

Inherited assets generally get a stepped-up basis, meaning your cost basis resets to the asset's fair market value on the date of the original owner's death, not what they originally paid. This often dramatically reduces or eliminates the taxable gain compared to using their original purchase price.

Should fees and commissions be included in my purchase price?

Yes. Your real cost basis includes the purchase price plus any commissions or fees paid to acquire the asset, and reinvested dividends on stocks and funds. Using just the sticker price understates your basis and overstates your taxable gain.

Is it possible to owe 0% capital gains tax on a real gain?

Yes. If your total taxable income, including the gain, stays under the 0% bracket threshold for your filing status ($49,450 for single filers in 2026), the entire long-term gain is taxed at 0%. This surprises many people since it means a real profit can be entirely tax-free at lower income levels.

Do all states tax capital gains the same way?

No. Most states tax capital gains as ordinary income on top of the federal amount, a few states (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, and Wyoming) don't tax it at all, and Washington has its own separate 7% capital gains excise tax despite having no general income tax. Check your specific state's rules in addition to this federal estimate.

Does this calculator account for the net investment income tax?

No. Higher earners can owe an additional 3.8% net investment income tax on top of regular capital gains tax, which this calculator doesn't include. If your income is high enough to trigger it, your actual tax bill will be higher than this estimate.

Can I defer capital gains tax with a 1031 exchange?

For investment or business real estate, a 1031 exchange lets you defer capital gains tax by rolling the sale proceeds into a similar replacement property instead of cashing out, as long as you follow strict IRS timelines and rules. This calculator estimates the tax on an outright taxable sale; if you're planning a 1031 exchange instead, your actual tax owed this year would be $0 or greatly reduced, not the figure shown here. This option applies to investment property, not your primary residence.

Sources

  1. Revenue Procedure 2025-32 (2026 inflation adjustments), Internal Revenue Service (IRS)
  2. Topic no. 701, Sale of your home, Internal Revenue Service (IRS)

Spot a mistake? Tell us what's wrong.

Don't see what you need?

Request a calculator. The most-requested ones get built first in our monthly batch.

Request a calculator

Want this calculator on your website?

Embed the Capital Gains Tax Calculator on any site — no code needed. Customize colors, remove branding, and track usage.

Embed it free →
Embed on any platform — Next.js, React, Vue.js, PHP, Laravel, Shopify, Wix, Webflow, Squarespace, and more