Capital Gains Tax Calculator 2026
Calculate your 2026 capital gains tax on stocks, bonds, real estate, and other investments. See the difference between short-term and long-term rates and plan your investment tax strategy.
Updated for tax year 2026
Capital Gains Details
Total capital gains from investments
Your W-2 or other income besides the capital gain
Total Tax on Gains
$7,500.00
15.0% effective rate · $42,500.00 after tax
| Item | Amount |
|---|---|
| Capital Gain Amount | $50,000.00 |
| Federal Capital Gains Tax | -$7,500.00 |
| Total Tax | -$7,500.00 |
| After-Tax Gain | $42,500.00 |
| Effective Rate | 15.0% |
Long-Term Capital Gains Rates
Long-term capital gains (assets held over 1 year) are taxed at preferential rates of 0%, 15%, or 20% depending on your total taxable income. An additional 3.8% Net Investment Income Tax (NIIT) may apply if your income exceeds the threshold.
Understanding Capital Gains Taxation in Depth
Capital gains taxation is one of the most consequential aspects of the U.S. tax code for anyone who invests money. Whether you own stocks, bonds, mutual funds, real estate, or even cryptocurrency, the profit you earn when you sell an asset is subject to capital gains tax. But the amount you owe depends on a web of factors including how long you held the asset, your total taxable income, your filing status, and the type of asset involved. Getting a firm grasp on these rules can save you thousands of dollars over the course of your investing life and help you make smarter decisions about when to buy, when to sell, and how to structure your portfolio.
At its core, a capital gain is simply the difference between what you paid for an asset (your cost basis) and what you received when you sold it. If you bought shares of a company for $10,000 and sold them for $15,000, your capital gain is $5,000. But the tax you pay on that $5,000 profit varies enormously depending on circumstances, and the distinction between short-term and long-term holding periods is the single most important variable in that calculation.
Short-Term Versus Long-Term Capital Gains
The IRS draws a bright line at one year. If you sell an asset that you have owned for one year or less, any profit is classified as a short-term capital gain. Short-term gains receive no preferential tax treatment whatsoever. They are added directly to your ordinary income and taxed at the same rates as your salary or wages, which range from 10% to 37% depending on your total taxable income and filing status.
If you hold an asset for more than one year before selling, the profit qualifies as a long-term capital gain. Long-term gains benefit from substantially lower tax rates. For the current tax year, the long-term capital gains rates are 0%, 15%, or 20%, with the applicable rate determined by your taxable income. Single filers with taxable income up to $48,350 pay zero percent on long-term gains. The 15% rate applies from $48,351 through $533,400, and the 20% rate kicks in above $533,400. For married couples filing jointly, these thresholds are roughly doubled.
The difference in tax treatment between short-term and long-term gains is dramatic. Consider someone in the 32% income tax bracket who realizes a $50,000 profit on a stock sale. If the shares were held for 11 months, the federal tax on that gain would be $16,000. If those same shares were held for 13 months instead, the tax would drop to $7,500 at the 15% long-term rate. That is a savings of $8,500 simply for waiting an additional two months. This is why experienced investors pay close attention to holding periods before executing trades, and it is one of the most powerful tax planning tools available to individual investors.
How Capital Gains Interact with Ordinary Income
A common misconception is that capital gains are taxed independently from your other income. In reality, your ordinary income establishes the base upon which capital gains are stacked. When determining which long-term capital gains rate applies, the IRS looks at your total taxable income, including wages, business income, interest, and other sources, and then places your long-term gains on top.
This stacking mechanism means that someone with $40,000 in ordinary income and $20,000 in long-term capital gains does not simply pay 0% on the gains because the total is below $60,000. Instead, the ordinary income occupies the first $40,000 of the tax brackets, and the long-term gains stack above that. The first $8,350 of gains (up to the $48,350 threshold) would be taxed at 0%, and the remaining $11,650 would be taxed at 15%. Understanding this stacking is essential for accurate tax planning, especially if you are considering selling multiple investments in the same year.
This interaction with ordinary income is also why capital gains planning should not happen in isolation. If you receive a large bonus, pick up freelance work, or have any other event that increases your ordinary income, the effective tax rate on your capital gains rises too, because the gains are pushed further up the bracket ladder. Conversely, in a year when your ordinary income drops, perhaps due to a career transition or retirement, it may be an ideal time to realize capital gains at a lower rate.
The Net Investment Income Tax
On top of the standard capital gains rates, high-income taxpayers face an additional 3.8% Net Investment Income Tax, commonly referred to as the NIIT. This surtax applies when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly. The NIIT is levied on the lesser of your net investment income or the amount by which your modified AGI exceeds the threshold.
Net investment income includes capital gains, dividends, interest, rental income, royalties, and income from passive activities. It does not include wages, self-employment income, Social Security benefits, or distributions from certain retirement plans. For a single filer earning $180,000 in salary and realizing $50,000 in capital gains, the modified AGI would be $230,000, which exceeds the $200,000 threshold by $30,000. The NIIT would apply to $30,000 (the lesser of $50,000 in investment income and $30,000 in excess AGI), adding $1,140 to their tax bill.
The NIIT is one reason why the effective capital gains rate for affluent investors can reach 23.8% at the federal level (20% plus 3.8%), before any state income tax. For investors in states like California, the combined federal and state rate on capital gains can approach 37%, which is close to the top ordinary income tax rate. This reality underscores the importance of comprehensive tax planning that accounts for all layers of taxation. Our income tax calculator can help you see how investment income interacts with your overall tax picture.
Tax-Loss Harvesting Strategies
Tax-loss harvesting is a technique that involves deliberately selling investments that have declined in value to generate capital losses, which can then be used to offset capital gains realized elsewhere in your portfolio. This strategy does not eliminate the economic loss on the investment, but it allows you to use that loss to reduce your current tax bill, effectively turning a losing position into a tax benefit.
The rules for using capital losses are fairly straightforward. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains. Any remaining net losses can then cross over to offset the other type of gain. If you still have losses after netting them against all gains, you can deduct up to $3,000 of net capital losses per year against your ordinary income. Any excess losses beyond the $3,000 annual limit carry forward to future tax years indefinitely, and they retain their character as short-term or long-term.
One important rule to be aware of is the wash sale rule. If you sell a security at a loss and purchase a substantially identical security within 30 days before or after the sale, the IRS disallows the loss for tax purposes. The disallowed loss is added to the basis of the replacement shares, which defers but does not permanently eliminate the tax benefit. To avoid triggering a wash sale while maintaining your market exposure, some investors will purchase a similar but not identical investment. For example, selling one S&P 500 index fund at a loss and immediately buying a total stock market index fund achieves a similar portfolio allocation without running afoul of the wash sale rule.
Capital Gains on Real Estate Versus Stocks
The taxation of capital gains on real estate involves several special provisions that do not apply to stocks and other financial assets. The most significant is the primary residence exclusion under Section 121 of the Internal Revenue Code. If you have owned and used a home as your primary residence for at least two of the five years preceding the sale, you can exclude up to $250,000 of capital gain from tax as a single filer, or up to $500,000 as a married couple filing jointly. This exclusion is one of the most generous tax benefits in the entire code, and it can be used repeatedly, though not more than once every two years.
For investment properties, the rules are less favorable but still offer planning opportunities. Gains on rental properties and other real estate investments are subject to capital gains tax, and any depreciation you claimed during the holding period is subject to recapture at a 25% rate. This depreciation recapture can represent a significant portion of the total tax due on a real estate sale, and it is frequently overlooked by investors who focus only on the capital gains rate.
A powerful tool for real estate investors is the Section 1031 like-kind exchange, which allows you to defer capital gains tax by reinvesting the proceeds from a property sale into a similar investment property within strict time limits. The replacement property must be identified within 45 days and acquired within 180 days of the sale. While 1031 exchanges do not eliminate the tax, they can defer it for decades, and if the property is held until death, the stepped-up basis at death can eliminate the deferred gain entirely.
The Step-Up in Basis at Death
One of the most powerful and often underappreciated provisions in the tax code is the step-up in basis at death. When a person passes away, the cost basis of their assets is adjusted to the fair market value on the date of death. This means that any unrealized capital gain accumulated during the decedent's lifetime is permanently erased for income tax purposes. The heirs receive the assets with a new, higher basis, and if they sell immediately, they owe little or no capital gains tax.
To illustrate the impact, imagine a parent who purchased stock for $50,000 decades ago. At the time of their death, the stock is worth $500,000. If the parent had sold the stock before dying, they would have owed capital gains tax on $450,000 of profit. But because the heirs receive a stepped-up basis of $500,000, if they sell the shares for $500,000, their capital gain is zero. Even if they wait and sell for $520,000, they only pay tax on $20,000 of gain rather than $470,000.
This provision has significant implications for estate planning and investment strategy. Highly appreciated assets are generally better candidates for holding until death rather than selling and paying the capital gains tax. Conversely, assets with losses do not benefit from a step-up because there is no gain to eliminate. Some advisors recommend selling losing positions before death to capture the tax loss, which can offset other gains or reduce ordinary income by up to $3,000 per year.
For families with substantial investment portfolios or real estate holdings, the step-up in basis can save hundreds of thousands or even millions of dollars in capital gains tax across generations. It is a central consideration in any comprehensive estate plan and should be discussed with both a tax professional and an estate planning attorney. If you hold cryptocurrency or RSU stock compensation, the step-up rules apply to those assets as well, making it worth understanding regardless of what types of investments you hold.
Strategic Planning Around Capital Gains
Effective capital gains management is not about avoiding investment profits. It is about structuring the timing, location, and character of those profits to minimize the total tax you pay over your lifetime. Holding investments for more than a year to qualify for long-term rates, harvesting losses to offset gains, using tax-advantaged accounts like Roth IRAs and traditional IRAs to shelter growth from annual taxation, and planning sales around income fluctuations are all components of a thoughtful approach to investment taxation.
The most successful investors treat capital gains planning as an ongoing process rather than a year-end scramble. By monitoring your unrealized gains and losses throughout the year, understanding how your ordinary income affects your capital gains rates, and coordinating investment decisions with major life events, you can keep more of the wealth your investments generate. Our capital gains tax calculator is designed to help you model different scenarios so you can see the tax impact before you make a trade, not after.
Frequently Asked Questions
What is the difference between short-term and long-term capital gains?
What are the 2026 long-term capital gains tax brackets?
Can capital losses offset my gains?
Do I pay capital gains tax on my primary home?
Sources: IRS Rev. Proc. 2025-11 (2026 capital gains brackets), IRS Publication 550 (Investment Income and Expenses), IRS Topic 409. Last updated for tax year 2026.
This calculator provides estimates only and does not constitute tax or financial advice. Consult a CPA or tax professional for your specific situation.