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.
tabarani:16460ʿAbdān b. Aḥmad

[Machine] I heard a buzzing sound in my head, so I went to the Messenger of Allah ﷺ and asked him about it. Allah ﷻ revealed the verse, "So whoever of you is ill or has an ailment on his scalp [necessitating shaving], then [he should offer] compensation [for fasting] or charity or sacrifice." The Messenger of Allah ﷺ called me and said, "Do you have the means to divide it among six poor people?" And the division is three sa's. "Or, [can you feed] a sheep or fast for three days?" So I said, "O Messenger of Allah, choose for me." He said, "Feed six poor people."  

الطبراني:١٦٤٦٠حَدَّثَنَا عَبْدَانُ بْنُ أَحْمَدَ ثنا إِسْمَاعِيلُ بْنُ زَكَرِيَّا الْكُوفِيُّ ثنا عَبْدُ الرَّحِيمِ بْنُ سُلَيْمَانَ عَنْ مُحَمَّدِ بْنِ عُبَيْدِ اللهِ الْعَرْزَمِيِّ عَنْ عَطَاءٍ عَنْ كَعْبِ بْنِ عُجْرَة قَالَ

آذَانِي هَوَامُّ رَأْسِي فَأَتَيْتُ رَسُولَ اللهِ ﷺ فَسَأَلْتُهُ عَنْ ذَلِكَ فَأَنْزَلَ اللهُ ﷻ {فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ فَفِدْيَةٌ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ} فَدَعَانِي رَسُولُ اللهِ ﷺ فَقَالَ «هَلْ عِنْدَكَ فَرَقٌ تَقْسِمُهُ بَيْنَ سِتَّةِ مَسَاكِينٍ» وَالْفَرَقُ ثَلَاثَةُ آصُعٍ «أَوْ نُسُكُ شَاةٍ أَوْ تَصُومُ ثَلَاثَةَ أَيَّامٍ؟» فَقُلْتُ يَا رَسُولَ اللهِ خِرْ لِي قَالَ «أَطْعِمْ سِتَّةَ مَسَاكِينٍ»  


See similar narrations below:

Collected by Muslim
muslim:1201dIbn Numayr from my father > Sayf > Mujāhid > ʿAbd al-Raḥman b. Abū Laylá > Kaʿb b. ʿUjrah

Do these vermins trouble you? I said: Yes. Thereupon he said: Then shave your head; and it was in connection with me that this verse was revealed:" Whoever among you is sick or has an ailment of the head, he (may effect) a compensation by fasting or alms or a sacrifice". He (the Holy Prophet, therefore) said to me: Observe fast for three days or give a quantity of alms enough to feed six needy persons or offer sacrifice (of an animal) that is available.  

مسلم:١٢٠١dوَحَدَّثَنَا ابْنُ نُمَيْرٍ حَدَّثَنَا أَبِي حَدَّثَنَا سَيْفٌ قَالَ سَمِعْتُ مُجَاهِدًا يَقُولُ حَدَّثَنِي عَبْدُ الرَّحْمَنِ بْنُ أَبِي لَيْلَى حَدَّثَنِي كَعْبُ بْنُ عُجْرَةَ ؓ

أَنَّ رَسُولَ اللَّهِ ﷺ وَقَفَ عَلَيْهِ وَرَأْسُهُ يَتَهَافَتُ قَمْلاً فَقَالَ أَيُؤْذِيكَ هَوَامُّكَ قُلْتُ نَعَمْ قَالَ فَاحْلِقْ رَأْسَكَ قَالَ فَفِيَّ نَزَلَتْ هَذِهِ الآيَةُ { فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ فَفِدْيَةٌ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ} فَقَالَ لِي رَسُولُ اللَّهِ ﷺ صُمْ ثَلاَثَةَ أَيَّامٍ أَوْ تَصَدَّقْ بِفَرَقٍ بَيْنَ سِتَّةِ مَسَاكِينَ أَوِ انْسُكْ مَا تَيَسَّرَ