Selling an investment at a profit triggers a capital gains tax; however, the tax amount depends heavily on a factor often overlooked: the asset’s holding period. This capital gains tax calculator estimates your federal tax liability based on the purchase price, sale price, other income, tax filing status, and holding period (more or less than one year). Enter your details below to get an estimate of the tax, the effective tax rate, and the net amount after tax.
How this capital gains tax calculator works
The calculation is based on a simple formula: your capital gain equals the sale price minus the purchase price. From there, tax treatment varies significantly depending on the holding period:
- Long-term (holding period of more than one year): taxed at specific capital gains rates (0%, 15%, or 20%), based on your total taxable income.
- Short-term (holding period of one year or less): taxed as ordinary income at your standard federal tax rate, which can reach up to 37%.
In both cases, the capital gain is added to your other income to determine your tax bracket; this calculator automatically accounts for that aggregation. This method is more accurate than applying a single flat rate to the entire capital gain.
Long-term capital gains tax brackets for 2026
For long-term capital gains in 2026, the following three federal tax rates apply, based on total taxable income:
- 0% — Single: up to $49,450 | Married (filing jointly): up to $98,900
- 15% — Single: $49,451 to $545,500 | Married (filing jointly): $98,901 to $613,700
- 20% — Single: over $545,500 | Married (filing jointly): over $613,700
These thresholds apply to taxable income—that is, your income after subtracting the standard deduction (for 2026: $16,100 for singles, $32,200 for married couples filing jointly)—and not to your gross income.
Example of capital gains tax calculation: long-term capital gain
Below is a detailed calculation example from this capital gains tax calculator for a single person with $100,000 in other income (which, after subtracting the standard deduction, results in taxable income of $83,900) who realizes a long-term capital gain of $50,000:
- The capital gain is added to the ordinary taxable income of $83,900 and falls entirely within the 15% tax bracket (which applies up to an income of $545,500).
- Capital gains tax: $50,000 × 15% = $7,500
- Effective capital gains tax rate: 15%
Example of capital gains tax calculation: short-term gain
Now, using this capital gains tax calculator with the same $50,000 gain and the same additional taxable income of $83,900, but with a holding period of less than one year:
- The capital gain is added to ordinary tax brackets; a portion is taxed at the 22% rate and another at the 24% rate.
- Capital gains tax: approximately $11,564
- Effective capital gains tax rate: approximately 23%
Same gain, same income: however, if the asset had been held for just one day longer (crossing the one-year threshold) in this example, the tax burden would have been more than $4,000 lower. This is the primary tool available to most investors to influence the amount of their capital gains tax.
Real Estate Capital Gains Tax
The sale of a primary residence is subject to the same rules distinguishing between short-term and long-term capital gains, with one important exception: the IRS grants a capital gains tax exemption of up to $250,000 (or $500,000 for married couples filing jointly). To qualify, you must have owned the property and occupied it as your primary residence for at least two of the five years preceding the sale. Thanks to this exemption, many sellers may be completely exempt from capital gains tax. You can find detailed information regarding this specific provision for the sale of primary residences, as well as other real estate-related rules, directly from the IRS.
This exemption does not apply to investment properties or second homes; in these cases, the entire capital gain is subject to tax under the rules applicable to short-term or long-term gains, just like any other asset.
If you wish to estimate your other income for this calculator based on a salary or a specific job offer, our paycheck calculator can help you determine your exact net income and taxable income in advance.
What is the difference between short-term and long-term capital gains?
Long-term gains (assets held over one year) are taxed at 0%, 15%, or 20%. Short-term gains (held one year or less) are taxed as ordinary income at your regular federal bracket, up to 37%.
What are the capital gains tax brackets for 2026?
For long-term gains: 0% up to $49,450 (single) or $98,900 (married filing jointly), 15% up to $545,500 ($613,700 MFJ), and 20% above that.
Do I pay capital gains tax when I sell my house?
Often no — this capital gains tax calculator can help you check, but the IRS separately excludes up to $250,000 of gain ($500,000 for married couples) on a primary residence you owned and lived in for at least two of the past five years.
How is the capital gains tax rate determined?
Your gain stacks on top of your other taxable income; the portion of the gain that falls within each income bracket is taxed at that bracket’s rate.
Can I reduce my capital gains tax?
Holding an asset for more than a year (to qualify for long-term rates), using the home sale exclusion where eligible, and offsetting gains with capital losses are common legal ways to reduce the tax owed.