Skip to content
Investment Math
Investment Math

Currency and number style

Only changes how amounts look. There is no currency conversion.

Capital Gains Tax Calculator (LTCG and STCG)

What tax does this sale carry, across every purchase lot?

What this tells you: A real sale matches several purchases at once, and each matched line lands in its own bucket. This runs the match oldest first, applies the yearly exemption and the losses in their legal order, works both routes for pre-cutoff property, and prints the whole working as tables you can check line by line.

Go to the calculator

Also called: ltcg calculator · stcg calculator · capital gains fifo calculator · property capital gains calculator Read the guide Last updated

Listed shares and equity funds use the equity rules.

Type one line: sale date, number sold, price for each, then selling costs such as brokerage.

1 rows read

Type one line per purchase: date, number bought, price for each, then buying costs.

2 rows read

The tax percent on short-term gains from equity.

Official figure, locked.To edit it, first open the disclaimer. Read the disclaimer

Check it at Income Tax Department

The tax percent on long-term equity gains above the yearly tax-free amount.

Official figure, locked.To edit it, first open the disclaimer. Read the disclaimer

Check it at Income Tax Department

The amount of long-term equity gains that pays no tax each year, before any rate applies.

Official figure, locked.To edit it, first open the disclaimer. Read the disclaimer

Check it at Income Tax Department

A percent added on top of the tax for health and education.

Official figure, locked.To edit it, first open the disclaimer. Read the disclaimer

Check it at Income Tax Department

Result

Total tax 5,061 — 98,667 long-term, 24,333 short-term.

This tool shows math, not advice.

Details

Sale value, less expenses225,000
Long-term gain98,667
Short-term gain24,333
Yearly exemption used-98,667
Long-term after everything0
Short-term after everything24,333
Tax before the levy4,867
Levy on the tax194.67
Total tax5,061
The match, line by line
PurchaseBoughtQuantityCostProceedsGainBucket
12023-06-0110050,000150,00098,667Long-term
22025-12-015050,00075,00024,333Short-term
Gains by bucket, and what stayed taxable
Chart data as a table
Long-term98,667
Short-term24,333
Taxable after everything24,333

Things to notice

  • Note: The exemption covered the whole long-term gain, and 26,333 of it is still free for another sale this year.nothing long-term to tax

Assumptions used

These stored figures sit behind the answer. Check each against its official source.

  • Tax rate on short-term equity gains: 20%. Official figure, Oct-Dec 2026, checked 2026-11-08. Source: Income Tax Department.
  • Tax rate on long-term equity gains: 12.5%. Official figure, Oct-Dec 2026, checked 2026-11-08. Source: Income Tax Department.
  • Yearly tax-free equity gains: 125,000. Official figure, Oct-Dec 2026, checked 2026-11-08. Source: Income Tax Department.
  • Health and education levy: 4%. Official figure, Oct-Dec 2026, checked 2026-11-08. Source: Income Tax Department.
  • Days to count as long-term, equity: 365. Official figure, Oct-Dec 2026, checked 2026-11-08. Source: Income Tax Department.
  • Days to count as long-term, other: 730. Official figure, Oct-Dec 2026, checked 2026-11-08. Source: Income Tax Department.

See every stored rate and when it was checked

How we got this

  1. The sale matches the purchases oldest first, 2 matched lines in the table below. Each line's gain lands in its own bucket by the days it was held.
  2. The first 125,000 of long-term equity gain is exempt every year; this sale used 98,667 of it, leaving 26,333 free for more sales this year.
  3. The long-term slice takes 12.50% and the short-term slice 20.00%, then the levy of 4.0% closes the bill.

About this answer

  • Matching runs oldest first, the way a demat account sells. The table below shows every matched line with its own dates and bucket.
  • The long-term test counts days: more than 365 for the equity class, more than 730 outside it, both typed as fields.
  • The yearly exemption is per year: 26,333 of it is still free after this sale, and next year it starts again in full.
  • That renewal is why some investors book long-term equity gains up to the exemption each year and buy straight back, resetting their cost the tax-free way.
  • Losses carry forward for 8 years, and only when the return lands on time; a lapsed year ends the carry.
  • The general income-tax rebate does not touch gains taxed at these special rates.
  • The rates here are the ones for sales on or after 23 July 2024. A sale between that April and July sat under the older figures, and the old-rule switch in the advanced boxes reads that one case.
  • Rates as of Oct-Dec 2026, checked 2026-11-08. Every rate, threshold, exemption and index on this page is an editable field with its date.
  • Compare at Income Tax Department (incometax.gov.in) or search: Google. Type the figures that apply to you in the boxes above if they differ.

Did this calculator help?

Keep this calculator. Your numbers are in the address, so a bookmark brings them back exactly as you left them. Press Ctrl + D · ⌘ + D

What to do next

Calculators that usually come after this one.

Not quite what you need?

