FIFO & Cost Basis

FIFO Sell-Through Explained: Why Selling ST Shares Forces LT Sales First

11 min read · Updated 22 February 2026

The Sell-Through Problem: FIFO's Most Costly Surprise

Imagine this scenario. You hold 300 shares of a stock. The first 200 were bought over a year ago and are now long-term. The most recent 100 were bought two months ago and are short-term. The short-term shares are sitting at a loss, and you want to harvest that loss to offset gains elsewhere.

Logically, you want to sell just the 100 short-term shares. But FIFO does not care about your logic. Under FIFO, the oldest shares must be sold first. To reach those 100 short-term shares, you must first sell through all 200 long-term shares.

This is the FIFO sell-through effect. It is one of the most impactful and least understood consequences of India's mandatory FIFO rule. It means that harvesting a short-term loss often forces you to realize long-term gains, and those forced gains may far exceed the short-term loss you were trying to capture.

Sell-through does not mean you literally sell in two transactions. You can sell all 300 shares in one order. But for tax computation, FIFO dictates that the first 200 sold are the long-term shares and the last 100 are the short-term shares. The sell-through effect happens automatically in the tax calculation.

This article explains when sell-through helps, when it hurts, and how to calculate the net impact before making a decision.

A Detailed Example: 200 LT Shares + 100 ST Shares

Let us walk through a real scenario based on typical portfolio conditions.

You hold 300 shares of Wipro: - Lot 1: 200 shares bought at Rs 400 on 1 January 2024 (long-term as of February 2025) - Lot 2: 100 shares bought at Rs 550 on 1 November 2024 (short-term)

Current market price: Rs 500.

Lot 1 (LT): Unrealized gain = (500 - 400) x 200 = Rs 20,000 Lot 2 (ST): Unrealized loss = (500 - 550) x 100 = -Rs 5,000

You want to harvest the Rs 5,000 short-term loss. Under FIFO, to sell the 100 ST shares, you must sell all 200 LT shares first. This means selling all 300 shares.

The tax consequence: - LTCG from 200 shares: Rs 20,000 (within Rs 1.25 lakh exemption, so tax = Rs 0) - STCL from 100 shares: Rs 5,000 (can offset STCG or carry forward)

In this case, sell-through is beneficial. The forced LTCG is within the exemption, so it costs you nothing, and you get a Rs 5,000 short-term loss to offset other gains. At 20% STCG tax rate, that saves Rs 1,000.

But the outcome changes dramatically when the LTCG from sell-through exceeds the exemption. That is where the calculation gets dangerous.

When Sell-Through Works in Your Favour

Sell-through is beneficial when the forced long-term capital gains fall within your Rs 1.25 lakh annual LTCG exemption. In this case, you pay zero tax on the LTCG while still capturing the short-term loss.

Scenario: You have not yet utilized any of your Rs 1.25 lakh LTCG exemption for the year. Your LT shares have accumulated gains of Rs 80,000. Selling through them triggers Rs 80,000 in LTCG, but since this is below the Rs 1.25 lakh threshold, the tax is zero.

Simultaneously, you harvest Rs 10,000 in short-term losses, which you can use to offset Rs 10,000 in STCG from other stocks. At 20% tax rate, this saves Rs 2,000.

In this scenario, you benefit doubly. First, you realize tax-free LTCG through the exemption (which effectively resets your cost basis at the current market price when you repurchase). Second, you capture a short-term loss for tax savings.

This is actually a form of combined gain harvesting and loss harvesting. The sell-through forces you to harvest long-term gains (which happen to be tax-free), while you intentionally harvest short-term losses (which save tax). TaxHarvestLab identifies these win-win sell-through scenarios automatically.

The key question is always: how much of your Rs 1.25 lakh LTCG exemption is still available? If the forced LTCG fits within the remaining exemption, sell-through is almost always profitable.

When Sell-Through Backfires: Exceeding the Exemption

