Federal Capital Gains Tax Rate Calculator
Estimate your federal tax on short-term or long-term capital gains using filing status, taxable ordinary income, gain amount, and an optional Net Investment Income Tax estimate. This calculator is designed for quick planning and educational use.
Your estimate will appear here
Enter your details and click Calculate to see the estimated federal capital gains tax, effective rate, and a chart showing how your gain is taxed.
How a federal capital gains tax rate calculator works
A federal capital gains tax rate calculator estimates the tax due when you sell an investment, business interest, real estate investment, or another capital asset for more than your cost basis. The core idea is simple: your tax rate depends on whether the gain is short-term or long-term, your filing status, and your taxable income. A well-built calculator takes those moving parts and turns them into an estimate you can use for planning before you sell.
Federal capital gains taxes are not charged using one universal percentage. Instead, the Internal Revenue Code applies different rate structures based on how long you held the asset. If you held the asset for one year or less, the gain is generally short-term and taxed at ordinary federal income tax rates. If you held it for more than one year, the gain is generally long-term and may qualify for preferential federal rates of 0%, 15%, or 20%. High-income taxpayers may also owe the 3.8% Net Investment Income Tax, often called NIIT, on some or all of the gain.
This calculator focuses on those federal rules. It does not include state income taxes, local taxes, depreciation recapture, Section 1202 treatment, collectibles rates, installment sale rules, wash sale adjustments, or specialized treatment for inherited assets. For many users, however, a calculator like this provides an excellent starting point for understanding what a sale could cost after federal taxes.
What information you need before using the calculator
To produce a meaningful estimate, you need a few specific numbers. The most important is your taxable ordinary income before the gain. This matters because long-term capital gain brackets are layered on top of your taxable income. In other words, the gain does not exist in a vacuum. Your salary, business income, interest, retirement distributions, and deductions all influence whether your gain falls into the 0%, 15%, or 20% long-term capital gains bracket.
- Filing status: Single, married filing jointly, married filing separately, or head of household.
- Holding period: Whether the gain is short-term or long-term.
- Taxable ordinary income: Your estimated taxable income before adding the gain.
- Capital gain amount: Your net realized gain on the sale.
- Optional NIIT estimate: Relevant if income is high enough for the 3.8% surtax to apply.
If you are not sure about your taxable income, review your prior return and current year pay stubs, then adjust for expected deductions, bonuses, and other income. The more accurate your taxable income estimate is, the more useful your capital gains tax estimate becomes.
Why the holding period changes everything
The biggest driver of tax cost is often the holding period. A short-term gain is generally taxed like wages or ordinary income. That means taxpayers in higher brackets can face significantly more federal tax than they would on a comparable long-term gain. By contrast, long-term gains receive favorable rates intended to encourage long-term investment. In many cases, simply waiting until a position crosses the one-year mark can materially reduce the tax bill.
| Type of gain | Typical federal rate structure | How the calculator treats it | Planning impact |
|---|---|---|---|
| Short-term capital gain | Ordinary federal income tax brackets of 10%, 12%, 22%, 24%, 32%, 35%, and 37% | Adds the gain on top of taxable ordinary income and taxes the incremental amount using ordinary brackets | Often the highest-tax outcome for active traders and short holding periods |
| Long-term capital gain | Preferential federal rates of 0%, 15%, or 20% | Stacks the gain over taxable income and allocates it across the long-term thresholds | Can produce substantial tax savings when you hold assets longer than one year |
2024 long-term capital gains thresholds and NIIT reference points
The long-term capital gains brackets work differently from ordinary income brackets in the sense that your existing taxable income uses up the lower thresholds first. For example, if you are single and already have taxable income well above the 0% threshold, your entire long-term gain may begin in the 15% bracket. If your total income is high enough, part of the gain may move into the 20% bracket.
| Filing status | 0% long-term capital gains threshold up to | 15% threshold up to | 20% starts above | NIIT threshold |
|---|---|---|---|---|
| Single | $47,025 | $518,900 | $518,900 | $200,000 |
| Married filing jointly | $94,050 | $583,750 | $583,750 | $250,000 |
| Married filing separately | $47,025 | $291,850 | $291,850 | $125,000 |
| Head of household | $63,000 | $551,350 | $551,350 | $200,000 |
Those thresholds are why a federal capital gains tax rate calculator can produce very different results for two people selling the same stock with the same gain. A taxpayer with low taxable income may pay 0% on all or part of the gain. Another taxpayer with higher income may pay 15%, 20%, and possibly NIIT on the same transaction.
Step by step example
Suppose a single filer has $85,000 of taxable ordinary income before a sale and realizes a $25,000 long-term gain. Because the taxpayer is already above the single 0% threshold of $47,025, none of the gain fits into the 0% bracket. The total remains well below the 20% threshold of $518,900, so the gain is generally taxed at 15%. The estimated federal capital gains tax would be about $3,750. If the taxpayer instead sold before the one-year holding period ended, the gain would generally be taxed at ordinary income rates, and the federal tax on that gain could be materially higher depending on the marginal bracket.
Now imagine a married couple filing jointly with $70,000 in taxable ordinary income and a $20,000 long-term gain. Their total taxable income would be $90,000, which remains below the joint 0% threshold of $94,050. In that scenario, all of the gain could remain in the 0% federal long-term capital gains bracket. The calculator would estimate no federal capital gains tax on the gain itself, though state taxes or other rules could still matter.
How the NIIT estimate fits in
The Net Investment Income Tax adds another layer for higher-income households. NIIT is generally 3.8% on the lesser of net investment income or the amount by which modified adjusted gross income exceeds the threshold. For a quick calculator estimate, many tools approximate this by comparing total income to the NIIT threshold and applying 3.8% to the lower of the gain or the amount above the threshold. This is useful for planning, but your actual NIIT liability may differ if your modified adjusted gross income or other investment income items differ from the simplified assumptions used here.
When a capital gains calculator is most useful
A federal capital gains tax rate calculator is especially valuable in moments when timing matters. Selling at the end of one tax year versus the beginning of the next can move a transaction into a lower bracket if your income changes. Delaying a sale until an asset becomes long-term can save tax. Harvesting losses before year-end may offset gains. Coordinating a large sale with charitable giving, retirement deductions, or lower-income years can also change the federal result.
- Pre-sale planning: Compare the tax impact of selling now versus waiting.
- Portfolio rebalancing: See how much tax a rebalance could trigger.
- Business and founder exits: Estimate federal exposure before a liquidity event.
- Real estate investment sales: Model gain taxation at a high level before considering specialized rules.
- Retirement income planning: Understand how gains interact with other taxable income.
Common mistakes people make when estimating capital gains tax
One of the biggest mistakes is using total sale proceeds instead of the actual gain. Capital gains tax is generally based on the difference between your amount realized and your adjusted basis, not the entire sale price. Another frequent error is ignoring the interaction between ordinary income and long-term capital gains thresholds. Taxpayers often assume their entire long-term gain is taxed at one flat rate, but in reality a gain can span multiple capital gains brackets depending on how much taxable income is already present.
- Forgetting to account for basis adjustments, reinvested distributions, or commissions
- Assuming long-term gains are always taxed at 15%
- Ignoring NIIT for high-income taxpayers
- Overlooking state taxes, which can be significant
- Treating taxable income and gross income as the same thing
- Missing the one-year holding period by a small margin
How to use your estimate for smarter planning
Once the calculator gives you an estimate, use it as a decision-support tool rather than a final tax return answer. You can run multiple scenarios by changing the gain amount, filing status, or timing. For example, if your bonus is uncertain, estimate both a lower-income and higher-income year. If you are considering selling appreciated stock to fund a purchase, compare what happens if you spread the sales across two years. If you are close to the one-year holding period, compare the short-term and long-term outcomes and weigh that tax difference against market risk.
You should also remember that federal capital gains taxes can affect other areas of your financial picture. A larger gain can increase adjusted gross income, which may influence deductions, credits, Medicare premium surcharges, or taxation of Social Security benefits in some cases. A calculator focused on the federal capital gains rate is highly useful, but it works best when you combine it with broader tax planning.
Best practices for interpreting the result
- Use taxable income estimates that already reflect expected deductions.
- Run both current-year and next-year scenarios if your income may change.
- Test whether waiting for long-term status changes the tax enough to matter.
- If your income is high, include an NIIT scenario.
- Consult a CPA or tax attorney before large sales, concentrated stock exits, or business transactions.
Authoritative sources for federal capital gains rules
For official and academic-quality guidance, review the following sources:
- IRS Topic No. 409, Capital Gains and Losses
- IRS Questions and Answers on the Net Investment Income Tax
- Cornell Law School Legal Information Institute, 26 U.S. Code Section 1
These resources explain the underlying legal and administrative framework used in many calculators. They are especially helpful if your situation involves special tax treatment beyond a standard capital gain estimate.