Type your question in plain words and get the calculators that answer it.

    How the bill is worked out

    Match FIFO: each line's gain = qty × (sale price − cost) − sale expenses × qty share − lot expenses
    
    Bucket by days held: more than the threshold is long-term
    
    Long-term equity taxable = gain − the yearly exemption − losses − the claimed exemption
    
    Tax = each taxable slice at its own rate, then surcharge, then the levy
    qty share
    the matched quantity over the whole sale quantity
    threshold
    365 days for the equity class, 730 outside it, both typed
    rate
    the equity rates, the indexed route for old property, or the slab

    The match, the buckets, the set-off and the rates are all shown as tables, so the whole working can be checked.

    The rates on the page are dated fields for sales on or after 23 July 2024; the old-rule switch in the advanced boxes reads the early-2024-25 case.

    How to use it

    1. Say what was sold, then type the sale as one line: date, quantity, price each, expenses.
    2. List the purchases oldest first, one line each, with the 2018 value only for shares from before February 2018.
    3. Add any losses and the claimed exemption, check the rates against the notes, and read the bill with its full working.

    Example

    Selling 150 shares for 225,000, bought as 100 for 500 and 100 for 1,000, carries total tax of 5,061: 98,667 long-term and 24,333 short-term.

    Type these numbers into the boxes

    What did you sell?
    Listed shares or equity funds
    Details of the sale
    2026-10-10, 150, 1500, 2000
    What you bought, oldest first
    2023-06-01, 100, 500, 0 2025-12-01, 100, 1000, 0
    Tax rate on short-term equity gains
    20 %
    Tax rate on long-term equity gains
    12.5 %
    Yearly tax-free equity gains
    125,000
    Health and education levy
    4 %

    What you get: Total tax 5,061 — 98,667 long-term, 24,333 short-term.

    Put this example into the calculator

    What your answer means

    The match table is the working: every line's cost, proceeds and bucket, checkable against your contract notes. The exemption renews every year, and whatever survives the losses takes its own rate. Nothing here files anything; it is the arithmetic, shown whole.

    Words explained

    FIFO
    first in, first out: the sale matches the oldest purchases before the newer ones, as a demat account does.
    Bucket
    the long-term or short-term pool a matched line's gain lands in, by the days it was held.
    Set-off
    losses canceling gains before any rate applies, short-term against short-term first.

    How we calculate · the conventions behind every answer, in one place.

    What this capital gains calculator does

    A real sale is one price against several purchases, and the order of the match changes the answer. The page runs the FIFO match across every lot, buckets each line by the days it was held, applies the yearly exemption and the loss set-off in their legal order, works both routes for property bought before the 2024 cutoff, and closes the bill with the levy. Every rate is an editable, dated field.

    Questions about capital gains tax

    How does the calculator match a sale to my purchases?

    It matches the units sold to your purchase lots oldest first. Each matched line's gain goes into the long-term or the short-term group, by how many days it was held. In the default case a sale worth 225,000 after expenses matches 2 purchase lines, giving a long-term gain of 98,667 and a short-term gain of 24,333.

    How is the yearly exemption used?

    For listed shares and equity funds, the first 125,000 of long-term gain in a year is exempt. This sale uses 98,667 of it, so the long-term gain after the exemption is 0. That leaves 125,000 less 98,667, which is 26,333, free for more sales in the same year.

    How is the tax worked out?

    The long-term slice is taxed at 12.5% and the short-term slice at 20%. Here only the short-term gain of 24,333 is taxed, which gives 4,867 before the levy. The health and education levy of 4% adds 194.67, so the total tax is 5,061. Every rate is an editable field with a dated 'as of' line.

    What decides whether a gain is long-term or short-term?

    The number of days the asset was held. For listed equity, more than 365 days counts as long-term in the default setting; for other assets it is 730 days. A lot bought more than a year before the sale falls in the long-term group, and a recent lot in the short-term group. Both day counts can be changed on the page.

    Can losses and reinvested gains be included?

    Yes. The page has boxes for short-term and long-term losses from this year and from earlier years, and for gain set aside by reinvesting. Losses are set off against gains before the tax is worked out. In the default case all of these are 0. The page does not check whether your losses qualify; that depends on the rules for your return.

    Ask about this calculator

    Something the page does not answer? Ask it here. A person reads every question, and the useful ones are answered on this page.

    Your question goes to the site owner by email and is not stored on this site. If you add an email it is used only to reply.

    Cite this page

    Copy this line into a reference list, a report or a spreadsheet note.

    Investment Math Calculator. “Capital Gains Tax Calculator (LTCG and STCG)”. Updated 2026-11-29. https://investmentmathcalculator.com/tools/capital-gains/

    This tool shows math, not advice.

    Disclaimer: For education only. These calculators show arithmetic and hypothetical scenarios. They are not investment, tax or legal advice and do not recommend any security or product. Consult a licensed adviser in your country before acting.