Is It Zakatable?: Earnings Made from Non-Shari'ah Compliant Stocks

Salam! I recently came into possession of a portfolio that had some non-compliant assets. I sold them and was able to determine the principle investment amount as well as the earnings. I was told that these earnings were to be given to zakat-eligible recipients (please confirm if this is correct or not).

My specific question is this: say I am obliged to give these earnings from haram assets away, but have not done so yet. Can I deduct that amount from my zakat calculations? Or do I include it? If it was zakatable, it would only increase the zakat payment by 150 USD, so it is not particularly worrying. I am asking for general understanding for the future.

Please let me know if the question needs clarificaiton.

Best, fi aman ALlah,

Wa alaykum salaam,

How did you come into possession of this portfolio?

Was it gifted to you? Did you purchase these shares?

Thank you for responding Mufti Faraz.

I was gifted them. I sold them as soon as I had access to the account.

Wa alaykum salaam,

In that instance, it is not permitted to keep anything from that sale.

Ok, so the whole value of those assets is to be given away, not just the profit, correct?

Moreover, how does this relate to the question on zakat? Do I include these haram earnings in the calculations?