Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:8:41

And know that anything you obtain of war booty - then indeed, for Allah is one fifth of it and for the Messenger and for ˹his˺ near relatives and the orphans, the needy, and the ˹stranded˺ traveler, if you have believed in Allah and in that which We sent down to Our Servant on the day of criterion - the day when the two armies met. And Allah, over all things, is competent.  

And know that whatever spoils you have taken, ˹you have˺ seized from the disbelievers by force, the fifth of it is for God, to have it dispensed as He will, and for the Messenger and for the kinsmen, the kinsmen of the Prophet (s) from among the Banū Hāshim and the Banū ˹‘Abd˺ al-Muttalib, and the orphans, children of Muslims, those whose fathers have passed away and are in poverty, and the needy, those Muslims in ˹dire˺ need, and the traveller, those Muslims cut off during travel — in other words it ˹the fifth˺ is due to the Prophet (s) and ˹those of˺ these four categories in the way that he used to apportion it: a fifth of the fifth for each one and the remaining four fifths for those who had captured the spoils, if you believe in God, then be aware of that, and that which (wa-mā is a supplement to bi’Llāhi, ‘in God’) We sent down upon Our servant, Muhammad (s), in the way of angels and signs, on the Day of Discrimination, that is, the day of ˹the battle of˺ Badr, which discriminated between truth and falsehood, the day the two armies, the Muslims and the believers, met. And God has power over all things, including giving you victory despite your being few and their being greater in number.
القرآن:٨:٤١

وَاعْلَمُوا أَنَّمَا غَنِمْتُمْ مِنْ شَيْءٍ فَأَنَّ لِلَّهِ خُمُسَهُ وَلِلرَّسُولِ وَلِذِي الْقُرْبَىٰ وَالْيَتَامَىٰ وَالْمَسَاكِينِ وَابْنِ السَّبِيلِ إِنْ كُنْتُمْ آمَنْتُمْ بِاللَّهِ وَمَا أَنْزَلْنَا عَلَىٰ عَبْدِنَا يَوْمَ الْفُرْقَانِ يَوْمَ الْتَقَى الْجَمْعَانِ ۗ وَاللَّهُ عَلَىٰ كُلِّ شَيْءٍ قَدِيرٌ  

{واعلموا أنما غنمتم} أخذتم من الكفار قهرا {من شيء فأن لله خمسه} يأمر فيه بما يشاء {وللرسول ولذي القربى} قرابة النبي ﷺ من بني هاشم وبني المطلب {واليتامى} أطفال المسلمين الذين هلك آباؤهم وهم فقراء {والمساكين} ذوي الحاجة من المسلمين {وابن السبيل} المنقطع في سفره من المسلمين، أي يستحقه النبي ﷺ والأصناف الأربعة على ما كان يقسمه من أن لكلٍ خُمسَ الخمس، والأخماس الأربعة الباقية للغانمين {إن كنتم آمنتم بالله} فاعملوا ذلك {وما} عطف على بالله {أنزلنا على عبدنا} محمد ﷺ من الملائكة والآيات {يوم الفرقان} أي يوم بدر الفارق بين الحق والباطل {يوم التقى الجمعان} المسلمون والكفار {والله على كل شيء قدير} ومنه نصركم مع قلتكم وكثرتهم.