Suppose someone has a lower long-term capital gains tax rate than their short-term capital gains tax rate, but they also have large short-term capital losses. Is it legal to sell stocks to materialize a short-term capital gain and then immediately re-buy those same stocks?

The objective would be to have a higher-basis in the stock and re-start the one year clock to avoid having a long-term capital gain if the stock is sold within a year. I know you can't do this to create losses, but is there a similar rule preventing someone from doing this with gains?

  • 3
    Suppose someone has a higher long-term capital gains tax rate than their short-term capital gains tax rate - I'm pretty sure this is impossible, unless there is a weird edge case I am missing. Short-term gains are taxed as ordinary income, and long-term gains have a preferential rate that is lower. For example, the LTCG rate for MFJ is 0% until income is almost 90k, when it bumps up to 15%; normal income (including STCG) is in the 22% bracket before that point.
    – yoozer8
    Apr 11, 2023 at 3:14
  • Sorry, typo (or thinko). Fixed. Apr 11, 2023 at 5:26

3 Answers 3


This almost sounds like tax gain harvesting (which is similar to, but less talked about that, tax loss harvesting), where you sell shares at a profit while in a low (or 0!) tax bracket to minimize the tax you owe, and re-buy at the higher price to reset the basis so that a future sale will have a smaller gain (or even a loss), minimizing potential tax impact.

My trouble with your approach is that converting long-term gains to short-term gains is usually (or always, unless there's a special case I'm missing) undesirable. Long-term gains get preferential tax treatment; the 3 rates are 0%, 15%, and 20%, and the rate is always lower than the rate on ordinary income (which is the rate applied to short-term gains).

Let's look at an example (based on 2022 numbers): you are a Single person earning $40,000 per year, and you have $1,000 in long-term capital gains, which last year was only $500 in gains (also long term). If you sell and realize these gains this year, your income is $41,000, which means these long-term gains are taxed at 0%. Alternately, if you sold and rebought last year, your $500 gain was taxed at 0%, but when you sell now, your new $500 gain is taxed as ordinary income (12%).

  • What if one were to believe that long term rates in the future would become higher than short term rates are now? I can envision wanting to set a higher basis.
    – Matthew
    Apr 11, 2023 at 4:24
  • If pigs had wings they'd be pigeons. Or pigisi. .... Yes, it's possible to construct a scenario where this might be desirable, but I don't think most of us consider that likely on a reasonable time scale.
    – keshlam
    Apr 11, 2023 at 4:58

The purpose of the wash sale rule is to prevent tax loss harvesting, which defers (not eliminates) the tax benefits of losses. Technically you can also have tax gain harvesting if you expect your capital gains rate to be higher in the future, or have losses that you are willing to use to offset those gains.

As of now there is no rule against tax gain harvesting, since it benefits you somewhat but does not hurt the government. They are typically more concerned about deferring taxes than what rate you end up paying. In other words, the rules are geared towards getting tax money sooner, even if it means you get the benefit of a lower rate.

Note that it would be very unusual for long-term rates to be higher than short-term rates in different tax years, but it is plausible for you to have lower short- or long-term rates now than in the future since they are based on ordinary income brackets. So if you have an unusually low income year you might actually employ tax gain harvesting to take advantage of lower gains rates now.

Also note that wash sales are not illegal, they just defer the tax break until you ultimately close your position. You can still sell at a loss and immediately buy back, you just don't get the immediate tax benefit.

  • Note that it would be very unusual for short-term rates to be higher than long-term rates - there might be some cases where the rates are equal, but short-term rates are always (or at least almost always) higher than long-term rates.
    – yoozer8
    Apr 11, 2023 at 3:26
  • Well there could be a situation where your short-term rates this year are lower than long-term rates next year, but it would take a massive change in gross income.
    – D Stanley
    Apr 11, 2023 at 3:28
  • True (except maybe the "massive" part), but in that case harvesting long-term gains this year to turn them into short-term gains next year would be an even worse plan, because the tax rate on the now-short gains would be even higher
    – yoozer8
    Apr 11, 2023 at 3:41

Is it legal to sell stocks to materialize a short-term capital gain and then immediately re-buy those same stocks?

When we discuss the wash sale rules it deals with determining what can be included on that year's tax forms. The wash sales aren't illegal.

Selling today with a gain is allowed. It also means that the gains from today will be reflected in this year's tax forms. Some people may sell when near the end of the year if they want to lock in a gain this year, instead of next year.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .