Suppose an individual partakes in some mixture of short term trading and long term investing. Is there a multivariate formula that expresses under what conditions (average/variance of time in a position, short/long term capital gains rate, etc.) FIFO will result in lower taxes than LIFO, and vice-versa?

I have found several intuitive explanations of FIFO and LIFO, a few examples worked out by hand, and lots of rule-based opinions, but I haven't been able to find a formula that generalizes the decision.

  • If you can control the amount per-transaction, FIFO up to the # of long-term held stocks, then LIFO on the short-terms. No idea whether the IRS allows that or requires you to stick with one or the other for the whole year.
    – Kevin
    Mar 5, 2019 at 21:35
  • 2
    Tax questions require a country tag. Mar 5, 2019 at 21:54
  • Under the assumption that the oldest purchases have the greatest gains, it would make sense to hold them for a lower LTCG tax rate (US). But that isn't always going to be the case because later purchases could have been purchased at lower prices. The IRS let's you designate tax lots for sale as long as you have broker documentation (either online or written). I believe that you cannot switch back and forth between lot designation versus averaging. Mar 5, 2019 at 22:09
  • Each firm has a default method for calculating costs. Fund companies tend to favor average cost-per-share while brokers tend to use “first in/first out” (FIFO) for customers who don’t specify an accounting method. Some brokers use averaging for funds and FIFO for stocks. Mar 5, 2019 at 22:09

1 Answer 1


Assuming that this is the U.S. ...

Short term trading is not part of this equation. You're in, you're out and gains are taxed at the same rate as your ordinary income. FIFO, LIFO or averaging don't apply.

For your investments, share cost basis per tax lot may be sequentially higher or they might be zig zagging up and down if you were building a position over time. That means that earlier positions may have cost more or less per share. So some data sets might benefit from LIFO and while others from FIFO, or not at all.

If not salaried, your tax rate may vary from year to year. That would mean that in lower income years, you should realize larger gains and in higher income years, lower gains. That suggests lot designation over FIFO/LIFO.

I think that there are too many variables in play. The only way to know what the best plan of action and result would be would be in hindsight. So my gut feeling conclusion is that you should just sell the lots that best fit the circumstances of each tax year.

You must log in to answer this question.

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