Short answer
Yes, buying shares can be halal. A share is part ownership of a company, so it is allowed when the company's main business is halal, its interest-bearing debt and cash stay within small limits, and you give away any haram part of your income from it. Shares in banks, alcohol, gambling and similar businesses are haram.
Buying ordinary shares is permitted when: the core business is halal; interest-bearing debt and interest-earning holdings are kept low (common screens use about a third of the company's market value); the share is not mostly cash or debts owed to the company; and the shareholder gives away the part of dividends that came from haram income. Short selling and buying on interest margin are not permitted.
The four schools agree on this.
Explanation
A share is not a loan. It is a small part of a real business, its assets and its profit, so owning shares is a form of partnership, which is lawful trade.
Shariah screens check two things:
- The business. No conventional banking or insurance, alcohol, pork, gambling, adult entertainment or similar. A small amount of incidental haram income, usually under 5% of revenue, is tolerated and purified.
- The finances. Interest-bearing debt below about a third of market value, interest-bearing cash and securities below about a third, and enough real assets that the share is not just money. Exact numbers vary by screen.
Purification. Work out the haram share of the company's income and give that percentage of your dividends to the poor without intention of reward. Many screening apps calculate it for you.
Why allow companies with any interest at all? Almost every listed company borrows or holds deposits. Scholars allowed a minority stake in such companies, with the shareholder disapproving of the interest and purifying the income, because the business itself is lawful. Some scholars are stricter and avoid every company with interest-bearing debt. Between the clear halal and the clear haram lie doubtful matters, and avoiding them protects your religion.
Contemporary scholars of all four schools accept screened shares in principle. For how much zakat is due, see zakat on stocks and shares.
The evidence
Quran, Surah Al-Baqara 2:275
ٱلَّذِينَ يَأْكُلُونَ ٱلرِّبَوٰا۟ لَا يَقُومُونَ إِلَّا كَمَا يَقُومُ ٱلَّذِى يَتَخَبَّطُهُ ٱلشَّيْطَٰنُ مِنَ ٱلْمَسِّ ۚ ذَٰلِكَ بِأَنَّهُمْ قَالُوٓا۟ إِنَّمَا ٱلْبَيْعُ مِثْلُ ٱلرِّبَوٰا۟ ۗ وَأَحَلَّ ٱللَّهُ ٱلْبَيْعَ وَحَرَّمَ ٱلرِّبَوٰا۟ ۚ فَمَن جَآءَهُۥ مَوْعِظَةٌۭ مِّن رَّبِّهِۦ فَٱنتَهَىٰ فَلَهُۥ مَا سَلَفَ وَأَمْرُهُۥٓ إِلَى ٱللَّهِ ۖ وَمَنْ عَادَ فَأُو۟لَٰٓئِكَ أَصْحَٰبُ ٱلنَّارِ ۖ هُمْ فِيهَا خَٰلِدُونَ ﴿٢٧٥﴾
Those who consume interest cannot stand [on the Day of Resurrection] except as one stands who is being beaten by Satan into insanity. That is because they say, "Trade is [just] like interest." But Allah has permitted trade and has forbidden interest. So whoever has received an admonition from his Lord and desists may have what is past, and his affair rests with Allah. But whoever returns to [dealing in interest or usury] - those are the companions of the Fire; they will abide eternally therein.
Owning a share in a lawful business is trade.
Quran, Surah An-Nisaa 4:29
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لَا تَأْكُلُوٓا۟ أَمْوَٰلَكُم بَيْنَكُم بِٱلْبَٰطِلِ إِلَّآ أَن تَكُونَ تِجَٰرَةً عَن تَرَاضٍۢ مِّنكُمْ ۚ وَلَا تَقْتُلُوٓا۟ أَنفُسَكُمْ ۚ إِنَّ ٱللَّهَ كَانَ بِكُمْ رَحِيمًۭا ﴿٢٩﴾
O you who have believed, do not consume one another's wealth unjustly but only [in lawful] business by mutual consent. And do not kill yourselves [or one another]. Indeed, Allah is to you ever Merciful.
Profit from lawful business is permitted.
Sahih al-Bukhari 52
Sahih... الحلال بين والحرام بين وبينهما مشبهات لا يعلمها كثير من الناس ...
"The halal is clear and the haram is clear, and between them are doubtful matters that many people do not know."
Screening and caution protect against doubtful investments.
Where the ruling is recorded
- Fiqhi Maqalat (Mufti Taqi Usmani), Essay on buying and selling company shares. The conditions for halal share investment that most screens follow.
- AAOIFI Shari'ah Standards, Standard on financial papers (shares and bonds). Sets screening ratios and purification.
- al-Hidaya, Kitab al-Shirka. The rules of partnership on which share ownership rests.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.