R. Mahesh & Associates · Chartered Accountants

Capital Gains Compiler

User Manual — turning broker evidence into a defensible Schedule CG
Assessment Year 2026-27 (FY 2025-26) · rmaaca.in

This tool reads messy broker, demat and mutual-fund statements and compiles them into an ITR-shaped capital-gains working: a Schedule CG summary, a scrip-wise Schedule 112A, an AIS reconciliation, and a one-page review memo. It is built on one principle — the AI only reads; the tax arithmetic is done in fixed code. No figure on screen is a language-model guess.

1 · What it does & what it doesn't 2 · Before you start 3 · Step 1 — Source intake 4 · Step 2 — Review the ledger 5 · Step 3 — The compilation 6 · AIS reconciliation 7 · The review memo (PDF) 8 · Exports 9 · Classification rules 10 · Cautions & limits 11 · Troubleshooting

Section 1What it does, and what it doesn't

The workflow is a pipeline with reviewable stops at every stage: extract → review → compute → reconcile → render.

It is an assistive working paper, not a certificate or a filing. It does not file returns, and it does not replace your professional judgement. Treat every flag as a review point.

Section 2Before you start

Have these ready (any combination — the tool accepts partial inputs and flags gaps):

Section 3Step 1 — Source intake

  1. Enter the Client name and PAN at the top (used only on the review-memo PDF).
  2. Paste the statement text into the box, or Upload a .csv / .xlsx — spreadsheets are read and converted to text automatically.
  3. Click Extract transactions. The agent profiles the source and returns one row per disposal, parsing Indian date formats and stripping commas. It does not compute tax.
Large statements: the agent returns a finite amount per call. If you have 50+ lots and extraction looks truncated, run it in smaller batches (paste a block, extract, then add the next block — extracted rows are kept). You can always add rows by hand.

Prefer to skip the AI entirely? Go straight to the ledger and use + Add row for fully manual entry. The tool then works as a pure calculator.

Section 4Step 2 — Review the ledger

Every cell is editable. Reconcile each row against your source and AIS/TIS before compiling. Field guide:

FieldWhat to enter
Scrip / UnitSecurity or scheme name.
ISINThe ISIN if available — it is the strongest key for AIS matching.
Asset typeDrives the whole classification. See the dropdown options in Section 9.
QtyNumber of shares/units in this lot. Needed for grandfathering (FMV × qty).
Buy / Sell dateYYYY-MM-DD. Determines the holding period.
Buy valueTotal acquisition cost for the quantity (include charges if your source does). Leave blank if genuinely unknown — it will be flagged, not silently assumed.
Sell valueTotal net sale consideration for the lot.
STTTick if Securities Transaction Tax was paid (normal on-exchange delivery). Un-tick for off-market sales — this changes the section (see note below).
FMV/unit 31-01-18Per-unit FMV on 31-Jan-2018. Enter only for STT-paid equity bought before 01-Feb-2018; otherwise leave blank.
Gain (source)Optional. The gain your broker states. The tool recomputes independently and flags any difference, so you can see grandfathering/charge effects.
Why STT matters: listed equity sold without STT (off-market) does not get the 111A/112A treatment — it falls to slab (short-term) or Section 112 (long-term), and grandfathering does not apply. The tool handles this automatically from the STT tick.

When the ledger is correct, click Compile.

Section 5Step 3 — The compilation

The output mirrors the ITR:

Confirmed vs provisional

If any row has a hole (missing date, cost, sale value, or unresolved type), the summary shows provisional totals up top and confirmed totals (resolved rows only) beneath. Resolve the flagged rows to make them equal.

Advanced selectors

STCG (slab) marginal rate — slab-rate short-term gains are added to total income, not taxed at a flat rate. Leave as "Add to total income" or pick a rate for an indicative estimate.
Surcharge — depends on total income; capped at 15% for 111A/112A/112. Set it if it applies.

Section 6AIS reconciliation (optional)

  1. Populate the ledger first (extract or manual).
  2. Paste or upload the AIS / TIS securities-sale extract in the reconciliation box.
  3. Click Reconcile with AIS.

The agent reads the AIS; fixed code then aggregates both sides by ISIN (AIS reports one line per security, your ledger is lot-wise) and compares. The flags:

FlagMeaningWhat to do
MatchedPresent in both, sale value agrees within tolerance.Nothing.
Value mismatchSame security, different sale consideration.Check for a missed lot, charges, or a wrong figure.
In AIS, not in ledgerA disposal the department sees that your working misses.Investigate — likely omission.
In ledger, not in AISIn your working but not reported in AIS.Often fine (off-market, non-reporting broker) — or a duplicate to remove.
Limitation: AIS carries the sale value, not the holding period or STT status, so it can confirm that a disposal exists and what it sold for — but it cannot reconcile classification (111A vs 112A). And AIS is a reporting source, never the tax computation itself. F&O / intraday turnover is excluded from this securities reconciliation.

Section 7The review memo (PDF)

After compiling, click Generate review memo (PDF). You get a one-page, RMA-letterhead document carrying the client/PAN/AY block, the section-wise computation and tax, any business income, the AIS reconciliation verdict with the actual omissions and mismatches listed, and the full exception list. The file is named with the client's name, e.g. CapitalGains_ReviewMemo_T_Sreedhar_AY2026-27.pdf.

Note on the ₹ symbol: the PDF engine uses a core font without the rupee glyph, so the memo prints amounts as "Rs". The on-screen tool and CSVs keep the ₹ symbol. This is deliberate, not an error.

Section 8Exports

Section 9Classification rules reference

For AY 2026-27 the full year falls on/after 23-Jul-2024, so one rate set applies throughout. How each asset type is treated:

Asset typeLong-term if heldShort-term headLong-term head
Listed equity (STT)> 12 months111A · 20%112A · 12.5%*
Equity mutual fund> 12 months111A · 20%112A · 12.5%*
REIT / InvIT / business trust> 12 months111A · 20%112A · 12.5%*
Listed bonds / debentures> 12 monthsslab112 · 12.5%
Unlisted shares> 24 monthsslab112 · 12.5%
Debt MF bought < 01-Apr-23> 24 monthsslab112 · 12.5%
Debt MF bought ≥ 01-Apr-23always short-term (Sec 50AA)slab
Other asset> 24 monthsslab112 · 12.5%
Intraday equitySpeculative business income — not capital gains. Sets off only against speculative income; carry-forward 4 years.
F&O / derivativesNon-speculative business income — not capital gains. Normal business set-off; carry-forward 8 years.

* LTCG u/s 112A is taxed at 12.5% only on the amount above the ₹1,25,000 annual exemption. Equity sold without STT moves to slab / 112. Grandfathering (cost stepped up to the 31-Jan-2018 FMV, capped at sale value) applies only to STT-paid equity acquired before 01-Feb-2018. Health & Education cess of 4% applies on the tax. Section 87A rebate is not available against these special-rate gains.

Section 10Cautions & what it does not do

The tool nets gains and losses within each Schedule-CG category only. The following are not applied automatically and need your manual judgement: Always reconcile against AIS, TIS and broker statements, and adjust cost and ISIN for corporate actions (bonus, split, merger, demerger).

Section 11Troubleshooting

SymptomFix
"Could not parse" after Extract / ReconcileThe statement was too large for one pass. Split it into smaller blocks, or enter rows manually.
"No disposals detected"The text had no recognisable sale rows. Paste the transaction section specifically, or add rows by hand.
A row sits in the wrong sectionCheck the Asset type and the STT tick — together they decide the head. Edit and re-Compile.
Totals look too highLook for rows flagged "missing cost base" — a blank buy value makes the gain overstated. These appear under provisional, not confirmed.
Amounts show "Rs" not ₹ in the memoExpected — the PDF font lacks the ₹ glyph. Screen and CSV keep ₹.
On rmaaca.in: "API 500 / could not parse"The proxy is not reaching Anthropic. Confirm ANTHROPIC_API_KEY is set in Netlify and that CLAUDE_ENDPOINT points to /.netlify/functions/claude.