This is for the US.

I have been doing DCA: Dollar Cost Averaging, so I have been buying Apple and Google (and some Amazon, QQQ, S&P500 ETF) regularly, perhaps $100 per day, in my regular personal account. (not IRA).

Due to the massive layoffs in the high tech industry, I may need to spend 2, 3 months to look for the next job, so I may need $2000 or $3000 meanwhile to pay for bills, and buy them back 2, 3 months later when I find a job.

In that case, when I sell my shares of Apple or Google (or Amazon or S&P500), I have the following choices:

  1. shares that I bought in January - March 2024, which is
    a. breaking even (no rise and no drop from the price I purchased)
    b. Same as above but dropped 3% or less
    c. Same as above but dropped 3% or more (hypothetically)
    d. Same as above but rose 3%
    e. Same as above but rose more than 3%

  2. shares that I bought within 12 months (so after March 2023), and is
    (a) to (e) the same as above, with (a) breaking even, (b) dropped less than 3%, etc

  3. shares that I bought and are longer than 12 months, say within these two years
    (a) to (e) the same as above

  4. shares that I bought 3 - 5 years ago
    (a) to (e) the same as above

Which shares should I sell so that I pay least tax and I think the final goal is to maximize the long term compounding?

My thoughts is that, it may be best to sell all the ones that are "breaking even" (the short term ones) first, so that it is as if I never bought them, and pay no tax.

If I sell some short term ones, even if it is very little profits, I am subject to paying tax immediately or within 2024. (as it is taxed as if it is wages, not as long term capital gain).

If I sell the ones that has some gains and are long term, it has a lower tax rate, but then it will make the compounding effect less, due to tax.

If I sell the ones that has some loss, I am afraid that if I buy them back in April, I may be subject to the wash sale rule. (which is: I cannot claim the loss so in effect, it is like, I may end up with a higher cost for the future shares, because I lost those claim for losses).

There also is some complication because after the previous job has ended, I can transfer some money over from my last job's 401k Roth which is limited to S&P500 and T Rowe Price Tech fund and Retirement Target 2030, 2035, etc, to a personal Roth IRA, so that I can buy Apple or Google or QQQ. So while I may not buy back the shares until May or June, but with this transfer of fund, I actually may use that fund to buy Apple or Google in March and April (within this 30 days). So I am not sure if this will put me as doing a "wash sale".

What may be a proper way or correct way to share these shares for temporary living expenses?

  • 3
    If you have multiple shares of a the same company bought at different times at different prices then from an investment perspective right now all the shares are completely equivalent and the question 'which ones do I sell' doesn't mean anything. It makes a differences for taxes, so I assume that is what you are interested in?
    – quarague
    Mar 20 at 18:37
  • right, on some investment firm's website, when you sell, you can specify "Sell the ones purchased on Feb 5, 2024, etc. Otherwise, they assume it is "FIFO", meaning selling the oldest shares I bought (and if that has a lot of gain, then you have to pay tax on those gain now, instead of in 2030 or 2035 when you retire) Mar 20 at 18:59
  • 1
    @Grade'Eh'Bacon I have savings... that's why now I am trying to come up with 2 to 3 thousand dollars. If I didn't have savings, I'd right now try to come up with $8000 to $10000... it is expensive to live in California Mar 20 at 19:12
  • 1
    @JimmyJames: All the lost compounding the question worries about applies to a Roth IRA as well... except now you're losing compounding of gains that will never be taxed. So that's much much worse than selling equity from a taxable account.
    – Ben Voigt
    Mar 20 at 22:05
  • 2
    Shares of the same company are fungible so it makes no difference which Apple shares you sell. Selling 100 shares purchased at $150 versus selling 100 shares purchased at $155 does not alter your future compounding (which shares you sell, not the act of selling). If you are trying to determine in terms of compounding whether it will be better to sell AAPL or to sell GOOG, that cannot be determined because the future is unknown. Mar 20 at 22:11

1 Answer 1


Your question is lengthy so I feel like you are over complicating things. Generally, you want to sell losses first, then gains, while also taking short/long term holdings into consideration. This means you sell in this order:

  1. Short-term losses
  2. Long-term losses
  3. Long-term gains
  4. short-term gains

This gives you the best tax treatment when selling. Although, as @Ben Voigt said in a comment, if you have a year with much lower income it might make sense in the long run to sell your long-term gains sooner since they might be taxed at 0%.

If by "keep the most compounding" you mean "have the most potential for growth" it doesn't really matter. If I have one share bought for $100 and another bought for $120 but the current price is $130; if I sell today I get $130. The only difference is what I pay in taxes. The "age" of the stock doesn't change what the potential growth is from today.

  • 2
    Except that tax bracket is based on net income, so a year with partial unemployment might be better for taking the gains than holding them and paying in a year of higher income and a higher rate.
    – Ben Voigt
    Mar 21 at 15:00
  • I do agree 100% with the final paragraph however.
    – Ben Voigt
    Mar 21 at 20:05
  • what about break-evens? Do they take precedence over losses? Mar 22 at 1:50
  • I don't understand your last paragraph. If I hold $1000 worth of Apple, but sold it this year and have to pay tax, and I can only buy back $800 worth of it two months later, sure my compounding is affected, because 20 years later, instead of holding N shares, I will only be holding 0.8N shares Mar 22 at 1:52
  • @StefanieGauss: You're both right: The "it doesn't matter" is measuring in number of shares. The future growth of any one share is equal to future growth of any other one share. However, the dollars you get from that one share to use immediately for expenses do depend on how much tax you owe. Either way, you have to pay tax on today's gain "someday", but because of time value of money, it's better to pay a smaller fraction of that today, and a larger fraction far in the future.
    – Ben Voigt
    Mar 24 at 4:35

You must log in to answer this question.

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