ΣCALCULATORWizard
📅 Using 2026 tax brackets — includes inflation-adjusted long-term rates and 3.8% NIIT surcharge thresholds.
$
Total amount paid including commissions
$
Net proceeds after commissions / selling costs
$
Agent commissions, closing costs, legal fees
$
W-2 wages, business income — before the capital gain
%
Editable — use your actual marginal state rate

Capital Gains Tax 2026: Short-Term vs. Long-Term Rates Explained

Capital gains tax is levied on the profit realized when you sell an asset for more than you paid for it — the difference between your cost basis and your sale price. The IRS divides capital gains into two categories with dramatically different tax treatment depending entirely on how long you held the asset before selling. Short-term capital gains apply to assets held one year or less and are taxed as ordinary income at your marginal federal income tax rate, which in 2026 can be as high as 37% for high earners. Long-term capital gains apply to assets held longer than one year and receive preferential tax treatment at 0%, 15%, or 20% depending on your total taxable income — a rate that is in every bracket below the highest equal to or lower than the equivalent ordinary income rate, often dramatically so. The single decision of when to sell an appreciated asset — one day before or one day after the one-year holding anniversary — can change the tax rate on the gain by 15-22 percentage points, potentially saving tens of thousands of dollars on significant gains.

The 2026 long-term capital gains brackets are inflation-adjusted versions of the 2025 thresholds, reflecting cost-of-living increases applied annually under the Tax Cuts and Jobs Act. For single filers, the 0% rate applies to long-term gains when total taxable income including the gain remains below approximately $48,350. The 15% rate covers the range from $48,350 to $533,400. The 20% rate applies to income above $533,400. For married couples filing jointly, these thresholds roughly double: 0% up to $96,700, 15% between $96,700 and $600,050, and 20% above $600,050. Head of household filers receive thresholds between single and joint returns. An important nuance: the capital gain itself is stacked on top of ordinary income for bracket determination, meaning a lower-income earner with a large capital gain may find portions of the gain taxed at different rates as it pushes through multiple brackets — this calculator handles that correctly by stacking the gain above ordinary income when determining the applicable rate.

The Net Investment Income Tax: The Hidden 3.8% Surcharge High Earners Must Know

The Net Investment Income Tax (NIIT), introduced by the Affordable Care Act in 2013, imposes an additional 3.8% tax on net investment income — including capital gains, dividends, rental income, and interest — for taxpayers whose modified adjusted gross income (MAGI) exceeds specific thresholds. For single filers, NIIT applies to the lesser of net investment income or the amount by which MAGI exceeds $200,000. For married filing jointly, the threshold is $250,000. Unlike ordinary income tax brackets, these NIIT thresholds are not inflation-adjusted — they have been fixed at the same dollar levels since the tax was enacted in 2013, meaning they capture more taxpayers each year as wages and investment income rise. In 2026, a single earner with $150,000 in wages and a $100,000 capital gain has MAGI of $250,000, exceeding the $200,000 threshold by $50,000. NIIT applies to the lesser of the $100,000 gain or the $50,000 excess — generating $1,900 in additional federal tax on top of the standard capital gains rate.

The practical impact of NIIT is to create effective federal capital gains rates of 18.8% (15% + 3.8%) and 23.8% (20% + 3.8%) for high-income taxpayers rather than the headline 15% and 20% rates most people know. For taxpayers near the NIIT threshold, careful income management — timing asset sales across tax years, harvesting capital losses to offset gains, or utilizing qualified opportunity zone investments to defer gains — can meaningfully reduce or eliminate NIIT exposure. The NIIT threshold stacks with the long-term capital gains bracket thresholds, creating a complex interaction where the same gain can simultaneously be subject to multiple rate increases as total income crosses different thresholds. This calculator computes NIIT separately and displays it as a distinct line item so you can see exactly how much of your tax bill comes from each component.

Cost Basis: The Foundation of Every Capital Gains Calculation

Your cost basis — the original value of an asset used to determine capital gains or losses — is the single most important number in a capital gains calculation and the one most frequently calculated incorrectly by individual investors. For stocks purchased through a brokerage, cost basis includes the purchase price plus any commissions paid. For stocks acquired through dividend reinvestment plans (DRIPs), cost basis includes each reinvested dividend at the price it was used to purchase shares — many investors sell DRIP shares without realizing they've been accumulating basis for years through reinvestment, significantly overstating their taxable gain. For mutual funds, cost basis depends on the accounting method selected: FIFO (first in, first out), specific share identification, or average cost basis — each producing different gain calculations and tax outcomes from identical holdings. Specific share identification, which lets you choose exactly which shares to sell, is almost always the most tax-efficient method for appreciated holdings because it allows you to sell the highest-cost shares first, minimizing the recognized gain.