Sell-through becomes costly when the forced LTCG exceeds your remaining Rs 1.25 lakh exemption. In this case, you pay 12.5% tax on the excess LTCG, and this tax may exceed the benefit from the short-term loss you were trying to harvest.

Scenario: You hold a stock with these lots: - 500 LT shares bought at Rs 200, current price Rs 800 (LT gain = Rs 3,00,000) - 50 ST shares bought at Rs 900, current price Rs 800 (ST loss = Rs 5,000)

You want to harvest the Rs 5,000 ST loss. But FIFO forces you to sell through all 500 LT shares first, triggering Rs 3,00,000 in LTCG.

After the Rs 1.25 lakh exemption, taxable LTCG = Rs 1,75,000. Tax at 12.5% = Rs 21,875.

The STCL benefit is Rs 5,000 x 20% = Rs 1,000.

Net result: You pay Rs 21,875 in LTCG tax to save Rs 1,000 in STCG tax. You are Rs 20,875 worse off. This is a catastrophic outcome that could have been avoided by simply not harvesting that small short-term loss.

This is exactly the kind of scenario that TaxHarvestLab flags as unprofitable. The tool calculates the net tax impact of every sell-through before recommending any harvesting action.

The Mathematics of Sell-Through: When to Proceed

To determine whether a sell-through is profitable, you need to compare two numbers:

  1. Tax saved from the short-term loss: STCL amount x 20% (STCG tax rate)
  2. Tax incurred from forced LTCG: Max(0, forced LTCG - remaining exemption) x 12.5%

If (1) > (2), the sell-through is profitable. If (2) > (1), you should not proceed.

Let us formalize this. Define: - L = total LTCG from sell-through lots - E = remaining LTCG exemption (out of Rs 1.25 lakh) - S = total STCL from the target lots

Tax saved = S x 0.20 Tax cost = max(0, L - E) x 0.125

Proceed if S x 0.20 > max(0, L - E) x 0.125

Simplify: if L <= E (LTCG within exemption), then tax cost is zero and you should always proceed.

If L > E, then proceed only if S x 0.20 > (L - E) x 0.125, which gives S > 0.625 x (L - E).

This means your short-term loss must be at least 62.5% of the excess LTCG for the sell-through to break even. In practice, this is a very high bar. If the forced LTCG exceeds the exemption by Rs 1,00,000, you need at least Rs 62,500 in STCL just to break even.

This mathematical framework is what TaxHarvestLab uses under the hood when evaluating sell-through scenarios.

Partial Sell-Through: Can You Sell Only Some LT Shares?

A natural question arises: instead of selling all the long-term shares to reach the short-term lot, can you sell just a portion?

The answer is that you can sell any quantity you want, but FIFO determines which lots that quantity comes from. If you sell fewer shares than the total long-term holding, you will only sell long-term shares and never reach the short-term lot at all.

For example, if you have 200 LT shares and 100 ST shares, and you sell 150 shares, FIFO assigns all 150 to the LT lot. You trigger LTCG on 150 shares but do not harvest any ST loss. This partial sale does not help with tax-loss harvesting.

To reach the short-term lot, you must sell at least 201 shares (all 200 LT plus at least 1 ST). The more ST shares you sell, the larger the STCL. But the entire 200 LT shares must be sold through regardless.

There is a middle-ground strategy: sell exactly enough to stay within the LTCG exemption and harvest a partial ST loss. For instance, if your remaining exemption is Rs 10,000 and each LT share has Rs 100 gain, you could sell 100 LT shares (triggering Rs 10,000 LTCG, within exemption) plus some ST shares. But wait, FIFO does not allow you to pick. You must sell LT first. So if you sell 250 shares, you get 200 LT and 50 ST. The 200 LT may exceed the exemption.

TaxHarvestLab uses a binary search algorithm to find the optimal number of shares to sell, balancing the forced LTCG against the harvested STCL to maximize net tax savings.

Strategies to Manage Sell-Through Risk

