TaxAndLoans
Taxes

How Capital Gains Tax Works — Long-Term, Short-Term, NIIT, and State Tax

Updated January 2026 · 6 min read

When you sell an investment for more than you paid, the profit is a capital gain — and it's taxable. The rate depends on how long you held the asset and your total income. Long-term gains (held over one year) qualify for preferential rates of 0%, 15%, or 20%. Short-term gains are taxed as ordinary income. Understanding the distinction can be worth thousands of dollars when timing your sales strategically.

0 / 15 / 20%

Long-term capital gains tax rates (2025)

37%

Maximum short-term gains rate (same as ordinary income)

3.8%

Net Investment Income Tax on high earners

>1 year

Holding period required for long-term treatment

Short-term vs. long-term capital gains

Assets held one year or less are short-term and taxed at your ordinary income marginal rate — up to 37% federally. Assets held more than one year are long-term and taxed at the preferential rates: 0% for income below ~$48,350 (single, 2025), 15% up to ~$533,400, and 20% above that. The difference between selling a stock at 11 months versus 13 months can be a tax rate swing of 10–17 percentage points.

Net Investment Income Tax (NIIT)

High earners face an additional 3.8% NIIT on top of capital gains rates. The NIIT applies to net investment income (including capital gains, dividends, and interest) for single filers with modified AGI above $200,000 or married filing jointly above $250,000. This pushes the effective long-term rate to 18.8% or 23.8% for top earners.

How to use the capital gains calculator

  1. Enter your total income (needed to place gains in the correct rate tier)
  2. Enter your capital gain amount and whether it's short-term or long-term
  3. Select your filing status
  4. Choose your state — many states tax capital gains as ordinary income
  5. Review the federal rate tier, NIIT applicability, state tax, and total tax owed

💡 Tax-loss harvesting

Capital losses offset capital gains dollar-for-dollar. If you have losing positions, consider selling them in the same tax year as a gain to reduce or eliminate taxable gains. You can then repurchase similar (not identical) investments after the 30-day wash sale window.

Common mistakes to avoid

  • Selling just short of the one-year mark and paying short-term rates when waiting a few weeks would save significantly
  • Ignoring the NIIT for high-income earners — it's 3.8% additional on top of the capital gains rate
  • Assuming capital gains don't apply to collectibles, real estate, and crypto — they do
  • Forgetting state capital gains tax — California taxes long-term gains as ordinary income (up to 13.3%)
  • Not tracking your cost basis accurately, leading to over- or under-reporting of gains

Related calculators

The US Income Tax Calculator shows how adding capital gains affects your overall federal tax liability. If you're self-employed, the Self-Employment Tax Calculator handles a different type of non-wage income. And the Roth IRA vs. Traditional IRA Calculator shows how sheltering gains inside a retirement account changes the tax outcome permanently.

Ready to run the numbers?

Use our free Capital Gains Tax Calculator to get an instant, accurate result — no signup required.

Open Capital Gains Tax Calculator

Frequently asked questions

Related guides