How Long to Hold Stock to Avoid Capital Gains Tax?

To avoid federal capital gains tax on a stock sale, you generally need to hold the shares for more than one year and keep your taxable income below the 0% long-term capital gains threshold in the year you sell. That combination is what the question of how long to hold stock to avoid capital gains tax really turns on: the one-year mark moves your profit from ordinary income rates (up to 37%) into the long-term brackets of 0%, 15%, or 20%, and only the 0% bracket produces a true zero federal bill.1Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses

Why One Year Is the Line

Sell a stock you’ve held for one year or less and the profit is a short-term capital gain, taxed at the same graduated rates as your wages. For 2026 those rates run from 10% to 37%.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Hold the same shares for more than one year and the profit becomes a long-term gain, taxed on a separate, lower schedule.

The gap is real money. A single filer with $200,000 of taxable income would pay 24% on a short-term gain and 15% on a long-term gain from the same stock. Even for investors who won’t reach the 0% bracket, crossing the one-year line typically cuts the federal rate on the profit by nine percentage points or more.

How to Count Your Holding Period

Your holding period begins the day after you buy the stock and ends on the trade date you sell.3Internal Revenue Service. Publication 550 (2024), Investment Income and Expenses The trade date is when your order executes, not the later settlement date when cash and shares change hands.

Buy on March 15 and your clock starts March 16. To qualify for long-term treatment you have to sell on or after March 16 of the following year. Selling on March 15 leaves you one day short, and that single day flips the entire gain back to short-term rates. The safe habit is to add one day to whatever anniversary you’re watching.

The 2026 Long-Term Rate Brackets

Long-term capital gains have their own thresholds, separate from the ordinary income schedule. For 2026:4Internal Revenue Service. 2026 Adjusted Items – Maximum Capital Gains Rate

  • 0% rate: taxable income up to $49,450 (single), $98,900 (married filing jointly), $66,200 (head of household).
  • 15% rate: taxable income above the 0% threshold up to $545,500 (single), $613,700 (married filing jointly), $579,600 (head of household).
  • 20% rate: taxable income above the 15% ceiling.

The IRS stacks the numbers. Your ordinary income (wages, interest, business income) fills the brackets first, and long-term gains sit on top. If your salary already puts you at $40,000 and you realize a $20,000 long-term gain as a single filer, the first $9,450 of that gain falls in the 0% bracket and the remaining $10,550 is taxed at 15%. Only the overflow moves up, so a gain that straddles two brackets never costs you money on the portion that stayed below.

The 0% bracket is the actual path to owing nothing. Retirees living mostly on Social Security and modest withdrawals can often sell appreciated stock and pay no federal tax on the gain. Working-age taxpayers can do the same in a low-income year, such as during a career break or sabbatical, by keeping total taxable income under the threshold.

Higher Earners: The 3.8% Surtax

Above certain income levels, an additional 3.8% net investment income tax applies on top of the regular capital gains rate. It kicks in when modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately), and it applies to the lesser of net investment income or the amount over the threshold.5Internal Revenue Service. Topic No. 559, Net Investment Income Tax

So the true top federal rate on a long-term gain is 23.8%, and on a short-term gain it can reach 40.8%. These thresholds are not indexed for inflation, so more taxpayers cross them each year. “Avoiding” capital gains tax entirely is realistic only inside the 0% bracket; above it, the long-term rate reduces the bill rather than eliminating it.

Choosing Which Shares to Sell

If you’ve bought the same stock on multiple dates, the shares you actually sell drive the tax result. Most brokers default to first-in, first-out, which sells the oldest lots first. That default often helps because the oldest lots are the ones most likely to have already crossed the one-year line.

You can override the default through specific identification, choosing the exact lot you want to sell. That lets you pick shares that already qualify as long-term, or shares with a higher cost basis and a smaller taxable gain. The rule is that you have to instruct your broker before the trade settles; you can’t reassign lots when you sit down to prepare your return.3Internal Revenue Service. Publication 550 (2024), Investment Income and Expenses Most online brokerages now let you pick lots at the point of sale. If you’re sitting on a mix of holding periods, check the lot selection before clicking sell.

Inherited and Gifted Stock

Stock you inherit gets two significant tax breaks. Cost basis resets to the fair market value on the date of the original owner’s death, wiping out unrealized gains from their lifetime.6Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent And inherited shares are automatically treated as long-term regardless of how long anyone actually held them, so the one-year rule doesn’t apply.7Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property An executor can also elect an alternate valuation date six months after death if that reduces the estate’s total tax.8Office of the Law Revision Counsel. 26 U.S. Code 2032 – Alternate Valuation

Gifted stock works differently. You typically inherit the donor’s original cost basis and their holding period.7Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property If your uncle held the shares for nine months and gives them to you, you need only four more months to reach long-term status. One exception matters: if the stock’s fair market value on the gift date is below the donor’s original basis and you later sell at a loss, the lower fair market value is your basis for calculating the loss, and your holding period starts fresh from the date you received the gift. Before selling gifted shares, confirm the donor’s original purchase date and cost basis.

Qualified Small Business Stock: The Five-Year Path to Zero

A longer holding period can eliminate the tax on a different category of stock. Under Section 1202, for shares issued on or after July 5, 2025, an investor can exclude 50% of the gain after three years, 75% after four years, and 100% after five years. The maximum excludable gain is the greater of $15 million or ten times the original investment.

The company must be a domestic C corporation with gross assets under $50 million when the stock was issued, and you must have acquired the shares directly from the company rather than on a secondary market. This is aimed at early-stage investors in startups, not publicly traded stock, but for those who qualify it’s the clearest path to paying no federal capital gains tax at all.

Retirement Accounts Sidestep the Question

Inside a Roth IRA or a 401(k), buying and selling stock triggers no capital gains tax, so the one-year holding period is irrelevant to trades made in the account. With a Roth IRA, gains come out tax-free once you take a qualified distribution, which requires being 59½ and having made your first Roth contribution at least five taxable years earlier.9Office of the Law Revision Counsel. 26 USC 408A – Roth IRAs The five-year clock starts on January 1 of the tax year of your first contribution, which is why opening and funding a Roth early matters even with a small amount.

Traditional 401(k)s and IRAs defer rather than eliminate. No capital gains tax applies inside the account, but withdrawals are taxed as ordinary income, and pulling money out before 59½ generally adds a 10% early withdrawal penalty.10Internal Revenue Service. Topic No. 558, Additional Tax on Early Distributions From Retirement Plans Other Than IRAs The tax outcome depends on when and how much you withdraw, not on how long you held any particular stock.

State Taxes Are a Separate Bill

Federal treatment isn’t the whole picture. Most states tax capital gains as ordinary income, at rates ranging from nothing in states without an income tax to above 13% at the top end. A handful of states offer partial exclusions or reduced rates for long-term gains, and at least one taxes only gains above a specific dollar threshold. For a high earner in a high-tax state, the combined federal and state rate on a short-term gain can exceed 50%, which makes crossing the one-year line even more valuable. Check your state’s rules before selling; the treatment varies widely, and it can change whether “avoid” is realistic in your situation.