Real estate cost basis carries additional complexity beyond the purchase price. Capital improvements — additions, renovations, or permanent upgrades that extend useful life or add value — increase the cost basis dollar for dollar, reducing the taxable gain on sale. A home purchased for $400,000, improved with a $75,000 kitchen addition and a $25,000 HVAC replacement, has an adjusted cost basis of $500,000 — meaning a $700,000 sale generates a $200,000 gain rather than $300,000. Keeping records of all capital improvements throughout ownership is essential for accurate gain calculation and can produce thousands in tax savings on significant real estate appreciation. The homeowner primary residence exclusion — up to $250,000 for single filers and $500,000 for married filing jointly — applies after adjusting basis for improvements, making accurate basis tracking even more consequential for homeowners near the exclusion threshold.

Tax-Loss Harvesting: Using Losses to Offset Capital Gains

Tax-loss harvesting is the strategic practice of selling investments that have declined in value to realize capital losses that offset capital gains, reducing overall tax liability. Capital losses first offset capital gains dollar for dollar — short-term losses against short-term gains, long-term losses against long-term gains, then net losses crossing categories. If total capital losses exceed capital gains in a given year, up to $3,000 of net losses can offset ordinary income annually, with excess losses carried forward indefinitely to offset future gains. An investor with $20,000 in long-term capital gains and $12,000 in capital losses from underperforming positions has a net gain of only $8,000 — potentially cutting the tax bill by $1,800 compared to not harvesting the losses. The remaining $12,000 in harvested losses came at the price of no longer holding those positions, making the wash-sale rule a critical consideration: repurchasing substantially identical securities within 30 days before or after the sale disallows the loss for tax purposes.

Strategic tax-loss harvesting becomes particularly powerful in volatile markets where temporary price declines create harvesting opportunities without fundamentally changing long-term investment thesis. An investor holding an S&P 500 index fund that has declined 15% can sell it, immediately purchase a similar but not substantially identical fund (such as a different index fund tracking a related but distinct benchmark), and lock in the tax loss while maintaining essentially the same market exposure. This technique is legal, widely practiced, and most effectively implemented through year-end portfolio reviews in November and December when the full year's gain picture is clear. Robo-advisors including Betterment and Wealthfront offer automated daily tax-loss harvesting as a service, continuously scanning portfolios for harvesting opportunities throughout the year — an approach that research suggests can add 0.5-1.5% annually in after-tax returns for taxable investors compared to buy-and-hold strategies with identical pre-tax returns.

Capital Gains on Real Estate: Primary Residence, Rentals, and the Section 121 Exclusion

Real estate capital gains receive both favorable treatment through the Section 121 primary residence exclusion and potentially harsh treatment for rental properties subject to depreciation recapture — understanding both is essential for real estate investors approaching a sale. The Section 121 exclusion allows homeowners who have lived in their primary residence for at least two of the five years immediately preceding the sale to exclude up to $250,000 in gains ($500,000 married filing jointly) from federal capital gains tax entirely. On a home purchased for $350,000 and sold for $800,000, a married couple excludes $450,000 of the $450,000 gain — potentially owing zero federal capital gains tax despite enormous appreciation. Partial exclusions apply for homes meeting partial eligibility due to job relocation, health needs, or other unforeseen circumstances, allowing prorated exclusion amounts based on the fraction of the two-year requirement met.

Rental property sales face an additional complication beyond standard capital gains: depreciation recapture. Rental property owners deduct depreciation annually (typically over 27.5 years for residential property) to offset rental income — reducing taxable income each year but simultaneously reducing the property's adjusted cost basis. When the property is sold, the IRS recaptures those depreciation deductions by taxing the depreciated amount at a maximum 25% federal rate (Section 1250 unrecaptured depreciation), regardless of the taxpayer's normal capital gains rate. A rental property purchased for $400,000 and held for 10 years accumulates approximately $145,000 in depreciation ($400,000 ÷ 27.5 × 10), which is taxed at up to 25% on sale — creating $36,250 in potential depreciation recapture tax before any consideration of additional appreciation gains. 1031 exchanges allow rental property owners to defer both capital gains and depreciation recapture by reinvesting proceeds into like-kind property within specific timelines, potentially deferring millions in taxes indefinitely through successive exchanges.

Frequently Asked Questions

