How to avoid capital gains tax on stocks

Shares are the cleanest case in capital gains, because there is no depreciation, no improvement history and no exclusion. What there is instead is timing, and four published rules that respond to it. Anyone promising more than those four on a taxable brokerage account is describing either a retirement account, which is a different thing entirely, or something that will not survive contact with a return.

The year boundary does most of the work

The IRS rule is flat: hold the stock more than one year before you dispose of it and the gain is long-term; one year or less and it is short-term. A short-term gain has no preferential scale and is taxed alongside your ordinary income, which for an active trader is the whole story of why their tax bill looks nothing like a long-term holder's on the same profit. The count runs from the day after you acquired the asset up to and including the day you disposed of it, so a sale one day early is an expensive administrative error rather than a strategy.

Harvesting losses is the one reduction you control after the fact

Losses net against gains before any rate is applied, which makes a realised loss worth its full value rather than a deduction at a lower rate. Where losses exceed gains, the IRS allows the excess against ordinary income up to the lesser of $3,000, or $1,500 if married filing separately, or your total net loss, and the remainder carries forward to later years without expiring. On a diversified account there is usually something underwater, and realising it in the same year as a large gain is the ordinary, published way to reduce the charge.

The 0% band is real and most people are above it

The IRS publishes a 0% capital gains rate where taxable income is at or below $48,350 for single filers and married filing separately, $96,700 for married filing jointly and qualifying surviving spouse, and $64,750 for head of household. That is taxable income after deductions, and it is the reason disposals are so often split across a low-earning year, a sabbatical or the first year of retirement. Above it the rate for most individuals is no higher than 15%, and a 20% rate applies above the 15% band.

What does not work, and the charge people forget

Selling and buying the same position back is governed by the wash-sale rules and is a question about your own facts rather than something this site answers in its own voice. What is certain is the charge sitting above the rate table: a 3.8 percent Net Investment Income Tax on the lesser of net investment income, which the IRS names capital gains as part of, or the amount by which modified adjusted gross income exceeds $200,000 single or head of household, $250,000 married filing jointly, or $125,000 married filing separately. A single large share disposal is the classic way an ordinary income crosses that line.

Questions people ask about how to avoid capital gains tax on stocks

Is there a way to sell shares and pay nothing?

Inside the published 0% band, yes: the IRS sets it at taxable income at or below $48,350 single and married filing separately, $96,700 married filing jointly and qualifying surviving spouse, and $64,750 head of household. Above it there is no published route to zero on a taxable account.

Do losses expire if I cannot use them this year?

No. Where a net capital loss exceeds the annual limit, the IRS says you can carry the loss forward to later years, where it nets against gains in full.

Does it matter which shares I sell if I bought at different times?

It decides both the holding period and the basis of what you sold, so it decides the answer. Which identification method applies to your account is a question about your own records, and it is worth asking an adviser before the sale rather than after.

Does the 3.8% surtax apply to share gains?

The IRS names capital gains among the kinds of income the Net Investment Income Tax reaches, charged on the lesser of net investment income or the excess of modified adjusted gross income over the statutory threshold.

Sources

Related answers

Put your sale to an adviserRead another state