You sold a stock for a $5,000 profit. Feels good. Then tax season arrives and you realize the government wants a cut. How much? It depends entirely on how long you held that stock. This guide breaks down exactly how capital gains tax works for stock investors, what rates you’ll actually pay, and three strategies to keep more of your profits.
Short-Term vs Long-Term Capital Gains: The One Number That Changes Everything
The single most important factor in your capital gains tax bill is the holding period. Sell a stock you owned for less than one year, and those gains are taxed as ordinary income. That means the same rate as your job pays. Sell after holding for more than one year, and you qualify for long-term capital gains rates, which are significantly lower.
2026 Tax Rate Brackets for Stock Gains
| Filing Status | Short-Term (Ordinary Income Rates) | Long-Term (Special Rates) |
|---|---|---|
| Single, income up to $47,025 | 10%–12% | 0% |
| Single, income $47,026–$518,900 | 22%–35% | 15% |
| Single, income over $518,900 | 37% | 20% |
| Married filing jointly, income up to $94,050 | 10%–12% | 0% |
| Married filing jointly, income $94,051–$583,750 | 22%–35% | 15% |
| Married filing jointly, income over $583,750 | 37% | 20% |
Notice the 0% long-term bracket. A single filer with $45,000 in total income can sell stocks for a profit and pay zero federal tax on those gains. That’s a massive incentive to hold stocks for over a year.
How to Calculate Your Actual Taxable Gain

Your taxable gain isn’t just (selling price − purchase price). The IRS uses something called cost basis, and getting this wrong is the most common mistake I see.
Cost basis includes the purchase price plus any reinvested dividends, commissions you paid to buy the stock, and adjustments from stock splits. Here’s the real formula:
Taxable Gain = Selling Price − Adjusted Cost Basis
Example: You bought 100 shares of Apple (AAPL) at $150 per share in 2026. Total: $15,000. You paid a $10 commission. Your cost basis is $15,010. In 2026, you sell at $200 per share for $20,000. Your taxable gain is $4,990, not $5,000. Small difference, but it adds up across many trades.
Most brokerages like Vanguard, Fidelity, and Charles Schwab now track cost basis for you. But they default to FIFO (first in, first out) — meaning they assume you sell your oldest shares first. That’s not always optimal. You can elect specific identification when selling, choosing exactly which tax lots to sell. If you bought shares at different prices, you can pick the highest-cost shares to sell, minimizing your gain.
Three Strategies to Reduce Capital Gains Tax
You don’t have to just accept the tax bill. Here are three legitimate strategies investors use, ranked by effectiveness.
1. Tax-Loss Harvesting
Sell losing positions to offset gains from winners. If you have $10,000 in realized gains and $4,000 in realized losses, you only pay tax on $6,000. The IRS lets you deduct up to $3,000 of net losses against ordinary income each year. Anything beyond that carries forward to future years.
Watch out for the wash-sale rule. You cannot buy the same or substantially identical stock within 30 days before or after the sale. If you do, the loss is disallowed. Use this strategy with index ETFs — sell Vanguard Total Stock Market ETF (VTI) and buy iShares Core S&P Total Market ETF (ITOT). They track different indexes but behave almost identically.
2. Hold for the Long Term
This is the simplest. Every day you hold a stock past the one-year mark, your maximum tax rate drops from 37% to 20%. For a high-income earner, that’s a 17% savings on every dollar of gain. If you’re trading frequently, ask yourself whether the potential short-term profit is worth giving up that tax advantage.
3. Use Tax-Advantaged Accounts
Capital gains tax only applies in taxable brokerage accounts. Inside a 401(k), traditional IRA, or Roth IRA, you pay zero capital gains tax. Roth IRAs are the best — you contribute after-tax money, then all growth and withdrawals are tax-free. For 2026, you can contribute up to $7,000 ($8,000 if age 50+).
The catch: you cannot access the gains until age 59½ without a penalty. So this strategy works for long-term retirement savings, not for money you’ll need in the next five years.
The Biggest Mistakes Stock Investors Make With Capital Gains

I’ve seen these errors cost investors thousands. Avoid them.
- Forgetting state taxes. The federal rates above are only half the picture. California taxes capital gains as ordinary income at rates up to 13.3%. Nine states have no income tax at all: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming. Your effective rate could be 20% federal + 13.3% state = 33.3% for a high earner in California.
- Selling winners too fast. A stock doubles in six months. You sell, thrilled with the 100% return. Then you pay 37% on that gain. If you had waited six more months, you’d pay 20%. The difference on a $50,000 gain? $8,500.
- Ignoring the Net Investment Income Tax (NIIT). If your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), you pay an additional 3.8% tax on investment income. That makes the top long-term rate 23.8%, not 20%.
- Not tracking cost basis adjustments. Stock splits, mergers, spin-offs, and return of capital distributions all change your cost basis. If you don’t track them, you’ll overpay. Example: Pfizer spun off Viatris in 2026. Shareholders had to allocate cost basis between the two stocks. Miss that, and your gain calculation is wrong.
When You Should NOT Worry About Capital Gains Tax

Here’s the counterintuitive truth: sometimes you should just pay the tax and move on.
If you’re holding a stock that has serious problems — think Enron-level risk — the tax tail should not wag the investment dog. Paying 20% on a gain is better than losing 100% of your principal. Same logic applies if you need the cash for an emergency, a down payment, or to avoid high-interest debt. Capital gains tax on a $10,000 profit is at most $2,380 (top bracket plus NIIT). Credit card interest at 22% will cost you far more if you carry that balance.
Another scenario: you’re in the 0% long-term capital gains bracket. If your total taxable income is under $47,025 (single) or $94,050 (married filing jointly) in 2026, you can realize gains and pay zero federal tax. This is a powerful opportunity for retirees or anyone taking a low-income year. Sell appreciated stocks, reset your cost basis, and pay nothing.
Bottom line: Capital gains tax is a cost of investing, not a reason to avoid smart decisions. Hold for over a year, use tax-loss harvesting, and prioritize Roth accounts. For most investors, the 0% bracket, 15% bracket, and tax-loss harvesting will cover the vast majority of situations. If you’re in the top brackets, pay the 23.8% and don’t let it drive your investment choices.
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.
