Background and occasion of revelation
A report in Sahih Muslim tells the story of Jabir bin Abdullah (may Allah be pleased with them both): when he fell ill, the Prophet ﷺ and Abu Bakr (may Allah be pleased with him) came on foot to visit him. His father had been martyred and he had no children, only sisters. He asked what he should do with his property. The Prophet ﷺ gave no answer until this verse of inheritance was revealed: "Yastaftunaka, qulillahu yuftikum fil-kalalah" (They ask you for a legal verdict. Say: Allah gives you a verdict concerning al-kalalah). The very opening of the verse shows that the Companions (may Allah be pleased with them) were asking about this issue, and Allah Himself gave the verdict.
Who is kalalah?
Kalalah is a deceased person who has neither children nor a father, whose heirs are his brothers, sisters and the like. Abdullah bin Abbas (may Allah be pleased with them both) defined kalalah as heirs other than children and father. This is the view taken by most Companions and scholars. Umar (may Allah be pleased with him) considered this issue very important and asked the Prophet ﷺ about it again and again, until the Prophet ﷺ poked his chest with his finger and said: Is the verse of summer at the end of Surah An-Nisa not enough for you?
According to the scholars, kalalah is mentioned in two places in Surah An-Nisa. Verse 12 is about maternal half-brothers and sisters and was revealed in winter, and verse 176 is about full and paternal brothers and sisters and was revealed in summer, which is why it was called Ayat al-Sayf.
Rulings of the verse
The summary of the tafsir of Ayat al-Kalalah is this: if a man dies with no children and has one full or paternal sister, she gets half of the estate. If such a woman dies with no children, her brother inherits from her. If there are two or more sisters, they get two-thirds. And if there are both brothers and sisters, the male gets twice the share of the female. At the end of the verse Allah says that He makes these rulings clear so that you do not go astray, meaning that the division of inheritance rests not on human opinion but on the shares fixed by Allah.
Is it the last verse of the Quran?
In Sahih al-Bukhari and Sahih Muslim, al-Bara' bin Azib (may Allah be pleased with him) said that the last surah revealed was Bara'ah (At-Tawbah) and the last verse was this Ayat al-Kalalah. On the other hand, Sahih al-Bukhari itself reports from Ibn Abbas that the verse of riba (usury) was revealed last. The scholars reconcile the two by saying that each Companion spoke according to his own knowledge, or that al-Bara' meant the last verse on the rulings of inheritance. So it is correct to say that Ayat al-Kalalah is among the last verses to be revealed.