← Back to calculator
Long-Term Gains

How to Calculate Long-Term Capital Gains Tax (2026)

What counts as a long-term capital gain?

A capital gain is long-term when you sell an asset you have held for more than one year. This applies to stocks, mutual funds, ETFs, real estate, crypto, and most other investment assets. The IRS measures the holding period from the day after you acquired the asset to the day you sold it.

Long-term treatment matters because Congress has deliberately set preferential rates for patient investors. Qualifying means you could pay as little as 0% instead of up to 37% for the same dollar of gain.

2026 Long-Term Capital Gains Rate Brackets

Long-term gains are taxed at one of three rates based on your taxable income (not your gross income). For 2026 (IRS Rev. Proc. 2025-32):

RateSingle FilersMarried Filing JointlyHead of Household
0%Up to $49,450Up to $98,900Up to $66,200
15%$49,451 – $545,500$98,901 – $613,700$66,201 – $579,600
20%Over $545,500Over $613,700Over $579,600

Most people — including those with significant gains — pay the 15% rate. The 0% rate is available for lower-income earners, including retirees living off investments.

Step-by-step formula

  1. Calculate your capital gain: Sale price − Cost basis (purchase price + commissions + improvements)
  2. Determine your taxable income: Gross income − standard or itemized deductions
  3. Stack your gain on top of ordinary income: Long-term gains sit above your ordinary income in the tax brackets
  4. Find your rate: Use the brackets above based on your filing status and the income level where your gain falls
  5. Apply the rate to your gain: Capital gain × rate = federal tax owed
Pro tip: Your long-term capital gains are stacked on top of your ordinary income to determine which bracket they fall in — not calculated in isolation. This means part of your gain could be taxed at 0% and the rest at 15% if it spans a bracket boundary.

The 3.8% Net Investment Income Tax (NIIT)

High earners may owe an additional 3.8% NIIT on top of their capital gains rate. It applies to the lesser of your net investment income or the amount your modified adjusted gross income (MAGI) exceeds:

This can push the effective top rate to 23.8% on long-term gains (20% + 3.8%). The NIIT is calculated on IRS Form 8960.

Worked example

Suppose you are single with $80,000 in ordinary taxable income and you sell stock for a $55,000 long-term gain.

Try it yourself: Use our free capital gains calculator to run your own numbers instantly — federal results are free and include NIIT. Add all 50 state rates with Pro.

Don't forget state capital gains tax

Most states add their own capital gains tax on top of the federal rates above. Rates range from 0% in Florida, Texas, and Nevada, to over 13% in California. Make sure to account for both when estimating your total bill.

Common strategies to reduce long-term capital gains tax

These strategies involve complex rules and individual circumstances. Consult a qualified CPA or tax advisor before acting.