Ledger & Candle
Chapter 13 · Risk & Systems

Costs & Taxation in India

Reading time ~75 min · Data as of 30 Sep 2026 · Rules checked 2 Oct 2026 for tax year 2026-27 · Based on Zerodha Varsity Module 7 (Markets and Taxation), all 8 chapters

Disclaimer: this is education, not tax advice

Tax law is detailed, it changes every Budget, and it depends on your whole situation: residency, other income, the regime you choose, and how you have filed in past years. This chapter explains the rules as they stand for tax year 2026-27 (1 Apr 2026 – 31 Mar 2027), checked against official and reputable sources on 2 Oct 2026. Use it to understand your position and to ask good questions, then have a Chartered Accountant (CA) review your return, especially in any year with F&O trades, losses to carry forward, or large gains. Every stock example below is historical analysis for teaching, not a recommendation.

1. What you'll learn and why it matters

Every trade you make has two silent partners: the government and the market infrastructure, which take transaction charges whether you win or lose, and the tax department, which takes a share of what you keep. Beginners often ignore both, because each charge looks tiny (0.1% here, ₹20 there) and tax feels like a problem for next July. Both matter. Costs decide whether a small edge survives at all, and taxes decide how fast your capital compounds.

By the end of this chapter you will be able to:

Why this matters for your style

Swing traders (holding days to weeks) pay 0.1% STT on both legs of every trade and 20% tax on net short-term gains. A strategy that makes 0.3% per trade before costs keeps very little after them. Long-term investors get the best treatment in Indian tax law: 12.5% above a ₹1.25 lakh yearly exemption, and only when they sell. Holding just past 12 months can change the tax a lot. Futures traders pay STT that more than doubled on 1 Apr 2026, their profits are taxed at slab rates as business income, and they must pay advance tax and file ITR-3. You will meet all three situations in this course, so you need all three sets of rules.

A note on names: the new Income-tax Act, 2025

