If you buy shares for ₹1 lakh and sell them for ₹1.5 lakh, your capital gain is ₹50,000. The tax you pay depends on the holding period, which splits gains into short-term and long-term.
For listed equity and equity mutual funds, gains on holdings of over one year are long-term and taxed at 12.5% above a ₹1.25 lakh yearly exemption. Sell within a year and the gain is short-term, taxed at 20%.
Different rules and rates apply to property, debt funds and gold. Holding longer usually means a lower tax rate, which rewards patient investing, and losses can often be set off against gains to reduce the tax.