Educational tool · not investment / tax / legal advice. Verify every plan with a Chartered Accountant before transacting. Full disclaimer ↓

LTCG Harvest India

Section 112A long-term capital gains harvesting planner for Indian retail mutual fund investors. Plan once a year, save up to ₹15,625 in tax — for free, in your browser.

🔒 100% in-browser ★ MIT open source
📜

The ₹1.25 lakh free pass

Every Indian FY, Sec 112A exempts the first ₹1,25,000 of your long-term equity / equity-MF gains from tax. Don't use it, lose it.

📈

Sell + rebuy = higher cost basis

Harvesting books your gains at the exemption today, then you rebuy at today's price — the basis you'll be taxed on later is now higher. 12.5% saved forever.

🤖

This tool tells you what to sell

Upload your CAS PDF. The tool replays every transaction, fetches current NAVs, and picks the exact units to redeem so booked LTCG lands at the exemption.

Loading Python runtime into this browser tab…
First visit downloads ~15 MB. Cached after that — later runs are instant.
1

Upload your CAS

A Detailed Consolidated Account Statement, covering the longest period available.

Get it from MF Central or CAMSonline — arrives by email in ~15 min.
Usually your PAN in UPPERCASE, or PAN + DOB as DDMMYYYY. Never saved or sent anywhere.
2

Stocks gains / losses this FY — optional, but matters

The ₹1.25 L exemption is shared with listed equity LTCG. Booking ₹40K on stocks already? The MF plan must shrink to fit. Losses on stocks actually expand the budget (they net off gains before the exemption).

Long-term equity rows are extracted automatically. CSV columns: isin, symbol, buy_date, sell_date, quantity, buy_value, sell_value.
3

Plan options

The default safety buffer absorbs typical mid-cap intraday NAV swing — leave it at 1.5% unless you know why you're changing it.

Indian MFs are end-of-day priced; the NAV you transact at isn't known yet. 1.5% guards against overshoot.
Indian FY runs Apr 1 → Mar 31.
4 Advanced options — skip unless you know you need them +

For unusual cases the form doesn't cover by default — NRI status, joint holdings, MF gains booked outside this CAS, and prior-year LTCL being set off now. Leave blank if none apply.

Only count MF redemptions outside what's in the CAS above (rare). Stock LTCG goes in section 2.
Long-term capital loss carried from earlier FYs that you're using to expand this year's budget. Different from current-FY stock LTCL (that's in section 2).
Engine warming up…
Fill the form above, then click Compute my harvest plan.

Frequently asked questions

Is my data really safe? Where does the PDF go?

It stays in your browser tab. There is no backend server — no PHP, no Node, no API. The page is plain static HTML hosted on GitHub Pages. When you select a file, the browser hands the bytes to a Python interpreter (Pyodide) running inside the tab's WebAssembly sandbox. We read it, compute the plan, and render the result. The PDF, password, and plan never leave your device.

Verify it yourself: open DevTools → Network tab → upload your file → click Compute. You'll see fetches to GitHub's CDN for the runtime + the static NAV file, and zero outbound requests carrying your data.

How accurate is the plan?

The arithmetic is exact for the lots in your CAS. What's not exact is the NAV you'll transact at — Indian MFs publish closing NAV after market hours, so any order you place today gets today's EOD NAV (declared tonight ~9 PM IST), not the NAV in the plan (which is yesterday's). Mid-cap funds typically move ±1–2% intraday. The default 1.5% safety buffer is sized to absorb this so booked LTCG stays inside the exemption.

Always spot-check the unit counts on your AMC portal before placing orders.

I don't see my fund in the recommendations. Why?

A few reasons it might be excluded:

  • Held < 1 year — not eligible for LTCG yet. Wait it out.
  • ELSS in 3-yr lock-in or solution-oriented fund in 5-yr lock-in.
  • NAV not on the AMFI feed — newly launched or suspended scheme.
  • Smaller gain-per-unit — the algorithm prefers high gain/unit lots so it can hit the budget while moving fewer units.

The Warnings section in your report lists every excluded scheme with the reason.

What about NSDL / CDSL demat-only CAS?

This browser build handles CAMS, KFintech, and MF Central PDFs (the broadest coverage). NSDL/CDSL demat-only CAS needs an additional 50 MB SQLite ISIN database that won't fit in the browser bundle — for those, use the CLI.

Why is the first load so slow?

The browser downloads a Python runtime (~10 MB), a slim ISIN database (~3 MB), and today's AMFI NAV snapshot (~2 MB) — about 15 MB total, all from GitHub's CDN. Your browser caches them, so the next time you open this page it's instant. No Python or pip is installed on your operating system.

How does the safety buffer trade off against unused exemption?

A 1.5% buffer on a ₹1.25 L budget = ₹1,875 of exemption held back. If NAV moves < 1.5% adversely between plan time and execution, your booked LTCG stays inside the exemption (zero tax). If NAV moves favourably you "leave" up to ₹1,875 on the table — you can claw that back tomorrow with a small top-up redemption against the now-known NAV. Pick 0% for max exemption + small overshoot risk; 2% for extra conservatism.

I found a bug / want to add a broker. How do I contribute?

Open an issue or PR on GitHub. For broker tax-P&L formats other than Zerodha, the column mapping lives in web/index.html → HEADER_MAP. Adding a new broker is usually one dict entry. See CONTRIBUTING.md for the dev setup.