Long-Term Capital Gains Tax Calculator
Input Parameters
Computed Results
The long-term capital gains tax calculator estimates your federal tax liability when selling an asset held for more than one year. By evaluating your purchase price, sale price, and ordinary income, it determines your applicable tax brackets and potential Net Investment Income Tax (NIIT) to project your final net proceeds.
Disclaimer: This calculator provides mathematical estimates for informational purposes only and does not constitute professional tax or legal advice.
Practical Use Cases
Understanding your potential tax liability before selling an asset helps you estimate your actual take-home proceeds. This calculator is typically used when planning the sale of stocks, mutual funds, real estate, or business assets held for longer than one year. Because long-term capital gains stack on top of your ordinary income, calculating the exact tax requires evaluating where your total income falls within the federal tax brackets. This tool helps you estimate whether your gain will be taxed at 0%, 15%, or 20%, and whether you will trigger the additional 3.8% Net Investment Income Tax (NIIT).
Formula & Explanation
The calculation begins by determining your net capital gain. If the result is zero or negative, no capital gains tax is owed.
Federal long-term capital gains are taxed at 0%, 15%, or 20%. Your specific rate depends on your filing status and your total taxable income (your ordinary income plus the capital gain). The gain is "stacked" on top of your ordinary income, meaning a single gain can cross multiple tax brackets.
Additionally, high-income earners may be subject to the Net Investment Income Tax (NIIT) of 3.8%. The NIIT applies to the lesser of your net capital gain or the amount by which your modified adjusted gross income exceeds statutory thresholds (e.g., $200,000 for Single filers, $250,000 for Married Filing Jointly).
2026 Federal Long-Term Capital Gains Tax Brackets
| Tax Rate | Single | Married Filing Jointly | Married Filing Separately | Head of Household |
|---|---|---|---|---|
| 0% | $0 to $49,450 | $0 to $98,900 | $0 to $49,450 | $0 to $66,200 |
| 15% | $49,451 to $545,500 | $98,901 to $613,700 | $49,451 to $306,850 | $66,201 to $579,600 |
| 20% | $545,501 or more | $613,701 or more | $306,851 or more | $579,601 or more |
Verified Scenario Walkthroughs
Below are verified examples demonstrating how different income levels and filing statuses impact the final tax calculation.
Modest gain for single filer (2025)
A single filer in 2025 with $40,000 in ordinary income sells an asset purchased for $20,000 at a sale price of $35,000. This creates a $15,000 capital gain. Because their total income ($55,000) crosses from the 0% bracket into the 15% bracket, the estimated federal capital gains tax is $997.50. The effective tax rate on the gain is 6.65%, leaving net proceeds of $34,002.50.
High income married joint filing (2026)
A married couple filing jointly in 2026 has $450,000 in ordinary income. They sell an asset for $1,200,000 that was originally purchased for $500,000, resulting in a $700,000 gain. Because their total income exceeds the top bracket and the NIIT threshold, they owe $158,415 in base capital gains tax plus $26,600 in NIIT. The total effective tax rate on the gain is 22.631%, resulting in net proceeds of $1,041,585.
Capital loss scenario (2026)
A head of household filer in 2026 with $60,000 in ordinary income sells an asset for $85,000 that was purchased for $100,000. This results in a capital loss of $15,000. Because there is no gain, the estimated federal capital gains tax and NIIT are both $0, and the net proceeds equal the $85,000 sale price.
Mid-range gain married separate (2025)
A married individual filing separately in 2025 has $100,000 in ordinary income and realizes a $150,000 gain (purchased for $150,000, sold for $300,000). The estimated federal capital gains tax is $27,250. Because their total income ($250,000) exceeds the $125,000 NIIT threshold for their filing status, they also owe $4,750 in NIIT. The effective tax rate on the gain is 18.167%, leaving net proceeds of $272,750.
How to Use the Calculator
Follow these steps to estimate your federal capital gains tax:
- Enter the Purchase Price: Input the original cost basis of the asset, including any reinvested dividends or acquisition costs.
- Enter the Sale Price: Input the total proceeds received from the sale, minus any allowable selling expenses.
- Input Other Taxable Income: Provide your estimated annual ordinary income (excluding this specific capital gain) to determine your tax bracket.
- Select Filing Status and Tax Year: Choose your federal filing status and the applicable tax year (2025 or 2026) to apply the correct statutory thresholds.
- Review the Estimates: The calculator will display your estimated federal tax, any applicable NIIT, your effective tax rate, and your final net proceeds.
Inputs & Outputs
| Field | Type | Description |
|---|---|---|
| Purchase Price (Cost Basis) | Input | The original purchase price plus any reinvested dividends, capital additions, or acquisition commissions. |
| Sale Price | Input | Total proceeds received from the asset sale minus allowable selling costs. |
| Other Taxable Income | Input | Your annual taxable ordinary income excluding this capital gain. |
| Filing Status | Input | Your federal tax filing status. |
| Tax Year | Input | Select the IRS tax year to apply statutory thresholds. |
| Estimated Federal Capital Gains Tax | Output | The total estimated federal tax owed on the capital gain, including NIIT if applicable. |
| Net Capital Gain / (Loss) | Output | The difference between the sale price and the purchase price. |
| Effective Tax Rate on Gain | Output | The total tax divided by the net capital gain, expressed as a percentage. |
| Net Investment Income Tax (NIIT 3.8%) | Output | The estimated 3.8% surtax applied to high-income earners. |
| Net Proceeds After Federal Tax | Output | The final amount you retain from the sale after deducting the estimated federal taxes. |
Frequently Asked Questions
What is the Net Investment Income Tax (NIIT)?
The Net Investment Income Tax (NIIT) is an additional 3.8% federal tax that applies to investment income, including capital gains, for individuals, estates, and trusts whose income exceeds certain statutory thresholds (e.g., $200,000 for single filers and $250,000 for married couples filing jointly).
How does my ordinary income affect my capital gains tax?
Long-term capital gains are stacked on top of your ordinary income. Your ordinary income determines where your capital gains begin within the 0%, 15%, or 20% tax brackets. Higher ordinary income pushes your capital gains into higher tax brackets.
Does this calculator include state capital gains taxes?
No, this calculator only estimates federal long-term capital gains tax and the federal Net Investment Income Tax (NIIT). Many states also levy their own taxes on capital gains, which would further reduce your net proceeds.
What happens if I sell my asset at a loss?
If your sale price is lower than your purchase price, you have a capital loss. You do not owe capital gains tax on a loss. In many cases, capital losses can be used to offset other capital gains or a portion of your ordinary income, though this calculator focuses strictly on the tax liability of a single transaction.