I am the Research Analyst with Zoya, I will try my best to answer it in a detailed manner so that it can benefit you as well as the community InshaaAllah.
People do wonder if they invest in Shariah Compliant stocks then why is there a need to purify the income?
The reason why it is required to purify is that companies having less than 5% of their revenues coming from prohibited business activities are said to have passed the Sector-based Screens. But the proportion of dividends attributed to revenue generated from such non-permissible business activities and interest income will have to be purified.
Example: A company is selling computer parts and it is generating a revenue of 2000$, 1950$ is made from selling the computer and 50$ from interest earned through financing.
The Shariah Complaint revenue is 97.5% while as the non shariah complaint revenue is 2.5%. Since the non compliant revenue is less than 5% thus the company is deemed to be Shariah Complaint. When a Shariah sensitive investor invests in this company and gets a dividend from this company, such dividends will have to be purified to the extent of 2.5% of the dividends received.
Similarly there are many situations in which entities are going to generate revenue, through an activity or activities unrelated to the primary business of the company, revenue that is haram. In such instances, when clearly unlawful revenue is combined with the lawful, the relevance and significance of such revenues must be subjected to examination.
Muslim investors must estimate the extent of the haram elements and purify their holdings.
The dividend received by the shareholder needs to be purified as per the guidelines of Shariah principles laid down by the Shariah scholars. The reason why only dividends are needed to be purified is that the revenue made directly or indirectly by the entity is added into the profits, and it is the profits which are distributed by the entities to their shareholders. Thus dividend purification is required to be done rather than capital gains.
The formula which is used to determine is :
Interest Income / Total Revenue
Where Total Revenue is equal to Gross Sales + Other Income. This is the same formula which is used for screening of companies for eligibility of entering the investable universe.
The amount of money which is deemed to be purified has to be given away and the investor should not benefit from this amount which is given away, directly or indirectly.
The purification method is mentioned in the article Purification of Investments