Taxes
Capital Gains Tax Calculator
By Josimar Nascimento, founder of CalcPier. Tax brackets from IRS Rev. Proc. 2025-32. Read our methodology.
See exactly how much you owe on your investments. Compare short-term vs long-term holding periods and see if the 3.8% NIIT surtax applies.
Investment Details
Long-term gains have much lower tax rates (0%, 15%, or 20%).
Income & Status
Your regular salary, bonuses, or interest income. Used to determine your tax bracket.
Capital Gain
$0
—
Insights
The One-Year Rule: Short-Term vs. Long-Term
The most important factor in capital gains taxation is the holding period. If you sell an asset you have owned for one year or less, the profit is a short-term capital gain and is taxed as ordinary income. Depending on your tax bracket, that means you could pay up to 37% on the gain.
If you hold the asset for more than one year (1 year and 1 day), the profit becomes a long-term capital gain. Long-term gains are taxed at preferential rates: 0%, 15%, or 20%. For most investors, the difference between selling a stock at 11 months versus 13 months can be tens of thousands of dollars in taxes.
How Long-Term Capital Gains Brackets Work
Unlike ordinary income tax brackets, which apply to your total income, long-term capital gains "stack" on top of your ordinary income. This means the 0%, 15%, or 20% rate is applied based on where the gain falls in relation to your total taxable income.
For example, if you are single and have $40,000 of ordinary income, you are in the 12% ordinary tax bracket. The 0% long-term capital gains bracket goes up to $47,025. If you realize a $7,000 long-term gain, it all falls into the 0% bracket, and you owe $0 in federal tax on it. But if you realize a $20,000 gain, the first $7,025 is taxed at 0%, and the remaining $12,975 is taxed at 15%.
The Net Investment Income Tax (NIIT)
High earners face an additional surtax on investment income. The Net Investment Income Tax (NIIT) is a 3.8% tax on the lesser of your net investment income (which includes capital gains, dividends, and interest) or the amount by which your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).
This means that if you are a high earner, your long-term capital gains rate could effectively be 18.8% or 23.8%, rather than 15% or 20%. The NIIT is designed to help fund Medicare and is calculated on Form 8960.
Strategies to Minimize Capital Gains Tax
Tax-Loss Harvesting: You can use capital losses to offset capital gains. If you have $10,000 in gains and $4,000 in losses, you only pay tax on $6,000. If your losses exceed your gains, you can deduct up to $3,000 per year against ordinary income and carry the rest forward.
Holding Period Management: Do not sell an asset just before the one-year mark if you can wait a few weeks. The difference between short-term and long-term rates is substantial.
Section 121 Exclusion: If you are selling your primary residence, you can exclude up to $250,000 (single) or $500,000 (married) of capital gain, provided you have lived in the home for two of the last five years.
Do State Taxes Apply to Capital Gains?
In most states, capital gains are taxed as ordinary income, with no preferential long-term rate. If you live in California, your capital gains could be taxed at up to 13.3%. New York has its own brackets, and states like Washington have a specific excise tax on certain long-term gains.
Nine states have no income tax at all: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. For high-net-worth investors, the state of residence can significantly impact the after-tax return on an investment.
Ready to optimize your investment taxes?
Connect with a vetted financial advisor or tax professional to build a tax-efficient plan.
Find a Professional →You will be redirected to a lending partner. CalcPier does not make credit decisions.
Advertising Disclosure: CalcPier is an independent, advertising-supported comparison service. We may receive compensation when you click certain links and proceed to a third-party lender. This compensation may influence which offers are featured. Loan approval, rates, and terms are determined by the lender, not CalcPier. CalcPier is not a lender and does not make credit decisions.
Frequently asked questions
What is the difference between short-term and long-term capital gains?
A short-term capital gain occurs when you sell an asset you held for one year or less. It is taxed as ordinary income (up to 37%). A long-term capital gain occurs when you hold the asset for more than one year (1 year + 1 day). Long-term gains are taxed at preferential rates: 0%, 15%, or 20%, depending on your income.
What are the long-term capital gains tax brackets for 2026?
For single filers in 2026: the 0% rate applies to taxable income up to $47,025; the 15% rate applies from $47,026 to $518,900; and the 20% rate applies above $518,900. For married filing jointly: 0% up to $94,050; 15% up to $583,750; and 20% above that. These brackets are based on your total taxable income, not just the gain itself.
What is the Net Investment Income Tax (NIIT)?
The NIIT is an extra 3.8% tax on the lesser of your net investment income (which includes capital gains) or the amount by which your modified adjusted gross income (MAGI) exceeds $200,000 for single filers or $250,000 for married filing jointly. It is designed to help fund Medicare.
Can I avoid capital gains tax?
Yes, in several ways. If your income is low enough, your long-term gains may fall into the 0% bracket. You can also offset gains by realizing capital losses (tax-loss harvesting). If you are selling a primary home, you can exclude up to $250,000 (single) or $500,000 (married) of gain under Section 121.
Do I pay state taxes on capital gains?
Most states tax capital gains as ordinary income, though the rates vary widely. Nine states have no state income tax, while states like California and New York tax capital gains at their highest marginal rates. There is no special long-term capital gains rate at the state level in most states.
Disclaimer: This calculator and the content on this page are for educational purposes only. They do not constitute financial, legal, or tax advice. Rates, loan limits, and eligibility criteria vary by lender, location, and borrower profile. Always consult a licensed financial professional before making borrowing decisions. CalcPier is independent and not affiliated with any lender listed on this page.