Understanding Capital Gains Tax: Short-Term vs Long-Term (2026 Guide)

When you sell an investment for more than you paid for it, the IRS wants a share. How much they take depends almost entirely on how long you held the investment before selling — a distinction that can mean a difference of 15 to 20 percentage points in tax rate. Understanding capital gains tax is essential for anyone investing outside of retirement accounts.

What Is a Capital Gain?

A capital gain is the profit you realize when you sell a capital asset — a stock, bond, mutual fund, real estate, or other investment — for more than you paid for it. The amount you originally paid is called your cost basis (or basis). The gain is the sale price minus the basis.

Example: You buy 100 shares of a stock at $40 each ($4,000 total). Two years later you sell all 100 shares at $75 each ($7,500 total). Your capital gain is $3,500 — and that $3,500 is taxable income in the year you sell.

A capital loss is the opposite: you sell for less than your basis. Losses can be used to offset gains and, in some circumstances, other income — which creates planning opportunities discussed below.

Critically: you do not owe capital gains tax on paper gains. The tax is only triggered when you actually sell the asset and realize the gain. An investment that has doubled in value in your brokerage account generates no taxable event until you sell.

Short-Term vs. Long-Term: The Single Most Important Distinction

The IRS distinguishes between assets held for one year or less (short-term) and assets held for more than one year (long-term). The tax treatment is dramatically different.

Short-Term Capital Gains

Assets sold after holding for one year or less generate short-term capital gains. These are taxed as ordinary income — at your regular income tax bracket rate. In 2026, federal ordinary income tax rates range from 10% to 37%. If you are in the 32% bracket, your short-term gains are taxed at 32%.

This is the worst possible tax treatment for investment gains. Frequent trading, day trading, and selling investments less than a year after purchase are all subject to this higher rate.

Long-Term Capital Gains

Assets held for more than one year generate long-term capital gains, which are taxed at preferential rates: 0%, 15%, or 20%, depending on your taxable income and filing status.

2026 Long-Term Capital Gains Rates (Federal)

  • 0% rate: Single filers with taxable income up to approximately $47,025; Married filing jointly up to approximately $94,050. If your income is below these thresholds, you pay zero federal tax on long-term gains.
  • 15% rate: Most middle and upper-middle income taxpayers fall here. Single up to approximately $518,900; Married filing jointly up to approximately $583,750.
  • 20% rate: Applies to long-term gains above the 15% threshold. Relatively few taxpayers — high earners only.

The practical implication: simply holding an investment for one year and one day instead of selling at 11 months can convert a 22%, 24%, or 32% tax bill into a 15% tax bill. On a $50,000 gain, that is $3,500 to $8,500 in tax savings from timing alone.

The Net Investment Income Tax (NIIT)

High earners face an additional 3.8% surtax on net investment income under the Affordable Care Act. The NIIT applies to the lesser of (a) your net investment income or (b) the amount your modified adjusted gross income exceeds the threshold.

The 2026 thresholds are approximately $200,000 for single filers and $250,000 for married filing jointly. Investment income includes capital gains, dividends, interest, rental income, and passive business income.

This means the effective maximum federal long-term capital gains rate for high earners is 23.8% (20% + 3.8% NIIT) — still meaningfully lower than the top ordinary income rate of 37%.

What Counts as a Capital Asset?

The capital gains rules apply to a broad range of assets:

  • Stocks, bonds, and mutual funds held in taxable brokerage accounts
  • ETFs (exchange-traded funds)
  • Real estate (with a special exclusion for primary residences — see below)
  • Cryptocurrency — the IRS treats crypto as property, and every sale or exchange is a taxable event
  • Collectibles, art, and precious metals — taxed at a maximum 28% rate for long-term gains, not the standard 20%
  • Business interests (selling a business or stake in a business)

Not covered: assets inside tax-advantaged accounts (401k, IRA, Roth IRA) are not subject to capital gains tax at the time of sale within the account. Taxes come later (for traditional accounts) or not at all (for Roth accounts).

Primary Residence Exclusion

There is a major exception for your primary home. You can exclude up to $250,000 of capital gains from the sale of your primary residence if you are single, or $500,000 if you are married filing jointly — provided you have owned and lived in the home as your primary residence for at least two of the last five years before the sale. This exclusion can be used multiple times over your lifetime, as long as you have not used it within the prior two years.

Calculating Your Cost Basis

Your cost basis is what you paid for an investment, including commissions and fees. For simple stock purchases, this is straightforward. For mutual funds or stocks purchased over time (through dividend reinvestment or regular contributions), the calculation is more complex.

Common Basis Calculation Methods

  • FIFO (First In, First Out): The default IRS method. The first shares purchased are considered the first shares sold. In a rising market, this typically produces higher gains since earlier purchases often have a lower cost basis.
  • Specific Identification: You identify exactly which shares you are selling. Allows you to sell high-basis shares first to minimize current gains, or low-basis shares to capture losses for tax-loss harvesting. Requires record-keeping and communication with your broker at the time of sale.
  • Average Cost: Averages the cost of all shares owned. Only available for mutual fund shares, not individual stocks. Simplifies record-keeping but removes flexibility.

