How to Calculate Capital Gains Tax (2026 Guide)
Learn how to calculate capital gains tax in 2026. Covers short-term vs long-term rates, cost basis, the home sale exclusion, and tax-loss harvesting.
Short-Term vs Long-Term Capital Gains
The single most important factor in your capital gains tax bill is how long you held the asset. Assets held for one year or less are subject to short-term capital gains tax, which is taxed at your ordinary income rate — the same rate as your wages. Assets held for more than one year qualify for long-term capital gains tax, which carries significantly lower rates.
For 2026, the long-term capital gains rates are 0%, 15%, or 20% depending on your taxable income. Most middle-income earners pay 15%. High earners (roughly above $553,850 single / $623,050 married filing jointly) pay 20%. An additional 3.8% Net Investment Income Tax (NIIT) applies above those thresholds, bringing the effective top rate to 23.8%.
How to Calculate Your Capital Gain
Your taxable capital gain is simply your sale price minus your cost basis. The cost basis is typically what you paid for the asset, plus commissions and fees. If you received the asset as a gift or inheritance, special basis rules apply.
- Example: You bought 100 shares of stock at $50 each ($5,000 total) and sold them for $8,000 after 18 months. Your long-term capital gain is $3,000.
- Adjustments to basis: Reinvested dividends increase your basis. Capital improvements on real estate increase your basis. Keep records of all purchases and reinvestments.
- FIFO vs specific identification: If you bought shares at different times, you can choose which lot to sell. Selling your highest-basis shares first minimizes your gain.
The $250,000 / $500,000 Home Sale Exclusion
One of the most valuable tax breaks in the tax code applies to primary residences. If you've owned and lived in your home for at least 2 of the last 5 years, you can exclude up to $250,000 of gain from taxes ($500,000 if married filing jointly). This exclusion can be used once every two years.
For example, a married couple who bought a home for $300,000 and sells it for $750,000 has a $450,000 gain — all of which is excluded under the $500,000 cap. They owe $0 in capital gains tax on the sale.
Tax-Loss Harvesting
Tax-loss harvesting means selling investments at a loss to offset capital gains elsewhere in your portfolio. If you have $10,000 in gains and $4,000 in losses, you only pay tax on $6,000 of net gains. Losses in excess of gains can offset up to $3,000 of ordinary income per year, with the remainder carried forward to future years.
Watch out for the wash sale rule: you cannot repurchase the same or substantially identical security within 30 days before or after the sale without losing the tax benefit.
2026 Long-Term Capital Gains Rate Thresholds
- 0% rate: Single filers with taxable income up to ~$47,025; married filing jointly up to ~$94,050
- 15% rate: Single up to ~$518,900; married up to ~$583,750
- 20% rate: Above those thresholds
These thresholds are adjusted annually for inflation. Use a capital gains tax calculator to find your exact liability based on your filing status and total income.