Bachatt Logo

How to Calculate Capital Gains Tax on Stock Sales

Ankur JhaveryUpdated 21 March 2026
How to Calculate Capital Gains Tax on Stock Sales
Share:

Calculator and financial documents for tax planning

You bought a stock, it went up, and you sold it for a profit. Great. But here is the part many investors forget — you owe taxes on that profit. In India, profits from selling shares are called capital gains, and they are taxed differently depending on how long you held the stock. Understanding these taxes is essential for every investor because they directly impact your actual returns.

In this guide, we will explain how capital gains tax works on stock sales in India and how to calculate it correctly.

What Are Capital Gains?

Capital gains are the profit you make when you sell a capital asset (like shares) for more than you paid for it. If you bought a stock at Rs 100 and sold it at Rs 150, your capital gain is Rs 50 per share.

If you sell for less than your purchase price, it is a capital loss, which can be used to offset gains and reduce your tax liability.

Short-Term vs Long-Term Capital Gains

The tax rate depends on the holding period — how long you held the stock before selling.

Short-Term Capital Gains (STCG)

If you sell listed shares held for 12 months or less, the profit is classified as Short-Term Capital Gains. STCG on listed equity shares (sold through a recognized stock exchange with STT paid) is taxed at a flat rate of 20% (as per the updated tax rules effective from July 2024).

Long-Term Capital Gains (LTCG)

If you sell listed shares held for more than 12 months, the profit is classified as Long-Term Capital Gains. LTCG on listed equity shares has the following tax treatment:

  • LTCG up to Rs 1.25 lakh in a financial year is exempt from tax.
  • LTCG above Rs 1.25 lakh is taxed at 12.5% (as per the updated rules effective from July 2024).

How to Calculate STCG Tax

The formula is straightforward:

STCG = Selling Price – Purchase Price – Brokerage and Charges

Tax = STCG x 20%

Example: You bought 100 shares of XYZ at Rs 200 each and sold them after 6 months at Rs 250 each.

  • Purchase cost: 100 x Rs 200 = Rs 20,000
  • Selling price: 100 x Rs 250 = Rs 25,000
  • STCG: Rs 25,000 – Rs 20,000 = Rs 5,000 (ignoring charges for simplicity)
  • Tax: Rs 5,000 x 20% = Rs 1,000

Add applicable cess (4% health and education cess) and surcharge if your total income exceeds certain limits.

How to Calculate LTCG Tax

LTCG calculation requires considering the exemption limit and the grandfathering rule.

LTCG = Selling Price – Purchase Price (or Fair Market Value as on 31 Jan 2018, whichever is higher) – Brokerage and Charges

The grandfathering clause means that for shares bought before 31 January 2018, the purchase price is taken as the higher of the actual purchase price or the fair market value (highest traded price) on 31 January 2018. This ensures gains made before the LTCG tax was introduced are not taxed.

Example: You bought 100 shares at Rs 300 each in 2017. The highest traded price on 31 Jan 2018 was Rs 500. You sold them in 2025 at Rs 800 each.

  • Effective purchase price: Rs 500 (higher of Rs 300 and Rs 500)
  • LTCG per share: Rs 800 – Rs 500 = Rs 300
  • Total LTCG: 100 x Rs 300 = Rs 30,000
  • Exempt: Rs 1,25,000 (assuming no other LTCG in the year)
  • Taxable LTCG: Rs 30,000 – Rs 30,000 = Rs 0 (since it is below the exempt limit)

If your total LTCG for the year exceeds Rs 1.25 lakh, only the amount above Rs 1.25 lakh is taxed at 12.5%.

Capital Losses: How to Use Them

If you sell shares at a loss, you can use these losses to reduce your tax:

  • Short-term capital losses can be set off against both STCG and LTCG.
  • Long-term capital losses can only be set off against LTCG.
  • Unabsorbed losses can be carried forward for up to 8 years.
  • To carry forward losses, you must file your income tax return on time.

Tax on Intraday Trading

If you buy and sell shares on the same day (intraday trading), the profit or loss is not treated as capital gains. It is classified as speculative business income and taxed at your regular income tax slab rate. Speculative losses can only be set off against speculative gains and can be carried forward for 4 years.

How Is Tax Collected?

For STCG and LTCG on stocks, you need to calculate the tax yourself and pay it while filing your income tax return. If your total tax liability for the year exceeds Rs 10,000, you may need to pay advance tax in quarterly instalments to avoid interest under Section 234B and 234C.

Your broker provides a tax P&L report or capital gains statement that shows all your trades, gains, and losses for the financial year. Use this report to calculate your tax or share it with your CA.

The Bottom Line

Understanding capital gains tax on stock sales is not optional — it is essential. Short-term gains are taxed at 20%, while long-term gains above Rs 1.25 lakh are taxed at 12.5%. Always factor in taxes when calculating your real returns, file your ITR on time, and use capital losses strategically to reduce your tax bill.

Tax-Smart Investing with Bachatt
Bachatt helps India’s self-employed professionals save, invest, and plan their taxes efficiently. Stay on top of your investments and tax obligations with Bachatt. Download Bachatt today and make your money work smarter.