Brokers are now required to track and report basis for most securities. You can choose your accounting method through your broker's settings — most default to FIFO. Changing to specific identification before you sell can save meaningful tax dollars on large positions.

Tax-Loss Harvesting: Turning Losses Into a Benefit

Capital losses offset capital gains dollar for dollar. If you have $10,000 in gains and $4,000 in losses in the same tax year, you pay tax on $6,000 net. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income per year. Additional losses carry forward to future tax years.

How Tax-Loss Harvesting Works

Tax-loss harvesting is the deliberate strategy of selling investments at a loss to offset gains elsewhere in your portfolio. You then reinvest the proceeds in a similar (but not identical) investment to maintain your desired market exposure.

Example: You hold a broad market ETF that is down $8,000 from your purchase price due to a market dip. You also have $8,000 in gains from selling a stock position this year. By selling the ETF, you realize an $8,000 loss that offsets your gains, eliminating your capital gains tax for the year. You reinvest immediately in a similar — but not identical — ETF to stay invested.

The Wash-Sale Rule

You cannot claim a tax loss if you repurchase the same or "substantially identical" security within 30 days before or after the sale. This is the wash-sale rule. To harvest a loss and stay invested, you must either (a) wait 31 days before repurchasing the identical security, or (b) immediately buy a similar but not identical investment.

For example: Selling Vanguard's S&P 500 ETF (VOO) at a loss and immediately buying Fidelity's S&P 500 ETF (FXAIX) would likely trigger the wash-sale rule — they track the same index. Selling VOO and buying an ETF tracking the total U.S. market (different securities) would not.

Strategies to Minimize Capital Gains Tax

Hold Investments Long-Term

The simplest, most powerful strategy: hold investments for more than one year before selling. If you are a long-term investor, you may naturally do this without thinking about it — which is one more argument for buy-and-hold investing over frequent trading.

Maximize Tax-Advantaged Accounts

Investments inside 401k, IRA, and Roth IRA accounts are not subject to capital gains tax when you trade within them. You can rebalance, sell appreciated holdings, and buy freely without immediate tax consequences. Keep high-growth, high-turnover investments in tax-advantaged accounts; keep tax-efficient index funds in taxable accounts.

Asset Location Strategy

This is the formal term for the strategy above: placing different asset types in the most tax-efficient account type.

  • In tax-advantaged accounts (IRA, 401k): Bonds (which generate ordinary income), REITs, actively managed funds with high turnover
  • In taxable accounts: Broad index funds (low turnover, tax-efficient), buy-and-hold individual stocks, municipal bonds

Donate Appreciated Securities

If you donate to charity, consider donating appreciated securities directly rather than selling them and donating cash. You avoid capital gains tax on the gain, get a charitable deduction for the full fair market value, and the charity receives the full amount. A double tax benefit compared to selling and donating.

Qualified Opportunity Zones

An advanced strategy for large capital gains: reinvesting realized gains into Qualified Opportunity Zone funds can defer capital gains tax, and gains on the QOZ investment itself may be tax-free if held for 10+ years. This is a complex strategy requiring professional guidance.

Roth Conversions in Low-Income Years

If you have a year of unusually low income — career transition, sabbatical, early retirement — you may be in a lower bracket. This is an opportunity to realize long-term capital gains at 0% (if income is below the threshold) or to convert traditional IRA funds to Roth at a lower rate. A financial advisor can model the optimal amount.

Capital Gains Tax and Real Estate Investing

Real estate investors have access to several specialized tools:

  • 1031 Exchange: Defer capital gains by rolling the proceeds from one investment property sale directly into a "like-kind" replacement property. Taxes are deferred, not eliminated — but can be deferred indefinitely through successive exchanges, effectively eliminating them at death through the stepped-up basis rules.
  • Depreciation recapture: Be aware that when you sell a rental property, you must "recapture" depreciation deductions you took over the years at a 25% rate. This is a separate calculation from the capital gains rate.
  • Stepped-up basis at death: Inherited assets receive a new cost basis equal to their fair market value at the date of the decedent's death. This effectively eliminates capital gains on appreciation during the decedent's lifetime. Important consideration for estate planning — see our guide on what is estate planning.

When to Work With a Tax Professional

Capital gains can interact with your ordinary income in complex ways that affect your tax bracket, NIIT exposure, and eligibility for various deductions. Consider professional guidance when:

  • You are selling a business, property, or large stock position
  • You have substantial unrealized gains and want to plan distributions over multiple years
  • You are close to NIIT thresholds
  • You are considering a 1031 exchange or Qualified Opportunity Zone investment
  • You receive equity compensation (RSUs, ISOs, NSOs) — these have their own complex rules
  • You want to integrate tax planning with retirement and estate planning

Tax planning and tax preparation are different skills — see our guide on tax planning vs tax preparation for more. Finding an advisor who does proactive planning, not just filing, makes the biggest difference.

Find a Tax-Smart Financial Advisor Near You

Capital gains strategy is one piece of a comprehensive financial plan. National Finance Connect connects you with vetted financial advisors and CPAs who can help you keep more of what you earn through proactive tax planning.

Find a Financial Advisor Near You →

Free to browse. No obligation to contact anyone.