Suggest you to look at this chapter on Varsity.
Capital gains arise when you sell a capital asset for an amount that is more than what you originally got it for. Capital assets can be any products like mutual funds, stocks, real estate, etc. Capital gain is referred to the increase in the value of any of these capital assets when you sell them.
There are two types of capital gains - long-term and short-term capital gains. Depending on the type of the capital asset, if you hold the asset for more than 36 months, then it is a long-term capital gain. On the other hand, if you hold it for less than 36 months, then it is a short-term capital gain. For mutual funds and equities, the period is generally 12 months.
The tax that you incur on the capital gain is calculated based on the type of capital gain:
Short-Term Capital Gains like stocks or mutual funds - The capital gain which is the difference amount between the sale price and purchase price, is added to your total income. Then income tax is computed based on the tax bracket that you fall into if you consider your trading income as “business income.” If it’s not treated as a business, short-term capital gain is now at 15%.
Long-Term Capital Gain like real estate – since they are held for a longer time frame, the inflation costs also come into play here. An indexation value is applied to the capital gain in order to give a reasonable figure for long-term capital gain. The indexation value is fixed yearly, based on inflation trends of the year and then applied to the cost price and sale price of the capital asset. As of now, there is no long-term capital gains tax applicable in India for stocks held for longer than 1 year.