Equity & Mutual Fund Capital Gains Calculator
Log every buy and sell of a listed share or equity mutual fund. Gains are matched FIFO, oldest lot first, per security, split into short-term (Section 111A) and long-term (Section 112A), with loss set-off and the Rs 1.25 lakh LTCG exemption applied automatically.
Runs entirely in your browser: nothing you enter is sent anywhere.
Capital losses from earlier years that you reported on time and haven't used yet (they carry forward up to 8 assessment years). Enter the unused amounts, if any.
The CSV splits each sale by the FIFO lot(s) it drew from, so every row has one acquisition date, cost, consideration, gain and short/long-term flag. The CA summary opens your browser's print dialog; choose "Save as PDF" there.
Understanding the calculation
- FIFO matching
- For each security, buy lots are consumed oldest-first when you sell. If you bought the same stock at different prices on different dates, a sale is matched against your earliest unsold lot(s) first, which sets both the cost basis and the holding period for that portion of the sale.
- Section 111A: short-term (STCG)
- Listed equity or an equity mutual fund unit held 12 months or less, sold with STT paid, is taxed at a flat 20%. There's no exemption threshold, every rupee of net short-term gain is taxed.
- Section 112A: long-term (LTCG)
- Held more than 12 months, sold with STT paid, taxed at 12.5% only on gains above Rs 1.25 lakh in the financial year. The exemption is an annual aggregate across all your Section 112A gains, not per sale or per security.
- Grandfathering (units bought before 31 Jan 2018)
- The cost of acquisition for a lot bought before 31 January 2018 is the higher of your actual purchase price or the fair market value on that date, capped so it never exceeds your actual sale price. This protects gains that had already accrued before the new LTCG regime began. Enter the FMV per unit on that date when adding a buy, only if it applies, it's ignored otherwise.
- Loss set-off
- A short-term loss can offset both short-term and long-term gains. A long-term loss can only offset long-term gains, never short-term. This calculator nets everything within the year you've entered, then applies any brought-forward losses you enter (a short-term loss goes against short-term gain first, since that is taxed at the higher 20%). Anything still unabsorbed can be carried forward up to 8 assessment years in your ITR; this tool doesn't track that across years for you.
- Surcharge (not included in this calculator)
- Applies only if your total income from every source crosses ₹50 lakh in the year: 10% up to ₹1 crore, 15% up to ₹2 crore, 25% up to ₹5 crore, 37% above that under the old regime. Unlike crypto, gains under Sections 111A and 112A get a special surcharge cap of 15% regardless of how high your income is. It's added to the tax before the 4% cess is worked out on the combined total. Since this tool only sees these trades and not your total income, it can't compute this for you.
Common questions
What's the difference between STCG and LTCG on equity?
It comes down to holding period. Listed equity shares and equity mutual fund units held for 12 months or less are short-term (Section 111A), taxed at a flat 20%. Held for more than 12 months, they're long-term (Section 112A), taxed at 12.5% only on gains above Rs 1.25 lakh in the year. Both rates apply only when securities transaction tax (STT) was paid, which is the normal case for anything bought and sold through a stock exchange.
Does this calculator net my losses against my gains?
Yes, unlike crypto. A short-term capital loss can be set off against both short-term and long-term gains. A long-term capital loss can only be set off against long-term gains, never against short-term gains. This calculator applies that rule automatically within the year you've entered, and you can also enter unused losses brought forward from earlier years; whatever is still left over is shown as available to carry forward.
What's the grandfathering clause, and do I need to use it?
It only matters if you bought before 31 January 2018. For those buys, your cost of acquisition for tax purposes is the higher of what you actually paid or the fair market value on 31 January 2018 (capped at your actual sale price), which shields gains that built up before that date from tax. If you bought after that date, ignore it entirely, it doesn't apply.
Does surcharge apply on top of these rates?
Yes, if your total income from all sources crosses Rs 50 lakh in the year, using the same slabs as regular income: 10% up to Rs 1 crore, 15% up to Rs 2 crore, 25% up to Rs 5 crore, 37% above that under the old regime. The important difference from crypto: gains under Sections 111A and 112A get a special cap of 15% on surcharge no matter how high your income is, so a high earner's equity gains are surcharged less harshly than their crypto gains would be. This calculator doesn't compute surcharge since it only sees these trades, not your total income.
Does this apply to debt mutual funds too?
No. Since 1 April 2023, gains on debt mutual funds (and other non-equity-oriented funds) are taxed at your regular slab rate regardless of how long you held them, with no LTCG treatment and no indexation. That's a fundamentally different calculation from what this tool does, so keep debt fund gains out of here and work them out separately.
Are intraday equity trading or F&O gains covered here?
No. Intraday equity trades and F&O trades are treated as business income, not capital gains, taxed at your slab rate (or presumptive tax) with a completely different set of rules around expenses and losses. This calculator is for delivery-based equity and equity mutual fund holdings only. Use the F&O P&L calculator for strategy payoff, not tax.
Can I carry a loss forward to next year?
Under the law, yes, both short-term and long-term capital losses can be carried forward for 8 assessment years, provided you file your return on time. Enter any unused earlier-year losses in the brought-forward field and this calculator sets them off against this year's gains, then shows what is still left to carry forward. Reporting the carry-forward correctly in your ITR (Schedule CFL) is something to confirm with a Chartered Accountant.