How to calculate income from demat account

How is income from a Demat account calculated for tax purposes?,