While you cannot avoid FIFO, you can manage the sell-through risk with proactive strategies:

  • Harvest gains throughout the year. If you regularly realize LTCG up to the Rs 1.25 lakh exemption through gain harvesting, the forced LTCG from sell-through is more likely to fit within your remaining exemption. This is the integration of gain harvesting and loss harvesting strategies.
  • Avoid building mixed LT/ST positions in the same stock when possible. If you are adding to a position that already has long-term lots, be aware that any future short-term loss harvesting will be complicated by sell-through.
  • Evaluate net impact before acting. Never harvest a short-term loss without computing the forced LTCG from sell-through. Use the formula from the previous section or let TaxHarvestLab compute it.
  • Consider not harvesting small losses. If the short-term loss is small (say, Rs 2,000) but the sell-through would force Rs 50,000 in excess LTCG, the harvesting is clearly not worth it.
  • Time your harvesting. If you expect the long-term shares to decline in value, waiting may reduce the sell-through LTCG. Conversely, if the stock is rising, the sell-through cost increases over time.

Sell-through is not inherently bad. It simply means that every tax-loss harvesting decision must be evaluated in the context of the full FIFO lot structure, not in isolation.

Key Takeaways on FIFO Sell-Through

The FIFO sell-through effect is one of the most important concepts for any investor practicing tax optimization in India. Here is what you need to remember:

  • To harvest a short-term loss, FIFO requires you to sell through all long-term lots first. There is no way around this.
  • If the forced LTCG falls within your Rs 1.25 lakh exemption, sell-through is beneficial. You get tax-free gain realization plus the STCL benefit.
  • If the forced LTCG exceeds the exemption, the 12.5% tax on excess LTCG may outweigh the 20% STCG tax saving from the harvested loss.
  • The breakeven condition requires the STCL to be at least 62.5% of the excess LTCG beyond the exemption.
  • Partial selling does not help you reach the ST lot. You must sell through all LT shares to begin consuming ST lots.
  • TaxHarvestLab evaluates sell-through impacts automatically and only recommends harvesting when the net tax benefit is positive.

Understanding sell-through transforms tax-loss harvesting from a simple concept into a nuanced optimization problem. The investors who understand this nuance save the most on taxes while avoiding costly mistakes.

See how this applies to your portfolio

Upload your Zerodha or Groww reports and get personalized recommendations in under 2 minutes.

Analyze My Portfolio Free

Frequently Asked Questions

Can I sell only my short-term shares without selling the long-term shares first?

No. Under India's mandatory FIFO method, the oldest shares are always sold first. If you hold both long-term and short-term lots of the same stock, you must sell through all long-term shares before the short-term shares are considered sold. You cannot selectively sell the newer lot.

What happens if the forced LTCG from sell-through is within my Rs 1.25 lakh exemption?

If the forced LTCG falls within your remaining Rs 1.25 lakh exemption, you pay zero tax on it. This is actually beneficial because you realize gains tax-free while simultaneously harvesting the short-term loss. It is a win-win scenario that TaxHarvestLab specifically looks for.

Is sell-through only a problem with tax-loss harvesting?

Sell-through is most impactful during tax-loss harvesting because you are deliberately selling shares, and the forced gains from earlier lots can undermine the strategy. However, the same FIFO ordering applies to any sale, including regular profit-taking. The key difference is that in loss harvesting, the sell-through cost may exceed the intended benefit.

Does TaxHarvestLab account for sell-through in its recommendations?

Yes. TaxHarvestLab computes the complete FIFO sell-through impact before recommending any harvesting action. It calculates the forced LTCG, checks it against your remaining exemption, and only recommends harvesting when the net tax benefit is positive after accounting for all sell-through effects.

🤝

Support Our Mission

TaxHarvestLab is free and always will be. Help us keep it that way for 10,000+ Indian investors.

10K+
Active Users
₹0
Ads • Ever
Contribute Now

One-time or monthly, your choice

Ready to optimize your capital gains tax?

TaxHarvestLab analyzes your actual broker data and shows you exactly what to sell — and what to hold — before March 31.

Analyze My Portfolio Free

Free forever. Works with Zerodha and Groww. Takes under 2 minutes.