Capital gains tax is the tax you pay when you sell stocks for a profit. The tax is a certain percentage on the calculated amount of profit you have made on the sale of stocks. If the profit is from a stock which was held for more than a year, then a lesser percentage is charged as tax, and when it is sold within the year of purchase, the tax percentage will be the same as for your regular income.
Capital gains tax is incurred only when you sell a stock for a profit and hence it is important to know the profit you have made on the sale of your stocks. It is quite straightforward when you have bought stock of the same company only once. But suppose you have bought 10 shares of XYZ for $20 and later bought another batch of 15 shares for $22, and then sold 10 shares for $21; have you made a profit or loss of $1per share. The cost of which batch of shares has to be taken to calculate the profit or loss? In such cases the tax department has given clear guidelines. You will have to choose either the LIFO (last in first out) or FIFO (first in first out) method for each company stock. Once you have chosen the system you cannot switch it for the stock of that particular company. You are allowed to choose a different system for each company stock.
Let us again look at the XYZ stock example in view of this system. Suppose you have chosen LIFO, you would have sold the stock you brought later and hence would have incurred a loss of $1 per share as you have sold the stock for $21 which was bought for $22. So you have made a loss of $10 and you do not need to pay any capital gains tax.
A capital loss can be subtracted from your other income up to a certain limit. To take an example, if you have made $60000 as your regular income and made a loss of the same amount in the stock market, you cannot declare a zero income for the year. If the limit is say $3000 you can claim a loss of that amount and your income would be $57000 for which you will be taxed. The rest of the loss can be carried forward to the next year and so on.