Zakat on stocks splits into two approaches depending on your intent.
If you hold stocks as a trader (intent to resell within the zakat year), the full market value at year-end is zakatable. This is the simpler case.
If you hold stocks as a long-term investor in operating companies, mainstream AAOIFI methodology applies zakat to the portion of each share that represents zakatable assets (cash, inventory, receivables) of the underlying company. The non-zakatable portion (fixed assets, equipment, intellectual property) is excluded.
In practice, halal-screened funds publish a per-share zakatable percentage annually. Multiply your share count by that percentage and you have the zakatable portion. The HalalRates zakat calculator field "Stocks (zakatable portion)" accepts this number.
For individual stocks not in a halal-screened fund, screening providers like Zoya and Musaffa publish per-stock zakat percentages alongside the Sharia compliance status. For stocks not covered, you can either use a conservative full-value approach or compute based on the company's most recent balance sheet (current assets divided by market capitalization).
Dividends received during the year add to your zakatable wealth at year-end. Capital gains are zakatable if realized and held in zakatable form (cash, bank account); unrealized gains follow the underlying stock treatment above.
Editorial methodology. Mufti review on stocks-specific zakat replaces this when corpus content covers it.