General

What is Cost Basis?

Reviewed by Karthikeyan Anbarasan (Founder, TradeLyser) · Updated 19 Oct 2026 · Editorial policy

DefinitionCost basis is what you paid to acquire an investment, including acquisition costs such as brokerage and stamp duty, and it is the figure your gain or loss is measured from. Buy 100 shares at ₹1,400 with ₹40 of brokerage and other charges (excluding STT) and the cost basis is ₹1,40,040, or ₹1,400.40 a share.
Formula
Cost basis = (Purchase price × Quantity) + Acquisition costs; Capital gain = Sale value − Selling costs − Cost basis of the shares sold
Example
(₹1,400 × 100) + ₹40 = ₹1,40,040. Sold at ₹1,700 with ₹60 of selling costs: ₹1,70,000 − ₹60 − ₹1,40,040 = ₹29,900 (illustrative; STT excluded, see below)

FIFO: which shares count as sold

When you buy the same stock more than once and then sell part of the holding, you need to know which shares were sold. For shares held in a demat account, the Income Tax Department’s long-standing position (CBDT Circular 768 of 1998) is first in, first out: the earliest shares bought are treated as the first sold. Broker apps usually show one average price for the whole holding, which is useful for tracking but can give a different gain from the FIFO figure. Confirm the treatment for your own case with a tax professional.

LotDateQuantityPriceCost
Buy 110 Jan 2025100₹1,400₹1,40,000
Buy 215 Jun 2026100₹1,600₹1,60,000
Sell12 Oct 2026120₹1,700₹2,04,000 received

Illustrative, before charges. Under FIFO, the 120 shares sold are all 100 from Buy 1 and 20 from Buy 2. Buy 1 was held for more than 12 months, so its gain is long-term: (₹1,700 − ₹1,400) × 100 = ₹30,000. The 20 shares from Buy 2 were held for under four months, so their gain is short-term: (₹1,700 − ₹1,600) × 20 = ₹2,000. The 80 shares left carry a cost of ₹1,600 each, ₹1,28,000 in total.

FIFO (lot by lot)

₹32,000
₹30,000 long-term on the first lot plus ₹2,000 short-term on the second. The 80 remaining shares cost ₹1,28,000.
Basis generally used for tax on demat shares

Average price (broker view)

₹24,000
Average cost ₹1,500, so (₹1,700 − ₹1,500) × 120 = ₹24,000, with no split between long and short term. The 80 remaining shares show ₹1,20,000.
Useful for tracking, not for the tax split

Over the full life of the holding the two methods give the same total gain; they differ in when the gain is recognised and how it is split. The gap grows when the buys are at very different prices or when part of a holding is sold often. In this example, if there were no other long-term gains that year, the ₹30,000 falls inside the ₹1.25 lakh annual exemption, and the ₹2,000 short-term gain is taxed at 20%, ₹400 before surcharge and cess.

What goes into cost basis

ItemTreatment for capital gains on listed shares
Purchase price × quantityIncluded
Brokerage, exchange charges, GST on them, stamp duty, SEBI feeGenerally added to cost on purchase and deducted from sale value on sale
STTNot deductible when computing capital gains
Stock splitTotal cost unchanged, spread over more shares; holding period runs from the original purchase
Bonus sharesGenerally taken at nil cost, with the holding period starting from allotment
Shares bought before 1 February 2018A grandfathering rule can use the 31 January 2018 market value; check with a tax professional

Cost basis in a trading journal vs for tax

A trading journal measures each trade against its own entry, which is what you need for R-multiples, win rate and expectancy. If you scale into a position, log each fill so the journal can show both the blended entry and the lot-by-lot picture. If you average down, the new average hides the fact that the first lot is still losing; the lot record keeps that visible.

Tax treatment depends on what the activity is. Delivery investing usually produces capital gains measured from cost basis. Intraday equity trading is speculative business income and F&O is non-speculative business income, both taxed at slab rates, where charges are generally claimed as business expenses rather than added to a cost basis. Keep investing and trading in separately tagged accounts or portfolios so each can be reported correctly.

Rule of thumb
Keep lot-level records for every delivery purchase: date, quantity, price and charges. Most brokers also provide a tax P&L statement; check which method it uses before relying on it for your return. If you move shares between demat accounts, keep the original contract notes, since the receiving broker may not have the original purchase cost.
For investors in India
Listed equity held for more than 12 months is long-term: gains above ₹1.25 lakh a year are taxed at 12.5%. Held 12 months or less, gains are short-term and taxed at 20%. This page explains concepts and is not tax advice; confirm FIFO, corporate-action adjustments and your own figures with a tax professional.

Reference guide

ContextValueReading
Lot-level records: date, quantity and price for every buyClean recordsYou can work out FIFO cost, holding period and the tax split for any sale
Only the broker app’s average price written downIncompleteFine for tracking a position, but it can differ from the cost used for tax
Bonus or split shares entered at the market priceWrong basisAdjust the cost per share for the corporate action, or gains are misstated

Questions

What is cost basis in shares?

The amount you paid for the shares plus acquisition costs such as brokerage and stamp duty. Your gain or loss on sale is measured from it.

How is cost basis calculated for shares in India?

For shares held in demat, gains are generally worked out on a first in, first out basis: the earliest shares bought are treated as sold first. Confirm the method for your case with a tax professional.

Does cost basis include brokerage and STT?

Brokerage, stamp duty and similar transaction costs are generally included. STT is not deductible when computing capital gains on shares.

Why is my broker’s average price different from my tax gain?

The app blends all your buys into one average price. Tax on demat shares generally follows FIFO lot by lot, so the gain on a partial sale, and its long-term or short-term split, can differ.

What happens to cost basis after a bonus issue or split?

After a split, the same total cost is spread over more shares. Bonus shares are generally taken at nil cost with a holding period from allotment, while the original shares keep their cost.

Related terms