Shares are considered in two forms:
1- The ones that are traded in stock market: These are considered as commercial property and should be given one fortieth as Zakat.
2- The ones that are not traded in stock market: For these kinds of shares, you should first look at the left side (assets) of the balance sheet and take out the long-term (land, buildings, equipment, etc.) and intangible (goodwill, patents, trademarks, etc.) assets, than calculate your share in the short-term/current (cash, inventory, supplies, receivables, etc.) assets. That’s the part that you have to give one fortieth as Zakat.
For example: Let’s say that total assets of the company are 1,000,000$ and 600,000$ is the total long-term and intangible (static) assets like buildings, equipment, etc. and 400,000$ is the total short-term (dynamic) assets like cash, supplies, etc. You should calculate your share in 400,000$ and give one fortieth of it as Zakat.