From 1 April 2026 the Income-tax Act, 1961 has been replaced by the Income-tax Act, 2025. The old pair "financial year / assessment year" is now a single "tax year" (1 April to 31 March). The rates and concepts for traders carried over largely unchanged, but section numbers changed. You will still see the old numbers everywhere (brokers' reports, articles, CAs), so this chapter gives both: e.g. STCG on equity, old s.111A → new s.196; LTCG, old s.112A → new s.198; tax audit, old s.44AB → new s.63; presumptive income, old s.44AD → new s.58; advance-tax interest, old s.234B/234C → new s.424/425; dividend TDS, old s.194 → new s.393.

2. The charges on every trade, one by one

When you press "Buy" and later "Sell", seven kinds of money leave your account in addition to the share price. Some go to your broker, some to the exchange, some to the regulator, and some are taxes to the Central or State Government. A contract note (emailed by your broker after every trading day) lists each one. Here is what each charge is and why it exists.

  1. Brokerage: your broker's fee. Discount brokers such as Zerodha charge ₹0 for equity delivery, and 0.03% or ₹20 per executed order, whichever is lower, for intraday and futures, and a flat ₹20 per order for options. Full-service brokers often charge a percentage (0.2–0.5% for delivery is common), which on a ₹1.5 lakh trade can be more than all the other charges together.
  2. STT (Securities Transaction Tax): a Central Government tax on every trade in listed securities, collected by the exchange through your broker. It is the largest cost for most retail trades. It was introduced in 2004 as a simple way to collect tax on market activity. Its rate depends on the product (table below). CTT (Commodities Transaction Tax) is the equivalent on commodity derivatives: 0.01% on the sell side of non-agri commodity futures and 0.05% on the sell side of commodity options.
  3. Exchange transaction charges: the exchange's fee for running the market (NSE or BSE), charged on turnover. NSE also collects a tiny Investor Protection Fund Trust (IPFT) charge of ₹0.01 per crore, small enough to ignore.
  4. SEBI turnover fee: ₹10 per crore of turnover (0.0001%), paid to the market regulator.
  5. Stamp duty: a State-level duty collected centrally since July 2020 under the Indian Stamp Act. It is charged only on the buy side.
  6. GST: 18% on the services part of the bill: brokerage + exchange transaction charges + SEBI fee. There is no GST on STT or stamp duty, because those are themselves taxes.
  7. DP (depository participant) charge: when shares leave your demat account on a sale, the depository (CDSL/NSDL) and your broker charge a flat fee per stock per day sold, whatever the quantity. At Zerodha it is ₹15.34 (₹3.50 CDSL + ₹9.50 Zerodha + GST).

Current rates (as listed on zerodha.com/charges, 2 Oct 2026)

ChargeEquity deliveryEquity intradayFuturesOptions
Brokerage (Zerodha)₹00.03% or ₹20/order, lower0.03% or ₹20/order, lower₹20/order flat
STT0.1% on buy and sell0.025% on sell0.05% on sell0.15% of premium on sell; 0.15% of intrinsic value if a long option is exercised
NSE transaction charge0.00307%0.00307%0.00183%0.03553% of premium
SEBI fee₹10 per crore (0.0001%) on both sides
Stamp duty (buy side only)0.015%0.003%0.002%0.003% of premium
GST18% on (brokerage + transaction charge + SEBI fee)
DP charge₹15.34 per stock per sell daynonenonenone

The SEBI fee is ₹10 per crore as listed on 2 Oct 2026: a few paise on a normal trade. Other brokers' exchange and statutory charges are the same; only brokerage and DP charges differ. Other occasional charges include the demat AMC (annual maintenance charge; free under ₹4 lakh of holdings for a BSDA, or Basic Services Demat Account, at Zerodha), pledge fees, MTF (margin trading facility, i.e. buying shares with borrowed money) interest at 0.04% per day, and call-and-trade fees. They are not part of a normal round trip.

STT has been raised twice in two years: know which rate applies

Product (STT side)Until 30 Sep 20241 Oct 2024 – 31 Mar 2026From 1 Apr 2026
Futures (sell)0.0125%0.02%0.05%
Options premium (sell)0.0625%0.1%0.15%
Options exercised (intrinsic value)0.125%0.125%0.15%
Equity delivery (buy & sell)0.1%0.1%0.1%
Equity intraday (sell)0.025%0.025%0.025%

The October 2024 rise came from Budget 2024. The April 2026 rise came from Budget 2026 and applies to F&O trades entered on or after 1 April 2026. Its stated aim was to cool speculative derivatives trading. Cash-market rates did not change. When you read older articles, tutorials or backtests, check which STT they assumed.

Round-trip cost (any product) \[ \text{Total} = \underbrace{B}_{\text{brokerage}} + \underbrace{s_b V_b + s_s V_s}_{\text{STT}} + \underbrace{e\,(V_b+V_s)}_{\text{exchange}} \] \[ \qquad + \underbrace{10^{-6}(V_b+V_s)}_{\text{SEBI}} + \underbrace{0.18\,(B + \text{exch} + \text{SEBI})}_{\text{GST}} + \underbrace{d\,V_b}_{\text{stamp}} + \text{DP} \]
\(V_b,\ V_s\)
Buy value and sell value in ₹: price × quantity on each side. For options, use premium × quantity. \(V_b + V_s\) is the turnover of the round trip.
\(B\)
Total brokerage for both orders, in ₹ (₹0 for delivery at a discount broker; up to ₹20 per order for intraday, futures and options).
\(s_b,\ s_s\)
STT rate on the buy side and on the sell side, as a fraction (0.1% = 0.001). One of them is 0 for most products: see the table above.
\(e\)
The exchange transaction charge rate, as a fraction of turnover (0.00307% for NSE equity).
\(10^{-6}\)
The SEBI fee: ₹10 per crore = 10 ÷ 1,00,00,000 = 0.000001 of turnover.
exch, SEBI
Inside the GST bracket: the rupee amounts of the exchange charge and the SEBI fee you just worked out.
\(0.18\)
GST at 18%, charged only on the services part: brokerage + exchange charge + SEBI fee.
\(d\)
The stamp-duty rate, as a fraction, charged on the buy value only (0.015% for delivery).
DP
The depository charge in ₹ (₹15.34 per stock per sell day for delivery at Zerodha; zero for intraday and F&O).

How it works: the label under each brace names the charge. Work out each one in rupees from the rates in the table, then add them up. Most charges are a rate times turnover; STT and stamp duty look at one side only; GST is a percentage of three of the other charges; DP is a flat fee. Section 3 below does this line by line for four real trades.

Breakeven move \[ \text{Breakeven (points)} = \frac{\text{Total charges}}{\text{Quantity}} \] \[ \text{Breakeven (\%)} = \frac{\text{Total charges}/\text{Quantity}}{\text{Entry price}} \times 100 \]
Total charges
The round-trip cost in ₹ from the formula above.
Quantity
Number of shares, or units of the underlying for F&O (lots × lot size).
Entry price
The price you bought (or shorted) at, in ₹ per share or index points.
Breakeven (points)
Charges per share: the price move, in ₹ per share or index points, needed just to cover costs.
Breakeven (%)
The same move as a percentage of the entry price.

How it works: spread the total charges over every share you traded, then compare that with the price. This is how far the price has to move in your favour just to get back to zero. Any stop-loss, target or backtest that ignores it is overstating your edge. In the SUNPHARMA trade below, ₹345.41 ÷ 80 shares = ₹4.32 per share, which is 0.239% of the ₹1,806 entry.

3. Four real round trips and their breakeven

All prices below are actual NSE closing prices from the course data. Charges come from course/scripts/ch13_figures.py, and the framework's framework.costs functions give identical totals (cross-checked: ₹345.41 and ₹931.34).

Real example · SUNPHARMA · 15 Jun → 24 Aug 2026 · delivery swing

Swing trade: 80 shares bought at ₹1,806.00, sold at ₹1,910.00

  1. Buy value \(V_b = 80 \times 1{,}806.00 = ₹1{,}44{,}480\). Sell value \(V_s = 80 \times 1{,}910.00 = ₹1{,}52{,}800\). Turnover = ₹2,97,280.
  2. Brokerage = ₹0 (delivery at a discount broker).
  3. STT = 0.1% × 1,44,480 + 0.1% × 1,52,800 = 144.48 + 152.80 = ₹297.28.
  4. Exchange = 0.00307% × 2,97,280 = ₹9.13. SEBI = ₹10/crore × 2,97,280 = ₹0.30.
  5. GST = 18% × (0 + 9.13 + 0.30) = ₹1.70.
  6. Stamp duty = 0.015% × 1,44,480 (buy side only) = ₹21.67.
  7. DP charge on the sell day = ₹15.34.
  8. Total = ₹345.41, which is 0.12% of turnover. STT alone is 86.07% of it.
  9. Gross profit = 1,52,800 − 1,44,480 = ₹8,320. Net of charges = ₹7,974.59. Charges took 4.15% of the gross profit.
  10. Breakeven = 345.41 / 80 = ₹4.32 per share = 0.239% of the entry price. At a broker charging ₹20 per delivery order, the total would be ₹392.61.
Real example · SBIN · 1 Apr 2024 → 7 Aug 2026 · long-term sale

Long-term investment: 200 shares at ₹758.30, sold at ₹1,097.20 after 858 days

  1. \(V_b\) = ₹1,51,660; \(V_s\) = ₹2,19,440. STT = 151.66 + 219.44 = ₹371.10.
  2. Exchange ₹11.39, SEBI ₹0.37, GST ₹2.12, stamp ₹22.75, DP ₹15.34. Total ₹423.07.
  3. Gross gain ₹67,780; net ₹67,356.93. Charges were only 0.62% of the gain, because one round trip was spread over a 2.3-year move.

The lesson: for an investor, transaction costs hardly matter. For a trader, they matter on every trade.

Real example · NIFTY Sep-2026 futures · 1 → 4 Sep 2026

Futures round trip: 1 lot (65) bought at 24,090.30, sold at 24,048.10

  1. Contract value: buy 65 × 24,090.30 = ₹15,65,869.50; sell 65 × 24,048.10 = ₹15,63,126.50.
  2. Brokerage: 0.03% of ₹15.66 lakh is ₹470, so the ₹20 cap applies on each side: ₹40.
  3. STT = 0.05% × 15,63,126.50 (sell side only) = ₹781.56.
  4. Exchange = 0.00183% × 31,28,996 = ₹57.26. SEBI ₹3.13. GST = 18% × (40 + 57.26 + 3.13) = ₹18.07. Stamp = 0.002% × 15,65,869.50 = ₹31.32.
  5. Total ₹931.34. STT is 83.92% of it.
  6. Breakeven = 931.34 / 65 = 14.33 Nifty points (0.0595% of the price). At the pre-April-2026 STT of 0.02% the same trade cost ₹462.40 (7.11 points). The hike roughly doubled futures round-trip costs (+101.41%).
  7. This trade lost 42.2 points: gross −₹2,743, net −₹3,674.34. Costs made the loss 33.95% bigger.
Real data + hypothetical exit · NIFTY 27-Oct-2026 22700 CE · bought 30 Sep 2026

Options round trip: 1 lot (65) bought at the 30-Sep close of ₹316.25

  1. Premium paid = 65 × 316.25 = ₹20,556.25. Suppose you exit at +20%, at ₹379.50 (hypothetical).
  2. Brokerage ₹20 + ₹20 = ₹40. STT = 0.15% × (65 × 379.50) = ₹37.00. Exchange (0.03553% of premium turnover) ₹16.07. GST ₹10.10. Stamp ₹0.62. SEBI ₹0.05.
  3. Total ₹103.83, of which flat brokerage is 38.52%. Gross ₹4,111.25, net ₹4,007.42.
  4. Breakeven ≈ 103.83 / 65 ≈ ₹1.48 of premium, i.e. 0.47% of the premium. In rupees this is small, but for option buyers it is measured against a premium that loses time value every day (Chapter 10).
  5. Option seller (hypothetical): sell at ₹316.25, buy back at ₹158.12. Charges ₹91.31, gross ₹10,278.45, net ₹10,187.14.
  6. Exercise: if the long call is held to expiry and Nifty settles at 23,000 (hypothetical), STT is 0.15% of intrinsic value: 0.15% × (23,000 − 22,700) × 65 = ₹29.25 (₹24.38 under the old 0.125%). Since April 2026 the sell rate and the exercise rate are both 0.15%, so the old "exercise STT trap" (when exercise cost 0.125% against 0.0625% for selling) is mostly gone. You still save the exchange charge by letting it settle, but you lose control of the exit price.
Horizontal stacked bars of charges for four round trips: SUNPHARMA delivery Rs 345, SBIN long-term Rs 423, NIFTY futures Rs 931, NIFTY option buyer Rs 104; STT dominates the first three
Where the money goes. In delivery and futures trades, STT (red) is most of the bill. For option buyers, the flat ₹20 brokerage per order is the largest piece. Source: course data, Zerodha-listed rates (Oct 2026).
Bar chart comparing charges before and after 1 April 2026: NIFTY futures round trip Rs 462 to Rs 931, option buyer Rs 92 to Rs 104, exercise STT Rs 24 to Rs 29
The Budget 2026 STT increase on the same three trades. The futures round trip doubled in cost.
Contrast only · SUNPHARMA · 24 Aug 2026 · equity intraday

The same 80 shares bought at the open (₹1,902.40) and sold at the close (₹1,910.00) the same day

As intraday: brokerage ₹40, STT ₹38.20 (0.025% on the sell side only), total ₹101.37, breakeven 0.067%. Done as two delivery trades it would cost ₹354.57. Intraday looks cheaper per trade, but you trade many more times, the profit is taxed as speculative business income at slab rates, and losses can only be set against other speculative income. This course does not teach intraday, for the reasons in Chapter 1.

Trade size matters for delivery

Two parts of the delivery bill are fixed per trade: the ₹15.34 DP charge, and any per-order brokerage. On a small trade they become a large percentage. The 0.1% + 0.1% STT sets a floor near 0.2% that you cannot get below.

Trade size (each side)Breakeven, ₹0 brokerageBreakeven, ₹20/order brokerage
₹10,0000.376%0.848%
₹20,0000.299%0.535%
₹50,0000.253%0.348%
₹1,00,0000.238%0.285%
₹1,50,0000.233%0.264%
₹5,00,0000.226%0.235%
₹10,00,0000.224%0.229%
Line chart of delivery breakeven percentage versus trade size, falling steeply below Rs 50,000 and flattening near 0.22 percent
Below about ₹50,000 per trade, fixed charges noticeably raise your breakeven. Above ₹1.5 lakh, STT is almost the whole cost.
Common mistakes with costs

4. Cost drag: why trade frequency matters

One round trip is cheap. A year of them is not. Take a ₹5 lakh account that swings ₹1.5 lakh positions (₹349.06 per delivery round trip at Zerodha rates), or trades one Nifty futures lot (₹932.77 per round trip at a ₹15.66 lakh contract value):

Round trips per yearDelivery swing: costs as % of ₹5LNifty futures (2026 STT)Nifty futures (old 0.02% STT)
120.84%2.24%1.11%
241.68%4.48%2.22%
503.49%9.33%4.63%
1006.98%18.66%9.26%
20013.96%37.31%18.52%
Line chart of annual costs as a percent of Rs 5 lakh capital versus number of round trips, steepest for futures with 2026 STT
Cost drag grows in a straight line with the number of trades. Fifty futures round trips a year on a ₹5 lakh account costs over 9% of capital before any tax.

How to use it: before adopting any strategy, multiply its expected trades per year by the cost per trade, and compare that with its expected gross return. If costs take more than a third of the gross edge, the strategy is fragile: small changes in market behaviour will push it into loss.

5. Income-tax basics for tax year 2026-27

Income tax in India is charged on your total income for a tax year, grouped under "heads": salary, house property, business or profession, capital gains, and other sources. For a trader the relevant heads are salary (if employed), capital gains, business income and other sources (dividends, interest). The key idea is that some income is taxed at your slab rate and some at a flat special rate.

The new regime slabs (default since FY 2023-24; unchanged by Budget 2026)

Slab incomeRate
Up to ₹4,00,000Nil
₹4,00,001 – ₹8,00,0005%
₹8,00,001 – ₹12,00,00010%
₹12,00,001 – ₹16,00,00015%
₹16,00,001 – ₹20,00,00020%
₹20,00,001 – ₹24,00,00025%
Above ₹24,00,00030%
Step chart of new-regime marginal slab rates rising from 0 to 30 percent, with flat dashed lines at 20 percent for STCG and 12.5 percent for LTCG
Business income (F&O, intraday) and dividends are taxed at the slab rate. Equity capital gains are taxed at flat rates. Which treatment is better depends on where your other income puts you.
Worked example · rebate does not cover capital gains

Salary ₹10 lakh plus ₹1 lakh of short-term gains

  1. Salary after standard deduction: 10,00,000 − 75,000 = ₹9,25,000. Slab tax = 5% × 4L + 10% × 1.25L = ₹32,500.
  2. Total income = 9,25,000 + 1,00,000 = ₹10,25,000, which is ≤ ₹12 lakh, so the ₹32,500 slab tax is rebated to zero.
  3. But STCG tax is outside the rebate: 20% × 1,00,000 = ₹20,000, plus 4% cess = ₹20,800.
  4. Without the STCG the tax would be ₹0. A swing trader with a modest salary still pays the full 20% on short-term gains.
Worked example · basic-exemption adjustment

A student with only capital gains: STCG ₹3 lakh, LTCG ₹2 lakh

Slab income is zero, so the whole ₹4 lakh exemption is unused. It first absorbs the STCG (₹3 lakh → ₹0). The LTCG above ₹1.25 lakh is ₹75,000, and the remaining ₹1 lakh of exemption absorbs it too. Tax = ₹0. This adjustment is available to residents only.

6. Classifying your market activity

Step one of every tax question is: what kind of income is this? The same ₹1 lakh profit can be taxed at 0%, 12.5%, 20% or 30% depending on how it was earned and how you classify it. Varsity's Module 7 is built around this idea.

Flowchart: equity intraday leads to speculative business income; futures and options to non-speculative business income; delivery held up to 12 months to short-term capital gain; delivery held over 12 months to long-term capital gain, each with its rate and loss rules
The four buckets for an equity trader. Dividends form a fifth: "income from other sources", taxed at slab rate.
ActivityHead of incomeRateExpenses deductible?ITR
Equity intraday (no delivery)Speculative business incomeSlabYes, including STTITR-3
Futures & options (any holding, including intraday F&O)Non-speculative business incomeSlabYes, including STTITR-3
Delivery shares/equity MFs held ≤ 12 monthsShort-term capital gain (s.196, old 111A)20%Transfer costs only; not STTITR-2 (ITR-3 if you also have business income)
Delivery shares/equity MFs held > 12 monthsLong-term capital gain (s.198, old 112A)12.5% above ₹1.25 lakhTransfer costs only; not STTITR-2/3 (ITR-1/4 allowed if LTCG ≤ ₹1.25 lakh and no other CG or losses)
DividendsOther sourcesSlabNo (from tax year 2026-27, not even interest)Any

Why F&O is "non-speculative"

The law defines a speculative transaction as one settled without actual delivery. Intraday equity fits that definition. Derivatives traded on a recognised exchange are expressly excluded from it, even though most are cash-settled. So F&O profits are ordinary (non-speculative) business income. This matters for losses (see part 9): non-speculative losses are far more flexible than speculative ones.

Delivery trades: capital gains or business? You choose, then stay consistent

For listed shares, CBDT (Central Board of Direct Taxes, which administers income tax) Circular 6/2016 lets the taxpayer decide whether to treat holdings as investments (capital gains) or stock-in-trade (business income). Once chosen, you must apply it consistently in later years unless your situation genuinely changes. For shares held more than 12 months, if you choose capital gains the department will not dispute it. Very frequent short-term delivery trading is where tax officers may argue it is really a business. Many CAs advise treating a high-volume, short-holding delivery book as business income. You can keep two separate portfolios, a trading book and an investment book, and classify them differently, provided the records clearly separate them.

Computed comparison · same ₹2 lakh profit, two treatments

Which is cheaper: STCG at 20% or business income at slab?

Your other taxable income (after std. deduction)Extra tax as business incomeExtra tax as STCG
₹2 lakh₹0₹0
₹4 lakh – ₹10 lakh₹0₹41,600
₹12 lakh₹93,600₹1,04,000
₹14 lakh₹31,200₹41,600
₹16 lakh₹41,600₹41,600
₹20 lakh₹52,000₹41,600
₹24 lakh and above₹62,400₹41,600

Below ₹10 lakh of other income, business income stays inside the ₹12 lakh rebate, but STCG never gets the rebate. Above ₹16 lakh, the flat 20% wins. At exactly ₹12 lakh, both treatments push total income over the limit and wipe out the rebate on your salary too. That is the spike in the chart below. This comparison ignores the deductible expenses that business treatment allows, and the extra compliance it needs (ITR-3, books, possible audit). Do not switch treatment year to year to chase the lower number: consistency is required.

Line chart of extra tax caused by a Rs 2 lakh profit as business income versus STCG across other-income levels, with a spike at Rs 12 lakh
New regime, including cess, before expenses. The ₹12 lakh rebate cliff dominates for middle incomes.

7. Capital gains on listed shares: STCG and LTCG

The rules (tax year 2026-27, unchanged by Budget 2026)

20%
STCG (held ≤ 12 months)
12.5%
LTCG above the exemption
₹1.25 L
LTCG exempt per year
> 12 mo
to be long-term
Capital gain on a share sale \[ \text{Gain} = \big(V_s - \text{sell-side expenses}\big) - \big(V_b + \text{buy-side expenses}\big) \qquad \text{(expenses exclude STT)} \] \[ \text{STCG tax} = 20\% \times \text{net STCG} \] \[ \text{LTCG tax} = 12.5\% \times \max(0,\ \text{net LTCG} - 1{,}25{,}000) \] \[ \text{then multiply each by } 1.04 \]
\(V_s,\ V_b\)
Sale value and purchase value in ₹ (price × quantity).
Expenses
Brokerage, exchange charges, SEBI fee, GST, stamp duty and the DP charge on that side of the trade, in ₹. STT is not allowed: the law specifically disallows it for capital gains, while it is a deductible expense for business income.
STCG, LTCG
Short-term capital gain (shares held 12 months or less) and long-term capital gain (held more than 12 months).
net
The year's total gains of that type after subtracting allowed losses (set-off, part 9).
\(1{,}25{,}000\)
The ₹1.25 lakh yearly LTCG exemption.
\(\max(0,\ \dots)\)
"The larger of 0 and the bracket". If your LTCG is below ₹1.25 lakh, the bracket is negative and the taxable amount is 0, not a negative number.
\(1.04\)
Adds the 4% health and education cess on top of the tax.
  1. For each sale, take what you received after selling expenses and subtract what you paid including buying expenses. That is the gain (or loss, if negative).
  2. Add up the year's short-term and long-term gains separately, after set-off of losses.
  3. Tax short-term gains at 20%. For long-term gains, first knock off ₹1.25 lakh, then tax the rest at 12.5%.
  4. Multiply by 1.04 for cess. The TITAN example below shows the 12-month line changing the answer.
Real example · TITAN · bought 15 Sep 2025

Same 40 shares, sold seven days apart

  1. Bought 40 TITAN at ₹3,534.10 on 15 Sep 2025.
  2. Sale A, 10 Sep 2026 (day 360) at ₹5,021.00: gain = 40 × (5,021.00 − 3,534.10) = ₹59,476. Short-term: tax = 20% × 59,476 × 1.04 = ₹12,371.01. You keep ₹47,104.99.
  3. Sale B, 17 Sep 2026 (day 367) at ₹4,841.00: the price had fallen ₹180, so the gain is smaller at ₹52,276. But it is long-term, and inside the ₹1.25 lakh exemption (assuming no other LTCG that year). Tax = ₹0. You keep ₹52,276.
  4. Waiting a week cost 3.6% of price and still left you ₹5,171 better off after tax.

Honest caveat: this worked because the price fell less than the tax saved. A stock that drops 15% while you wait for the 12-month mark wipes out the benefit. Never hold a position past your stop-loss just to reach the 12-month mark: your trading plan comes before tax planning.

TITAN price chart Sep 2025 to Sep 2026 with buy marked, the 12-month line on 15 Sep 2026, a short-term sale on day 360 and a long-term sale on day 367
The 12-month line. Sale A was at a higher price but was taxed as STCG; Sale B was at a lower price but was tax-free as LTCG.

FIFO: which shares did you sell?

If you bought the same stock more than once, the tax law (CBDT Circular 768 of 1998, for demat holdings) and the depository both treat a sale as coming from your oldest lot first (First In, First Out). You cannot pick a lot. FIFO decides the holding period of what you sold, and therefore its tax treatment.

Real example · ITC · two lots, one partial sale, both at a loss

100 bought 2 Jun 2025 at ₹419.30, 100 bought 3 Nov 2025 at ₹413.95, 150 sold 15 Sep 2026 at ₹258.00

  1. ITC fell sharply after a steep cigarette excise-duty increase was announced at the end of December 2025 (the stock closed 9.7% lower on 1 Jan 2026, from ₹403.00 to ₹363.85). Both lots were under water.
  2. FIFO: the first 100 shares sold are the June lot (held 470 days, long-term). Loss = 100 × (258.00 − 419.30) = −₹16,130 LTCL.
  3. The next 50 come from the November lot (held 316 days, short-term). Loss = 50 × (258.00 − 413.95) = −₹7,797.50 STCL.
  4. Your broker's average cost (₹416.62) is irrelevant for tax. What matters is that the two losses have different set-off rights (see part 9 of this chapter): the long-term loss can only absorb long-term gains.

8. Grandfathering for shares bought before 1 Feb 2018

Until 31 Mar 2018, LTCG on listed shares was fully exempt. When the tax was brought back (Budget 2018), gains already earned up to 31 Jan 2018 were protected, or "grandfathered". For shares bought on or before 31 Jan 2018, the cost used is stepped up to the fair market value (FMV): the highest price quoted on a recognised exchange on 31 Jan 2018. The step-up can remove gains but cannot create a loss:

Grandfathered cost of acquisition \[ \text{Cost} = \max\Big(\text{Actual cost},\ \min\big(\text{FMV}_{31\text{-Jan-}2018},\ \text{Sale price}\big)\Big) \]
Actual cost
What you really paid per share, in ₹.
\(\text{FMV}_{31\text{-Jan-}2018}\)
The fair market value per share: the highest price quoted on the exchange on 31 Jan 2018.
Sale price
What you sold at per share, in ₹.
\(\min,\ \max\)
\(\min\) picks the smaller of the two numbers in its bracket; \(\max\) picks the larger.
Cost
The cost per share used to compute the taxable gain.
  1. Inner step: take the smaller of the FMV and the sale price. Capping at the sale price is what stops the step-up from creating a loss.
  2. Outer step: take the larger of that number and your actual cost. You never get a cost lower than what you paid.
  3. Gain = quantity × (sale price − cost used). Case A in the step-by-step box below shows both steps with MARUTI.

We took the FMVs from the actual NSE cash-market bhavcopy of 31 Jan 2018 (the day's HIGH column). Your broker's tax P&L report should apply the same figures.

CaseStock, buy dateActual costFMV 31-Jan-18SaleCost usedTaxable gain
A: bought below FMV, sold aboveMARUTI ×20, 3 Oct 2017; sold 15 Sep 20267,888.309,585.0012,231.009,585.00₹52,920 (not ₹86,854)
B: bought above FMVASIANPAINT ×100, 3 Oct 2017; sold 30 Sep 20261,148.801,139.802,402.601,148.80₹1,25,380 (no benefit)
C: sold between cost and FMVONGC ×500, 3 Oct 2017; sold 7 Mar 2022170.65204.60186.95186.95₹0 (not ₹8,150)
D: sold below costONGC ×500, 3 Oct 2017; sold 23 Mar 2020170.65204.6060.40170.65−₹55,125 (loss allowed on actual cost)
Step by step · Case A, MARUTI
  1. min(FMV, sale) = min(9,585.00, 12,231.00) = 9,585.00.
  2. max(actual, that) = max(7,888.30, 9,585.00) = 9,585.00.
  3. Gain = 20 × (12,231.00 − 9,585.00) = ₹52,920. The ₹33,934 of gain earned before 31 Jan 2018 is never taxed.
Two price charts, MARUTI and ONGC 2017 to 2026, with the 31-Jan-2018 FMV as a dashed line and buy and sell points annotated with the cost used and taxable gain
Grandfathering in pictures. MARUTI: the step-up removes the pre-2018 gain. ONGC: selling between cost and FMV gives zero gain; selling below cost keeps the real loss.

Grandfathering applies to listed shares and equity-oriented MF units acquired on or before 31 Jan 2018 (for MF units, the FMV is the NAV on that date). It matters only for long-term sales, which these always are now.

9. Setting off and carrying forward losses

Losses are worth money: a loss you are allowed to set off reduces the tax on a gain. The rules say which losses may absorb which income, in the same year and in future years.

Matrix showing which loss type can offset which income: short-term capital loss offsets STCG and LTCG; long-term only LTCG; F&O loss offsets everything except salary; intraday loss only intraday profit; with carry-forward periods 8, 8, 8 and 4 years
Same-year set-off by column. A carried-forward F&O loss can only be used against future business income.
LossSame year: can absorbCarry forwardFuture years: can absorb
Short-term capital lossSTCG and LTCG8 yearsSTCG and LTCG
Long-term capital lossLTCG only8 yearsLTCG only
Non-speculative business loss (F&O)Any income except salary: business, capital gains, dividends, interest, rent8 yearsBusiness income only (speculative or not)
Speculative loss (equity intraday)Speculative income only4 yearsSpeculative income only
Worked example · short-term loss against long-term gain

You have LTCG of ₹2,00,000 and a short-term loss of ₹50,000 in the same year. Net LTCG = 1,50,000. Taxable = 1,50,000 − 1,25,000 = ₹25,000. Tax = 12.5% × 25,000 × 1.04 = ₹3,250. Without the loss: (2,00,000 − 1,25,000) × 12.5% × 1.04 = ₹9,750.

10. Dividends and buybacks

Since 1 Apr 2020, dividends are taxed in the shareholder's hands at slab rate under "income from other sources". Points that matter in tax year 2026-27:

Real dividends · ex-dates Apr–Sep 2026

A small core portfolio's dividends

StockEx-date₹/shareSharesDividendTDS?
ITC27 May 20268.003002,400No (< ₹10,000)
COALINDIA31 Jul 20265.504002,200No (₹4,300 total)
COALINDIA4 Sep 20265.254002,100
HINDUNILVR23 Jun 202622.00501,100No
MARUTI7 Aug 2026140.00202,800No
SBIN15 May 202617.354006,940No
Total17,540

No TDS was deducted, but all ₹17,540 is still taxable at the slab rate. These dividends are used in the sample year in part 16.

11. F&O and intraday as business income

What you may deduct

Because F&O (and intraday) profit is business income, you are taxed on net profit after legitimate business expenses, at slab rate:

Keep bills and a bank statement trail for every expense. "Proportionate" means only the business share: a home broadband plan used mostly by the family cannot be claimed in full.

Turnover: the number that decides audit, not your tax

For business income, "turnover" is used to check audit and presumptive-tax limits. It does not affect how much tax you pay. Under the ICAI Guidance Note on Tax Audit (8th edition, Aug 2022):

F&O turnover (ICAI 2022) \[ \text{Turnover} = \sum_{\text{trades}} \big|\text{profit or loss of trade}\big| \]
\(\sum_{\text{trades}}\)
"Add up over every trade" (the Greek capital sigma means "sum"). Here: every F&O trade closed in the tax year.
\(\lvert\,\cdot\,\rvert\)
The absolute value: drop the minus sign. A loss of ₹3,827.85 counts as 3,827.85.
Profit or loss of trade
Sell value minus buy value of one closed trade, in ₹.

How it works: list every closed trade's profit or loss, turn the losses into positive numbers, and add everything. Profits and losses both increase turnover; they never cancel. The result is only used for audit and presumptive-tax limits, not to work out your tax.

Real premiums 30 Sep 2026 · hypothetical exits · option seller

Three Nifty short options, 1 lot (65) each

ContractSold atBought backP&L|P&L|
NIFTY 06-Oct-2026 22900 CE47.509.502,470.002,470.00
NIFTY 06-Oct-2026 22400 PE52.105.213,047.853,047.85
NIFTY 27-Oct-2026 22000 PE98.15157.04−3,827.853,827.85
Total1,690.009,345.70

Turnover = ₹9,345.70. Under the old method (adding ₹12,853.75 of premium received) it would have been ₹22,199.45.

Tax audit (s.63, old s.44AB)

Presumptive taxation (s.58, old s.44AD)

Businesses with turnover up to ₹2 crore (₹3 crore if cash receipts ≤ 5%) may declare a deemed profit of 6% of digitally received turnover (8% for cash) instead of keeping full books. Advance tax is then a single payment by 15 March. For traders, this scheme is a mixed blessing:

Most traders are better off filing ITR-3 with actual profit or loss and proper books. Ask a CA before using it.

Books of accounts

Varsity suggests a simple practical setup that still works: (1) a bank book: download all bank statements and note what each entry was; (2) a trading book: the broker's tax P&L, ledger, contract notes and year-end open-position statement. Formal books become mandatory once business income or turnover crosses prescribed limits. Business filers also report a simple balance sheet (what you own and owe) and P&L (trading revenue minus expenses) in ITR-3. Salary goes in its own schedule, not in this P&L.

The tax department sees your trades

Every trade is reported against your PAN. Your Annual Information Statement (AIS) and Form 26AS show sale values, dividends and TDS. A return that leaves out trading activity, even loss-making F&O, is easy to detect and can lead to notices, penalties and losing the right to carry losses forward. Report everything.

12. Advance tax and interest

Salary has tax deducted at source. Trading income usually does not. If your tax for the year, after TDS, is ₹10,000 or more, you must pay it in instalments during the year as advance tax:

Due dateCumulative share of the year's tax
15 June15%
15 September45%
15 December75%
15 March100%
Step chart of cumulative advance tax for the sample learner: Rs 1,169 by 15 June, Rs 13,370 by 15 September, Rs 18,587 by 15 December, Rs 18,175 final, compared with the 15/45/75/100 percent statutory path
The sample learner from part 16. Paying as you earn (blue) stays ahead of the statutory minimum (grey) once the big September gains are booked.
Computed · sample learner, extra tax ₹18,175.45 beyond salary TDS
  1. Pay as you earn: tax on income realised by each date: 15 Jun ₹1,168.55; 15 Sep ₹13,369.75; 15 Dec ₹18,587.03; final ₹18,175.45. The ₹411.58 extra paid by December (trading expenses accrued later in the year) comes back as a refund.
  2. Strictly, 15% of the year's F&O tax (₹8,132.02) was due by 15 June even though the trades came later. The interest on that shortfall is about 3% × 15% × 8,132.02 = ₹36.59. Small, but it shows why business income needs an estimate early.
  3. Pay nothing until 31 Jul 2027: s.425 interest ≈ 18,175.45 × (3%×15% + 3%×45% + 3%×75% + 1%×100%) = ₹917.86, plus s.424 interest = 18,175.45 × 1% × 4 months = ₹727.02. Total ≈ ₹1,644.88, about 9% of the tax, for nothing.

13. ITR forms, due dates and records

Your situationForm
Salary/pension, one house property, interest, dividends; LTCG (s.198) up to ₹1.25 lakh with no losses to carry forward; income ≤ ₹50 lakhITR-1
Above, plus any STCG, larger LTCG, capital losses to carry forward; no business incomeITR-2
Any F&O or intraday trading, or delivery trading treated as business (plus salary, capital gains etc.)ITR-3
Presumptive business income (s.58), simple casesITR-4

This is the form structure used for returns filed in 2026. Under the new Act the CBDT notifies the forms each year, so check the e-filing portal for the year you file.

Due dates

ReturnDue date (for tax year 2026-27: in 2027)
ITR-1 / ITR-2 (no business income)31 July
ITR-3 / ITR-4, non-audit business cases31 August (extended from 31 July by Budget 2026)
Tax-audit cases31 October (audit report earlier)
Belated return31 December (as under the earlier rules; confirm on the portal for your year). Late fee ₹5,000 (₹1,000 if income ≤ ₹5 lakh). Losses cannot be carried forward.
Revised return (to correct a filed return)Now up to 31 March of the following year (extended from 31 December by Budget 2026). A fee of ₹1,000 (income ≤ ₹5 lakh) or ₹5,000 applies if you revise after 31 December.
Updated return (ITR-U)Up to 48 months, with additional tax of 25%–70% of the extra tax depending on how late

Records to keep for each tax year

14. Legal tax habits: harvesting and timing

LTCG harvesting: use the ₹1.25 lakh exemption every year

The exemption resets every tax year and cannot be carried over. A long-term investor who never sells wastes it each year and later pays 12.5% on the whole accumulated gain. Harvesting means selling enough long-term units each year (typically in February or March) to book about ₹1.25 lakh of LTCG tax-free, then buying back. The new purchase price becomes your higher cost, so that gain is never taxed. The catch: the repurchased units start a new 12-month clock, and you pay a round trip of charges.

Real data · NIFTYBEES · ₹20,000/month SIP, Apr 2019 – Sep 2026

Harvest every March vs never selling

  1. 90 monthly investments of ₹20,000 = ₹18,00,000 invested. Value on 29 Sep 2026 ≈ ₹25.6 lakh in both strategies.
  2. No harvesting: unrealised long-term gain ₹7,80,391.85 and short-term loss ₹16,622.48. If everything were sold: tax = (7,80,391.85 − 16,622.48 − 1,25,000) × 12.5% × 1.04 = ₹83,040.02.
  3. Harvest each March (sell long-term units up to that year's exemption, rebuy the next trading day): booked ₹68,764.50 in 2021 (all the long-term gain available), ₹1,00,000 in each of 2022–2024 (the limit was ₹1 lakh then), and ₹1,25,000 in each of 2025–2026. Total ₹6,18,764.50, all tax-free when booked.
  4. Remaining long-term gain ₹1,56,464.05 → tax if everything were sold now: ₹2,885.57.
  5. Tax saved ≈ ₹80,154, for about ₹671 of extra charges. Equity ETFs pay only 0.001% STT on the sell side and none on the buy side, so harvesting them is very cheap. For individual shares, the 0.1% STT each way adds about ₹300 per ₹1.5 lakh round trip, which is still small next to the tax saved.
NIFTYBEES price 2019 to 2026 with green vertical lines at each March harvest labelled 69k, 100k, 100k, 100k, 125k, 125k, and bars comparing tax if sold: Rs 83,040 without harvesting versus Rs 2,886 with harvesting
Harvesting turns a large future tax bill into a series of tax-free yearly resets. Source: NIFTYBEES via Yahoo Finance (two bad prints in Dec 2019 removed).
Harvesting rules of thumb

Tax-loss harvesting

The opposite move: if you have booked gains, selling a losing position before 31 March realises a loss to set against them (a short-term loss can absorb both kinds of gain). India has no explicit wash-sale rule, but Varsity cautions that rapid sell-and-rebuy of the same stock purely to create a loss can draw scrutiny. Have a genuine reason, keep it simple, and ask a CA if the amounts are large. Never hold a bad position just to keep a loss for "tax reasons", and never sell a good one just to save tax.

For mutual funds and ETFs, Chapter 15, parts 10–11 work through both kinds of harvesting on SIP lots, and Chapter 16, part 14 combines the March harvest with rebalancing.

Other timing habits

15. Other assets and foreign stocks (brief)

AssetLong-term afterShort-term rateLong-term rate
Listed shares, equity MFs, equity ETFs12 months20%12.5% above ₹1.25 lakh
Debt mutual funds bought from 1 Apr 2023n/aSlabSlab (always)
Gold ETFs/funds, international funds (non-equity under Indian rules)12 months (listed ETF) / 24 months (fund)Slab12.5%, no indexation
Unlisted shares, foreign shares held directly24 monthsSlab12.5%, no indexation
Crypto / virtual digital assets30% flat on gains, 1% TDS, losses cannot be set off or carried forward

"Debt mutual funds" here means specified mutual funds: from 1 Apr 2025, funds with more than 65% in debt and money-market instruments (s.76 of the Income-tax Act, 2025; old s.50AA). Units of such funds bought before 1 Apr 2023 are long-term after 24 months and taxed at 12.5%. Chapter 15 sorts every kind of fund into its tax class, with debt, gold and international funds in part 12.

Foreign stocks (Varsity chapter 8): residents may remit up to US$250,000 a year under the Liberalised Remittance Scheme. Remittances for investment above ₹10 lakh a year attract 20% TCS (tax collected at source by your bank), which you can claim back against your tax. Budget 2026 cut TCS to 2% only for education and medical remittances; investment remittances stay at 20%. Foreign shares are long-term only after 24 months, taxed at 12.5%; short-term gains go at slab rate. Foreign dividends are taxed at slab, with credit for tax withheld abroad (e.g. 25% in the US) claimed through Form 67 under the tax treaty. Every foreign asset must be disclosed in Schedule FA (calendar-year basis), even if it earned nothing. Missing it can trigger a ₹10 lakh penalty under the Black Money Act (the penalty does not apply when the undisclosed assets other than immovable property total ₹20 lakh or less, and Budget 2026 aligned the prosecution provision with that threshold). Do not rely on the threshold: just fill in Schedule FA. Convert values using the SBI TT buying rate as the rules specify.

16. A full year for a sample learner

Let's put everything together. Our learner is a salaried resident (₹15,00,000 salary, employer deducts TDS on salary) on the new regime, doing what this course teaches: some delivery swing trades, a few long-term sales, a handful of futures trades, and collecting dividends. All prices are real closes; the dates fall in tax year 2026-27 (trades to 30 Sep 2026; nothing else happens later in the year).

(a) Nine delivery swing trades (about ₹1.5 lakh each) → STCG

StockBought → SoldDaysQtyBuySellTaxable gain*
ONGC20 Mar → 11 May 202652565265.40281.008,764.63
TITAN28 Apr → 5 May 20267334,417.004,373.60−1,480.26
NTPC4 May → 13 May 20269374400.05390.45−3,639.24
TATASTEEL6 May → 18 May 202612696215.47209.71−4,057.86
HDFCBANK3 Jun → 18 Jun 202615199753.65799.008,975.26
POLYCAB12 Jun → 25 Jun 202613159,554.009,531.00−392.54
SUNPHARMA15 Jun → 24 Aug 202670801,806.001,910.008,271.86
ADANIENT30 Jun → 23 Jul 202623493,036.003,010.00−1,322.74
TRENT21 Jul → 21 Aug 202631512,894.702,924.001,445.71
Net STCG (gains 27,457.46 − losses 10,892.64)16,564.82

*Sale value minus cost, after deducting brokerage, exchange charges, SEBI fee, GST, stamp duty and DP charges, but not STT. Five of nine trades lost money: a normal win rate for swing trading. The ONGC trade was bought in the previous tax year; only the sale date matters. Charges on the nine trades came to ₹3,113.50, of which STT was ₹2,675.93 and not deductible. That non-deductibility cost about ₹556.59 of extra tax (20% × 2,675.93 × 1.04). The cash P&L after all charges was ₹13,888.89 on ₹17,002.39 gross.

(b) Three long-term sales → LTCG

StockBought → SoldQtyBuySellTaxable gain
SBIN1 Apr 2024 → 7 Aug 2026 (858 days)400758.301,097.201,35,471.40
ASIANPAINT30 Sep 2024 → 29 Jun 2026 (637 days)503,329.102,656.90−33,661.50
MARUTI (grandfathered, cost = FMV 9,585.00)3 Oct 2017 → 15 Sep 2026207,888.3012,231.0052,895.51
Net LTCG (1,88,366.91 − 33,661.50)1,54,705.41

The ASIANPAINT long-term loss can only reduce long-term gains, so it is set against SBIN and MARUTI. Net LTCG above the exemption: 1,54,705.41 − 1,25,000 = ₹29,705.41 taxable.

(c) Four futures trades → non-speculative business income

Contract (Sep-2026 expiry)Side, datesEntryExitLotGrossChargesNet
NIFTYLong 3 → 6 Aug24,760.0024,861.40656,591.00960.845,630.16
NIFTYLong 20 Aug → 2 Sep24,392.6024,000.3065−25,499.50930.56−26,430.06
SBINShort 1 → 15 Sep1,036.20973.9075046,725.00484.7246,240.28
RELIANCEShort 8 → 24 Sep1,295.601,223.4050036,100.00412.0235,687.98
Totals63,916.502,788.1461,128.36

(d) Dividends → other sources: ₹17,540 (see part 10)

(e) The computation (new regime, resident, below 60)

Item₹
Salary 15,00,000 − standard deduction 75,00014,25,000.00
+ Business income (F&O)52,128.36
+ Dividends17,540.00
Slab income14,94,668.36
Slab tax: 0 + 20,000 (4–8L) + 40,000 (8–12L) + 15% × 2,94,668.361,04,200.25
STCG tax: 20% × 16,564.823,312.96
LTCG tax: 12.5% × 29,705.413,713.18
Rebate (total income 16,65,938.59 > ₹12 lakh)0.00
Cess 4% × 1,11,226.394,449.06
Total tax for the year1,15,675.45
Tax on salary alone (TDS by employer)97,500.00
Extra tax from market activity (pay as advance tax)18,175.45
₹10,868
F&O + dividends (slab, incl. cess)
₹3,445
STCG tax incl. cess
₹3,862
LTCG tax incl. cess
ITR-3
due 31 Aug 2027
Waterfall chart: tax on salary Rs 97,500, plus F&O and dividends Rs 10,868, plus STCG Rs 3,445, plus LTCG Rs 3,862, total Rs 1,15,675
How each activity adds to the bill. Long-term investing produced by far the largest profit (₹1.55 lakh) yet the smallest tax per rupee.

Two "what if" versions of the same year

What if · the futures had lost ₹80,000 instead

An F&O loss can be set against any head except salary in the same year. Set against dividends (₹17,540), then STCG (₹16,564.82), the remaining ₹45,895.18 reduces LTCG to ₹1,08,810.23, which is under the ₹1.25 lakh exemption. Tax = ₹97,500, the salary tax only. The loss wiped out all market tax for the year, but it did not touch the salary. If it had been larger, the unused part would carry forward for 8 years against future business income, provided ITR-3 is filed on time.

What if · same trading year, salary ₹12 lakh

Salary alone: 12,00,000 − 75,000 = ₹11,25,000, within the rebate limit, so tax ₹0. Add the same trading year: total income ₹13,65,938.59, above ₹12 lakh, so the rebate disappears. Tax = ₹69,152.70 (marginal relief does not help: the excess over ₹12 lakh, ₹1,65,938.59, is larger than the tax). Market income of about ₹2.4 lakh created ₹69,152.70 of tax, partly because it also made the salary taxable. If you are near ₹12 lakh, plan for this.

17. In your framework, and try it yourself

In your framework

framework.costs implements the October 2026 charges: equity_delivery_charges(buy, sell, qty), equity_intraday_charges, futures_charges, options_charges (premium values) and options_exercise_stt. It also provides capital_gains_tax(stcg, ltcg) (20% / 12.5% above ₹1.25 lakh, STCL-against-LTCG set-off, 4% cess), plus is_long_term and financial_year helpers. All rates live in framework/config.py with sources and an AS_OF date. Update that file after every Budget. framework.backtest.run_backtest(..., costs=True) deducts these charges from every simulated trade, and framework.risk.position_size can be checked against the breakeven move from part 2.

Snippet 1 uses the course's framework package; snippets 2 and 3 need only pandas. All three read files from the course repository's data/ folder, so save each as a .py file and run it from the repository's root folder (for example .venv/bin/python snippet.py; setup steps are in framework/README.md). If you do not have the repository, the self-contained charges() and equity_cg_tax() functions still work: type in your own prices instead of reading the CSV files.

1. Cost and breakeven of any delivery trade (reproduces the SUNPHARMA example):

import sys; sys.path.insert(0, ".")          # run from the repository root, so framework/ is importable
import pandas as pd
from framework.costs import equity_delivery_charges

df = pd.read_csv("data/ohlc/SUNPHARMA.csv",
                 index_col=0, parse_dates=True)
buy, sell, qty = df.loc["2026-06-15", "Close"], df.loc["2026-08-24", "Close"], 80
c = equity_delivery_charges(buy, sell, qty)
for k in ["brokerage", "stt", "exchange_txn", "sebi", "gst", "stamp_duty", "dp_charges", "total"]:
    print(f"{k:>13}: Rs {c[k]:>8.2f}")
print("breakeven move:", round(c["total"] / qty / buy * 100, 3), "%")   # 345.41 total, 0.239 %

2. A self-contained charges function and a real futures round trip (no framework needed):

import pandas as pd

def charges(buy_value, sell_value, seg="delivery"):
    """Round-trip charges at Zerodha-listed rates (Oct 2026). Options: pass PREMIUM values."""
    R = {  # stt_buy, stt_sell, exchange, stamp(buy), dp(per sell)
        "delivery": (0.001, 0.001, 0.0000307, 0.00015, 15.34),
        "intraday": (0.0, 0.00025, 0.0000307, 0.00003, 0.0),
        "futures":  (0.0, 0.0005, 0.0000183, 0.00002, 0.0),
        "options":  (0.0, 0.0015, 0.0003553, 0.00003, 0.0),
    }[seg]
    def brk(v):
        if v <= 0 or seg == "delivery": return 0.0
        return 20.0 if seg == "options" else min(20.0, 0.0003 * v)
    b = brk(buy_value) + brk(sell_value)
    stt = buy_value * R[0] + sell_value * R[1]
    exch = (buy_value + sell_value) * R[2]
    sebi = (buy_value + sell_value) * 10 / 1e7
    gst = 0.18 * (b + exch + sebi)
    stamp = buy_value * R[3]
    dp = R[4] if sell_value > 0 else 0.0
    return round(b + stt + exch + sebi + gst + stamp + dp, 2)

fut = pd.read_csv("data/fno/futures_aug_sep_2026.csv",
                  parse_dates=["TradDt", "XpryDt"])
nf = fut[(fut.TckrSymb == "NIFTY") & (fut.XpryDt == "2026-09-29")].set_index("TradDt")
lot = int(nf.NewBrdLotQty.iloc[0])
b, s = nf.loc["2026-09-01", "ClsPric"], nf.loc["2026-09-04", "ClsPric"]
tot = charges(b * lot, s * lot, "futures")
print(f"NIFTY fut buy {b} sell {s} lot {lot}: charges Rs {tot}, breakeven {tot/lot:.2f} points")
# -> charges Rs 931.34, breakeven 14.33 points

3. Grandfathering and the year's capital-gains tax:

import pandas as pd

def grandfathered_cost(actual_cost, fmv_31jan2018, sale_price):
    return max(actual_cost, min(fmv_31jan2018, sale_price))

def equity_cg_tax(stcg, ltcg, exemption=125_000):
    """Listed equity, tax year 2026-27, ignoring rebate/basic-exemption effects. Includes 4% cess."""
    if stcg < 0:                       # a short-term loss can absorb long-term gains
        ltcg, stcg = ltcg + stcg, 0.0
    tax = max(stcg, 0) * 0.20 + max(ltcg - exemption, 0) * 0.125
    return round(tax * 1.04, 2)

px = pd.read_csv("data/ohlc/MARUTI.csv",
                 index_col=0, parse_dates=True)["Close"]
buy, sell = round(px["2017-10-03"], 2), round(px["2026-09-15"], 2)
cost = grandfathered_cost(buy, 9585.00, sell)          # 9585.00 = NSE high on 31-Jan-2018
print("cost used", cost, "gain on 20 sh", round((sell - cost) * 20, 2))       # 52920.0
print("tax:", equity_cg_tax(16_564.82, 154_705.41))                            # 7307.19

Exercise: replace the two numbers in the last line with your own broker's tax P&L totals. If you have the course repository, rerun course/scripts/ch13_figures.py after changing the sample learner's salary in the script (SAL) to see how the bill changes.

18. Practical checklist

19. Key takeaways

Key takeaways

20. Quiz and exercises

Q1. You buy 100 shares at ₹1,000 for delivery and sell at ₹1,050. Using Zerodha-listed rates, what are the total charges and the breakeven move?

Buy value ₹1,00,000, sell ₹1,05,000, turnover ₹2,05,000. STT = 0.1% × 2,05,000 = ₹205.00. Exchange = 0.00307% × 2,05,000 = ₹6.29. SEBI = ₹0.20. GST = 18% × (6.29 + 0.20) = ₹1.17. Stamp = 0.015% × 1,00,000 = ₹15.00. DP = ₹15.34. Total ₹243.01. Breakeven = 243.01 / 100 = ₹2.43 per share = 0.243%. Net profit = 5,000 − 243.01 = ₹4,756.99.

Q2. A Nifty future trades at 24,000 (lot 65). What does a round trip cost at the same price, and how many points must Nifty move to break even? What was it under the old 0.02% STT?

Contract value 65 × 24,000 = ₹15,60,000 each side. Brokerage ₹20 × 2 = ₹40 (cap). STT 0.05% × 15,60,000 = ₹780. Exchange 0.00183% × 31,20,000 = ₹57.10. SEBI ₹3.12. GST 18% × (40 + 57.10 + 3.12) = ₹18.04. Stamp 0.002% × 15,60,000 = ₹31.20. Total ₹929.45 → 14.30 points. At 0.02% STT the STT would be ₹312, so the total ≈ ₹461.45 → about 7.1 points. The 2026 increase doubled the breakeven.

Q3. You bought shares on 10 Jan 2025. Is a sale on 10 Jan 2026 short-term or long-term? And on 11 Jan 2026?

Long-term requires holding for more than 12 months. 10 Jan 2025 → 10 Jan 2026 is exactly 12 months, so it is short-term (20%). Selling on 11 Jan 2026 makes it long-term (12.5% above ₹1.25 lakh). One day can change the tax a lot, so check the date before you sell.

Q4. This year you have LTCG of ₹2,00,000 and a short-term capital loss of ₹50,000. What is the tax on these?

A short-term loss can absorb long-term gains: net LTCG = 2,00,000 − 50,000 = ₹1,50,000. Taxable = 1,50,000 − 1,25,000 = ₹25,000. Tax = 12.5% × 25,000 = 3,125; with 4% cess ₹3,250. (If the loss had been a long-term loss, the answer would be the same, because a long-term loss also absorbs LTCG. The difference shows up only when you have STCG to absorb.)

Q5. Your salary is ₹12 lakh and you lost ₹1,00,000 in futures. You also booked ₹60,000 of STCG. What happens to the F&O loss?

An F&O (non-speculative business) loss cannot be set against salary. In the same year it can absorb other heads such as capital gains: it wipes out the ₹60,000 STCG (saving ₹12,480 of tax incl. cess). The remaining ₹40,000 is carried forward for 8 years, usable only against future business income. Only if you file ITR-3 by the due date. Salary tax is unchanged.

Q6. You bought a share in 2016 at ₹500. Its highest price on 31 Jan 2018 was ₹800. What is the taxable gain per share if you sell in 2026 at (a) ₹700, (b) ₹1,200, (c) ₹400?

Cost = max(actual, min(FMV, sale)). (a) max(500, min(800, 700)) = 700 → gain ₹0. (b) max(500, min(800, 1,200)) = 800 → gain ₹400. (c) max(500, min(800, 400)) = 500 → loss ₹100 (grandfathering never creates or enlarges a loss; the actual-cost loss stands).

Q7. Three futures trades this year: +₹12,000, −₹8,000, +₹3,000. What is your turnover, and do you need a tax audit?

Turnover = |12,000| + |−8,000| + |3,000| = ₹23,000. Net profit is ₹7,000 (taxed at slab after expenses). Audit is required only above ₹10 crore of turnover, or if you opted out of the presumptive scheme within five years with profit below 6% and income above the exemption. Neither applies, so no audit. You still file ITR-3.

Q8. Your salary after standard deduction is ₹11 lakh and you booked ₹50,000 of STCG from swing trades. Your colleague says "income under ₹12 lakh, no tax". Is that right?

Total income = ₹11.5 lakh, so the slab tax on salary is rebated. But the rebate cannot be used against tax on special-rate income: STCG tax = 20% × 50,000 = 10,000 + 4% cess = ₹10,400. Your colleague is wrong for capital gains. (Had the ₹50,000 been business income, it would have stayed within the rebate.)

Q9. You expect ₹40,000 of extra tax on F&O profits this year. How much advance tax should you have paid, cumulatively, by 15 September, and what if you pay nothing until July next year?

By 15 Sep: 45% × 40,000 = ₹18,000 cumulative (₹6,000 by 15 Jun). Paying nothing: deferment interest ≈ 40,000 × (3%×15% + 3%×45% + 3%×75% + 1%×100%) = ₹2,020, plus default interest of 1% per month from April to July (4 months) = ₹1,600: about ₹3,620 for nothing. Business income does not get the capital-gains exception.

Q10. In March you hold an index ETF with ₹3 lakh of unrealised long-term gain and have booked no LTCG this year. What should a tax-aware investor consider, and what is the saving?

Sell enough units to realise about ₹1,25,000 of long-term gain (tax-free under the exemption) and buy back the next day. The cost basis of that portion rises, so ₹1.25 lakh of gain is never taxed. Eventual saving ≈ 12.5% × 1,25,000 × 1.04 = ₹16,250, for charges of roughly ₹100–₹150 on an ETF. Repeat each year. Caveat: the rebought units restart their 12-month clock.

Q11. Company A pays you ₹12,000 of dividend in the year, company B ₹8,000. How much TDS is deducted, and how much is taxable?

TDS applies per company above ₹10,000: A deducts 10% × 12,000 = ₹1,200; B deducts nothing. All ₹20,000 is taxable at your slab rate; you claim the ₹1,200 as a credit. From tax year 2026-27, no interest or other expense can be deducted from dividend income.

Q12. Exercise: download your broker's tax P&L for last year and classify every line into STCG, LTCG, speculative, non-speculative and dividends. Compute the tax with the part 16 method. What would change if you had harvested LTCG in March?

Open-ended. Check your work: (1) net STCG and LTCG separately, with a short-term loss allowed against LTCG and a long-term loss only against LTCG; (2) F&O net of charges and expenses, at slab; (3) apply the ₹1.25 lakh LTCG exemption; (4) check whether the ₹12 lakh rebate applies to slab tax only; (5) add 4% cess. For harvesting: if your realised LTCG was below ₹1.25 lakh and you held long-term winners, the unused exemption × 12.5% × 1.04 is the tax you could have saved for good.

21. Sources

Zerodha Varsity, Module 7, Markets and Taxation (concepts; explained here in our own words, and updated where Varsity's figures are older): 1. Introduction (Setting the Context) · 2. Basics · 3. Classifying Your Market Activity · 4. Taxation for Investors · 5. Taxation for Traders · 6. Turnover, Balance Sheet and P&L · 7. ITR Forms (The Finale) · 8. Foreign Stocks and Taxation.

Charges (checked 2 Oct 2026): Zerodha charges page (brokerage, STT, NSE transaction charges, SEBI fee, stamp duty, GST, DP ₹15.34) · Zerodha Z-Connect: new STT and CTT rates · ClearTax: STT rates incl. Budget 2026 F&O hike · ICICI Direct: STT changes in Budget 2026 (futures 0.02%→0.05%, options 0.1%→0.15%, exercise 0.125%→0.15%, from 1 Apr 2026) · STT on ETFs (0.001% on sell).

Tax rules for tax year 2026-27 (checked 2 Oct 2026): Income Tax Department e-filing portal · Ministry of Finance: Memorandum explaining the Finance Bill, 2026 (official; STT rates and the 1 Apr 2026 effective date, buyback as capital gains, no interest deduction against dividends under s.93, ITR-3/4 due date 31 Aug under s.263(1)(c), revised return to 12 months, CG sections 196–198) · Budget Speech 2026-27 (official) · Finance Bill, 2026 (official text) · PRS Legislative Research: Union Budget 2026-27 analysis · KPMG: India Union Budget highlights 2026-27 · Business Today: slabs for FY 2026-27 unchanged · Taxguru: capital gains under the Income-tax Act, 2025 (s.196, s.198) · Taxguru: tax audit under s.63 · Presumptive taxation, s.58 (new Act) · Taxguru: advance tax and interest (s.424/425) · TDS on dividends, s.393(1), ₹10,000 threshold · Taxguru: Budget 2026 bars interest deduction against dividend/MF income · ClearTax: buyback taxed as capital gains from 1 Apr 2026 · ClearTax: Budget 2026 highlights (ITR-3/4 due 31 Aug; revised return to 31 Mar) · ICAI Guidance Note on Tax Audit (2022): option premium not part of turnover · TCS on LRS remittances after Budget 2026 (20% above ₹10 lakh for investment) · CBDT Circular 6/2016 (shares as capital asset or stock-in-trade) and Circular 768/1998 (FIFO for demat holdings).

Data: daily OHLC and dividends from NSE via Yahoo Finance (data/ohlc/); NSE F&O UDiFF bhavcopy Aug–Sep 2026 (data/fno/futures_aug_sep_2026.csv) and Nifty option chain 30 Sep 2026 (data/fno/nifty_options_2026-09-30.csv); NSE cash-market bhavcopy of 31 Jan 2018 for grandfathering FMVs (data/extra/ch13_nse_bhav_31jan2018.csv); NIFTYBEES history (data/extra/NIFTYBEES.csv). All calculations and figures: course/scripts/ch13_figures.py (numbers saved to data/extra/ch13_numbers.json). Examples are historical analysis for education, not recommendations or tax advice.

← PreviousTrading Systems & BacktestingNext →Mutual Funds & ETFs