How Long to Hold a Stock to Avoid Capital Gains Tax?

To avoid capital gains tax on a stock sale, hold the shares for more than one year before selling. That converts your profit from a short-term gain, taxed at ordinary income rates up to 37 percent, into a long-term gain taxed at 0, 15, or 20 percent depending on your taxable income. If your income stays below the 0 percent threshold for the year, you owe no federal capital gains tax at all. Knowing how long to hold a stock to avoid capital gains tax is only half the answer, though; the other half is what your income looks like in the year you sell.

How the One-Year Holding Period Works

Federal tax law draws a bright line between short-term and long-term gains based solely on how long you owned the stock. A gain is long-term only if you held the stock for more than one full year.1Office of the Law Revision Counsel. 26 U.S. Code 1222 – Other Terms Relating to Capital Gains and Losses Your holding period begins the day after you buy the stock and includes the day you sell it.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Sell on or before the one-year anniversary of your purchase and the profit is a short-term gain, taxed at whatever ordinary income rate applies to your bracket — 10 to 37 percent for the 2026 tax year.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Wait one more day and the same profit becomes long-term. That single day can move a large gain from a 37 percent bracket down to 20 percent, or lower.

Long-Term Capital Gains Rates for 2026

Once the holding period is satisfied, the rate you pay depends on your taxable income for the year of the sale. Three brackets apply for 2026:4Internal Revenue Service. Rev. Proc. 2025-32 – 2026 Adjusted Items

  • 0 percent for single filers with taxable income up to $49,450, married couples filing jointly up to $98,900, and heads of household up to $66,200.
  • 15 percent for taxable income above the 0 percent ceiling but below $545,500 (single), $613,700 (joint), or $579,600 (head of household).
  • 20 percent for taxable income above those 15 percent thresholds.

The 0 percent bracket is the direct path to owing nothing. Keep your total taxable income for the year — including the gain itself — inside those limits, and a qualifying long-term gain is federally tax-free.5Office of the Law Revision Counsel. 26 U.S. Code 1 – Tax Imposed Married couples filing separately qualify for the 0 percent rate only on taxable income up to $49,450.4Internal Revenue Service. Rev. Proc. 2025-32 – 2026 Adjusted Items The thresholds adjust for inflation, so they generally rise slightly each year.

The 3.8 Percent Surtax Higher-Income Sellers May Owe

Holding a stock long enough for long-term treatment does not necessarily zero out your federal tax. Higher earners may owe the 3.8 percent net investment income tax on top of the regular capital gains rate. The surtax applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds a fixed threshold:6Office of the Law Revision Counsel. 26 U.S. Code 1411 – Imposition of Tax

  • $200,000 for single filers and heads of household
  • $250,000 for married couples filing jointly
  • $125,000 for married filing separately

These NIIT thresholds are not adjusted for inflation and have not changed since the tax took effect in 2013.7Internal Revenue Service. Topic No. 559, Net Investment Income Tax The maximum combined federal rate on a long-term gain is therefore 23.8 percent.

Other Ways to Reduce or Eliminate the Tax

Holding for more than a year is the primary lever. Several others can shrink the bill further, or take it to zero, depending on your situation.

Pick Which Shares You Sell

If you bought the same stock in more than one lot, the shares you choose to sell affect both the holding period and the gain. By default, the IRS treats you as selling the shares you bought first.8Internal Revenue Service. Stocks (Options, Splits, Traders) Under the specific identification method, you can instead tell your broker exactly which lots to sell before the trade settles. That lets you pick lots held longer than a year to lock in long-term treatment, and lots with a higher cost basis to reduce the gain itself. Most online brokerages let you select lots directly at the point of trade.

Offset Gains with Losses

Capital losses offset capital gains dollar for dollar, so selling a losing stock in the same year can cancel out the tax on a winning one. If total losses exceed total gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately), and carry any remainder forward indefinitely.9Office of the Law Revision Counsel. 26 U.S. Code 1211 – Limitation on Capital Losses2Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Watch the wash sale rule. If you buy a substantially identical stock or security within 30 days before or after selling at a loss, the IRS disallows that loss for the current year.10Office of the Law Revision Counsel. 26 U.S. Code 1091 – Loss From Wash Sales of Stock or Securities The window runs both ways, creating a 61-day blackout period. A disallowed loss is not lost forever; it gets added to the basis of the replacement shares. You just cannot use it this year.

Hold Stocks Inside Retirement Accounts

Stocks bought and sold inside a traditional 401(k) or IRA are not subject to capital gains tax at all while the money stays in the account. The holding period of any individual stock is irrelevant; growth is tax-deferred.11Internal Revenue Service. Traditional IRAs The catch is that withdrawals come out as ordinary income, whether the underlying profits were short- or long-term.12Internal Revenue Service. Retirement Plans FAQs Regarding IRAs Distributions (Withdrawals) Withdrawals before age 59½ generally add a 10 percent early distribution penalty on top.13Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions

Roth IRAs work differently. Contributions go in after tax, and qualified distributions come out entirely tax-free, gains included. The account must have been open at least five years, and you must be at least 59½ or meet another qualifying event. Because gains are never taxed on a qualified Roth withdrawal, the holding period of any stock in the account has no tax consequence.

Inherited Stock Gets Two Tax Breaks

Stock you inherit receives a stepped-up basis: your cost basis resets to the fair market value on the date the original owner died, regardless of what they paid.14Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent If someone bought shares for $10,000 and they were worth $50,000 at death, your basis is $50,000, and the $40,000 of built-in gain is wiped out.

Inherited stock is also automatically treated as long-term, even if the deceased owned it only briefly. The statute grants “more than one year” status to property acquired from a decedent when the stepped-up basis rule applies.15Office of the Law Revision Counsel. 26 U.S. Code 1223 – Holding Period of Property You can sell the day after inheriting and still qualify for long-term rates. Combined with the reset basis, many heirs owe little or no capital gains tax.

Donate Appreciated Stock to Charity

Donating long-term appreciated stock directly to a qualified charity avoids the capital gains tax on the appreciation entirely, because you never sell. You can typically deduct the stock’s full fair market value as a charitable contribution, up to 30 percent of your adjusted gross income, with any excess carried forward.16Internal Revenue Service. Publication 526, Charitable Contributions The stock must have been held more than one year to qualify for the full fair-market-value deduction; stock held one year or less limits your deduction to your original cost basis.

Note the boundary if you were considering gifting appreciated stock to a family member instead: the recipient takes over your original cost basis and holding period, so the gain isn’t eliminated, only shifted.17Office of the Law Revision Counsel. 26 U.S. Code 1015 – Basis of Property Acquired by Gifts and Transfers in Trust That can still help if the recipient is in the 0 percent bracket when they sell.

What to Expect When You File

Your brokerage sends a Form 1099-B each year reporting the proceeds from your stock sales, the cost basis of the shares sold, and whether each transaction is short-term or long-term.18Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions Review the dates and basis carefully, especially for shares transferred from another firm or acquired through an employer plan, where brokerage records can be incomplete. Totals flow onto Schedule D of your Form 1040, with Form 8949 used for any transactions needing adjustment.19Internal Revenue Service. Instructions for Schedule D (Form 1040)

If a sale produces a large gain mid-year, regular paycheck withholding may not cover it. The IRS expects you to pay as you go, and a shortfall can trigger an underpayment penalty. Quarterly estimated payments using Form 1040-ES can close the gap.20Internal Revenue Service. 2026 Form 1040-ES, Estimated Tax for Individuals