What is the capital gains tax rate for 2026?
For 2026, long-term capital gains tax rates are 0%, 15%, or 20% depending on your total taxable income and filing status. Single filers with taxable income up to approximately $48,350 pay 0% on long-term gains. The 15% rate applies from $48,350 to $533,400. Above $533,400, the rate is 20%. Married filing jointly thresholds are roughly double: 0% up to $96,700, 15% to $600,050, 20% above that. High earners above $200,000 (single) or $250,000 (MFJ) may also owe an additional 3.8% Net Investment Income Tax, bringing the maximum effective federal rate to 23.8%. Short-term capital gains on assets held one year or less are taxed as ordinary income at your regular marginal rate, which can be as high as 37%.
How do I avoid or reduce capital gains tax?
Several legal strategies reduce capital gains tax liability. Holding assets longer than one year converts short-term gains (taxed as ordinary income) to long-term gains at significantly lower rates. Tax-loss harvesting — selling losing investments to offset gains — directly reduces taxable gain dollar for dollar. Contributing appreciated assets to charity eliminates the gain entirely while providing a deduction for the full fair market value. Utilizing tax-advantaged accounts (IRA, 401k, HSA) means gains never become taxable. Primary residence exclusion ($250K single/$500K married) shelters most home sale gains. Qualified Opportunity Zone investments allow deferral of gain recognition for up to 10 years. Gifting appreciated assets to low-income family members who fall in the 0% bracket shifts the tax to them at a lower rate. For rental property, 1031 exchanges defer capital gains by rolling proceeds into replacement property.
Do I owe capital gains tax if I reinvest the proceeds?
Yes — the capital gains tax is triggered by the sale itself, not by what you do with the proceeds afterward. Reinvesting the money into another investment does not defer or eliminate the tax obligation. The only exceptions are accounts specifically designed for tax deferral: selling within a traditional IRA or 401(k) generates no immediate tax (taxes are deferred until withdrawal), and selling within a Roth IRA generates no tax ever (on qualified distributions). Outside these accounts, the IRS expects you to report the gain on Schedule D and pay any tax owed, regardless of whether you immediately reinvest every dollar. Qualified Opportunity Zone fund investments are a limited exception for capital gains specifically — reinvesting proceeds into a QOZ fund within 180 days of the sale defers recognition of the original gain.
What is the wash-sale rule and how does it affect tax-loss harvesting?
The wash-sale rule disallows a capital loss if you purchase a "substantially identical" security within 30 days before or after the sale that generated the loss. The disallowed loss isn't permanently lost — it's added to the cost basis of the replacement security, deferring (rather than eliminating) the tax benefit. The rule prevents investors from selling purely to generate tax losses while maintaining continuous identical market exposure. Cryptocurrency is currently not subject to wash-sale rules (as of 2026), making it the one major asset class where you can sell for a loss and immediately repurchase without violating wash-sale restrictions — though proposed legislation has sought to close this exception. Mutual fund investors need to be careful with "substantially identical" determinations, as different funds tracking the same index may qualify as substantially identical even with different names.
How are capital gains taxed on inherited assets?
Inherited assets receive a "stepped-up basis" — the cost basis is reset to the asset's fair market value at the date of the original owner's death, not the original purchase price. This means an heir who immediately sells inherited stock, real estate, or other appreciated assets typically owes little or no capital gains tax, regardless of how much the asset appreciated during the deceased's lifetime. An heir who holds the inherited asset and then sells it later owes capital gains only on appreciation after the inheritance date, always at long-term rates regardless of how long they personally held the asset. This stepped-up basis provision is one of the most significant wealth transfer tax advantages in the U.S. tax code, effectively eliminating capital gains tax on a lifetime of investment appreciation for assets passed to heirs.
Are cryptocurrency gains subject to capital gains tax?
Yes — the IRS treats cryptocurrency as property, not currency, meaning all the same capital gains rules apply. Selling crypto for dollars, trading one cryptocurrency for another, and using crypto to purchase goods or services are all taxable events that generate capital gains or losses based on the difference between your cost basis (what you paid) and the value at the time of the transaction. Short-term gains on crypto held one year or less are taxed as ordinary income; long-term gains on crypto held more than one year qualify for 0%, 15%, or 20% preferential rates. Crypto received as mining income, staking rewards, or payment for services is taxed as ordinary income at receipt. The IRS has significantly increased cryptocurrency enforcement, requiring specific disclosure on tax returns and working with exchanges to obtain transaction data — accurate record-keeping of all crypto transactions is essential.