Capital Gains Tax for Stock Investors: The 2026 Rules You Need to Know

Capital Gains Tax for Stock Investors: The 2026 Rules You Need to Know

If you sold a stock in 2026 for more than you paid, the IRS wants a cut. The exact percentage depends on two things only: how long you held the stock, and your taxable income. This guide covers the rates, the calculation, and the three mistakes that cost investors the most money.

Short-Term vs Long-Term: The 365-Day Line

The single most important number in capital gains tax is 365 days. Hold a stock for one year and one day, and you pay the long-term rate. Sell at 364 days, and you pay the short-term rate, which is the same as your ordinary income tax rate.

For 2026, the long-term capital gains tax brackets are:

Filing Status 0% Rate 15% Rate 20% Rate
Single $0 – $47,025 $47,026 – $518,900 Over $518,900
Married Filing Jointly $0 – $94,050 $94,051 – $583,750 Over $583,750
Head of Household $0 – $63,000 $63,001 – $551,350 Over $551,350

Short-term gains are taxed at your marginal income tax rate, which can reach 37% for high earners. The difference between 0% and 37% is entirely about holding period and income level.

How to Calculate Your Gain Correctly

Your gain is the selling price minus your cost basis. Cost basis includes the purchase price plus any commissions or fees paid to buy the stock. If you bought 100 shares of Apple at $150 each and paid a $10 commission, your cost basis is $15,010. Sell at $200 per share with a $10 commission, and your net proceeds are $19,990. Your gain is $4,980.

Many investors forget to include commissions. In 2026, most brokers like Vanguard, Fidelity, and Charles Schwab charge $0 commission for online trades, but some still charge for broker-assisted trades or mutual funds. Check your trade confirmations.

Three Cost Basis Methods and Which One Saves You the Most

Close-up image of a calculator, pen, and currency on a yellow notepad, symbolizing finance.

When you sell only part of a position you bought at different times, the IRS lets you choose which shares you sold. This choice directly changes your tax bill.

FIFO (First In, First Out) is the default. You sell the oldest shares first. If you bought shares at $10 and later at $50, FIFO sells the $10 shares first, creating a larger taxable gain. This is usually the worst option for tax purposes.

Specific Identification lets you pick exactly which shares to sell. If you bought shares at $50 and $10, you can instruct your broker to sell the $50 shares, minimizing your gain. This requires telling your broker which shares at the time of sale. Vanguard and Fidelity both support this method online.

Average Cost is allowed for mutual funds but not for individual stocks. It averages your purchase prices. For most stock investors, Specific Identification is the best method because it gives you full control over your tax outcome.

When Not to Use Specific Identification

If you use Specific Identification to sell high-cost shares and avoid taxes, then buy the same stock back within 30 days, the wash sale rule applies. The IRS disallows the loss. This rule applies to both stocks and options. You cannot harvest a tax loss and immediately repurchase the same security.

Tax-Loss Harvesting: The One Strategy That Actually Works

Tax-loss harvesting lets you sell losing stocks to offset gains from winning stocks. If your losses exceed your gains, you can deduct up to $3,000 of net losses against ordinary income per year. Any remaining losses carry forward to future years.

Here is the exact process for 2026:

  1. Identify all positions with unrealized losses in your taxable brokerage account.
  2. Sell enough losing positions to offset your realized gains for the year.
  3. Wait 31 days before buying a substantially identical stock back, or buy a different stock in the same sector.
  4. Repeat each year. The losses carry forward indefinitely.

For example, if you sold Apple for a $10,000 gain and sold Microsoft for a $7,000 loss, you pay tax on only $3,000. At the 15% long-term rate, that saves you $1,050.

Robo-advisors like Betterment and Wealthfront automate this. They sell ETFs at a loss and immediately buy a similar but not identical ETF. Their annual fee is 0.25%, and the tax savings often exceed that cost for high-net-worth investors.

The Mistake That Destroys Tax-Loss Harvesting Value

Selling a stock for a loss, then buying it back the next day, triggers the wash sale rule. Your loss is disallowed. The disallowed loss gets added to the cost basis of the new shares, so you do not lose it permanently, but you lose the ability to use it in the current tax year. If you need the deduction now, wait 31 days.

Net Investment Income Tax: The Extra 3.8% You Might Owe

Top-down view of tax deduction items on a black background with a calculator and forms, emphasizing financial planning.

If your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), you owe an additional 3.8% on the lesser of your net investment income or the amount over the threshold. This applies to capital gains, dividends, interest, and rental income.

This means a high-income investor in the top 20% long-term bracket actually pays 23.8% on long-term gains, not 20%. For short-term gains, the top rate becomes 40.8% (37% + 3.8%).

There is no way to avoid the NIIT by changing your investment strategy. It applies regardless of whether the gain is short-term or long-term. The only way to reduce it is to lower your MAGI, which is difficult for most salaried investors.

How to Report Stock Sales on Your Tax Return

Flat lay of tax forms, calendar, and glasses for 2021 financial planning.

Your broker sends you Form 1099-B by February 15. It shows each sale, the date acquired, date sold, proceeds, cost basis, and whether the gain is short-term or long-term. You enter this information on Schedule D of Form 1040.

If you sold stocks in 2026, you file Schedule D with your 2026 tax return in early 2027. The IRS matches the data on your return with the data from your broker. Discrepancies trigger an automated letter asking for payment plus interest.

Three common errors that trigger IRS notices:

  • Wrong cost basis. Brokers report cost basis for stocks bought after 2011. For older shares, you must provide the basis yourself. If you guess wrong, the IRS may recalculate.
  • Missing wash sales. If you triggered a wash sale, your broker reports the disallowed loss on the 1099-B. Do not enter the full loss on Schedule D. Enter only the allowed amount.
  • Omitting small sales. Selling a few shares for a $50 gain still requires reporting. The IRS sees every trade.

Tax software like TurboTax Premier ($89) or H&R Block Premium ($85) imports your 1099-B directly from your broker. This eliminates manual entry errors. For investors with more than 100 trades per year, a CPA costs $300–$800 but catches mistakes the software might miss.

The single most important takeaway: hold every stock for at least one year and one day unless you have a specific reason not to.

Disclaimer: The information on this page is for educational purposes only and does not constitute financial advice. Rates, terms, and eligibility requirements are subject to change. Always compare multiple lenders and consult a licensed financial advisor before borrowing.