When your cycle of Zakah year completes, you should give the Zakah of the shares too. The Zakah will be paid in way that the amount invested in building machinery in the light of the company accounts will not be liable for Zakah, but the cash, raw and solid business materials will be liable for zakah. For example, the company showed that its total capital 100/- yielded a profit of 20/- and the company has the total 120 in the following conditions: 50 building machinery, 30 cash and 40 business materials. If you have invested 1 rupee in the company, it grew to 1.20 Rs which is: 50 paisa in building machinery, 30 paisa in cash and 40 paisa in business materials. So, you will not have to pay Zakah of building machinery (which is 50 paisa) and you will pay Zakah of the remaining 70 paisa (30 paisa cash and 40 paisa business materials).
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband