S&P 5007,659▼ 1.09%Nasdaq26,140▼ 2.15%Dow Jones52,002▼ 0.34%Nasdaq 10029,188▼ 2.50%VIX19.99▲ 21.45%US Dollar101.84▼ 0.21%Gold (GLD)382.01▼ 0.18%Oil (USO)161.76▲ 2.83%

Capital gains and dividend tax basics for investors (US)

18 October 20265 min readFinancial knowledge · lesson 141
Capital gains and dividend tax basics for investors (US)

In a regular US brokerage account, two events from owning stocks can create a tax bill: selling a stock for more than you paid, and receiving dividends. The rules decide how much of your return you actually keep, and they depend on how long you held a stock and what kind of dividend you received. This article covers the federal basics for general education only. It is not tax advice, rules and thresholds change, and your situation may differ, so check current IRS guidance or ask a tax professional.

Capital gains

A capital gain is the difference between what you receive when you sell and your cost basis, which is generally what you paid, including commissions.

Capital gain (or loss)  =  sale proceeds  -  cost basis

You owe tax only when you sell, which is called realizing the gain. A rise in the price of a stock you still hold is an unrealized gain and is not taxed. This is a key reason that how often you trade affects your after-tax results.

Short-term and long-term

The holding period decides the tax rate.

Holding period Federal treatment
One year or less (short-term) Taxed as ordinary income at your regular rate
More than one year (long-term) Taxed at lower rates of 0%, 15% or 20%, depending on taxable income

Higher-income investors may also owe the 3.8% net investment income tax on some investment income, and many states add their own taxes. The income levels where each rate applies are adjusted from time to time, so look up the current figures.

Example (illustrative numbers)

You buy 100 shares at $50, paying $5,000 in total, and later sell at $70 for $7,000. The gain is $2,000. Assume, purely for illustration, a 24% ordinary rate and a 15% long-term rate.

  • Sold within a year: $2,000 x 24% = $480 in federal tax.
  • Sold after more than a year: $2,000 x 15% = $300 in federal tax.

The difference is $180, or about 9% of the gain. The holding period can matter, though it is only one input. Tax should not by itself drive decisions about risk or quality.

Dividends

Dividends come in two kinds for tax purposes.

  • Ordinary (nonqualified) dividends are taxed as ordinary income.
  • Qualified dividends are taxed at the lower long-term capital gains rates.

To be qualified, the dividend must generally come from a US corporation or a qualifying foreign corporation, and you must meet a holding requirement: for common stock, you must hold the shares for more than 60 days during the 121-day period that begins 60 days before the ex-dividend date. See ex-dividend and record dates for what that date is. Dividends from REITs and some other sources are often not qualified, so the label on your tax form matters.

Reinvested dividends are still taxed in the year they are paid, even though you never received cash. The reinvested amount increases your cost basis in the stock, which reduces the gain when you later sell. Your broker reports dividends on Form 1099-DIV. Choosing between stocks by dividend yield alone ignores the tax treatment of that income.

Losses

Capital losses first offset capital gains. If your losses exceed your gains for the year, up to $3,000 of the net loss ($1,500 if married filing separately) can reduce other income, and any remainder carries forward to future years.

The wash sale rule

If you sell a stock at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed for now. Instead, it is added to the cost basis of the replacement shares, so the tax benefit is deferred rather than lost. The rule can apply across your accounts, including some retirement accounts. It is a common trap for people who sell to realize a loss and then buy back quickly.

Cost basis and record keeping

Your basis is the starting point for every gain calculation, so it needs to be right.

  • Purchases at different times. Each purchase is a separate tax lot with its own date and price. Brokers commonly default to selling the oldest lots first, and many let you choose specific lots.
  • Splits. A stock split is not a taxable event. It changes the number of shares and the basis per share, but not your total basis. See stock splits and reverse splits.
  • Reinvested dividends. Each reinvestment creates a new lot.
  • Gifts and inherited shares. Special basis rules apply, which is a reason to ask a professional.

Brokers generally report proceeds, and often cost basis, to you and the IRS on Form 1099-B, but you remain responsible for accuracy.

Where taxes bite in practice

  • Rebalancing. Selling winners to restore target weights can realize gains. In a taxable account the tax cost is part of the trade-off. See rebalancing a portfolio.
  • Tax-advantaged accounts. Inside accounts such as a 401(k) or IRA, trades and dividends are generally not taxed each year, though withdrawals follow their own rules. These are covered in 401(k), IRA and Roth basics.
  • Turnover. More frequent trading usually means more short-term gains and more records to keep.

Common mistakes

  • Letting taxes override the investment case. Holding a weak stock only to avoid tax can cost more than the tax itself.
  • Forgetting that reinvested dividends are taxed.
  • Triggering a wash sale by accident, for example by buying back in another account.
  • Losing track of basis, especially after splits, transfers or reinvestment.
  • Assuming rates and thresholds are fixed. Tax law changes.

Where to see it on StocksXray

Stock pages show dividends and splits history, which helps you reconstruct dates and amounts when checking basis or working out when dividends were paid. The dividend calendar lists upcoming dividend dates, relevant when you want to understand the ex-dividend date and holding periods. StocksXray does not calculate taxes or provide tax advice.

Key takeaways

  • Gains are taxed only when realized, and the holding period decides the rate.
  • Gains on assets held more than a year receive lower federal rates than short-term gains.
  • Qualified dividends get long-term rates if you meet the holding requirement. Other dividends are taxed as ordinary income.
  • Losses offset gains, then a limited amount of other income, with a carryforward. The wash sale rule can defer a loss.
  • Accurate cost basis records matter. Rules change, so verify current rules or consult a tax professional.

Related reading

Educational only, not financial advice. Examples use illustrative numbers.