Short answer
Trim it short so the edge of the upper lip shows. In the Hanafi school trimming is sunnah, and Imam al-Tahawi held that trimming it very short is better. Letting it grow over the lip is disliked, and it should not be left for more than 40 days. Malikis dislike shaving it off with a razor.
Trimming the moustache (qass al-sharib) so it does not cover the upper lip is sunnah. Al-Tahawi preferred trimming it very short (ihfa'). Leaving it uncut beyond 40 days is makruh.
Other madhhabs
- Maliki
- Only the edge over the lip is trimmed; Imam Malik strongly disliked shaving the moustache off.
- Shafi'i
- Trim until the edge of the lip shows, without cutting it down to the root.
Explanation
The moustache is the one part of facial hair that Muslim men are told to cut. The Prophet ﷺ paired it with the beard: let the beard grow and cut the moustache. Several wordings are reported: trim, clip, and cut it back hard. The scholars agree on the goal, a moustache that does not hang over the lip, and differ on how short is best.
In practice, use scissors or a trimmer and take the hair back until the red edge of the upper lip is clear. Many Hanafi scholars, following al-Tahawi, liked to go shorter than that. Shaving it completely with a razor is disputed: some later Hanafi scholars disliked it, and the Malikis disliked it strongly, so trimming is the safer choice.
Do it regularly. Anas reported that the Companions were given a limit of 40 nights for trimming the moustache, cutting the nails and removing armpit and pubic hair. Friday is a good day to do all of these together. See also the Sunnah way of cutting nails.
A long moustache with a shaved beard reverses the Sunnah completely, and the hadith warns that whoever does not take from his moustache is not on the Prophet's way. Keeping the moustache short also keeps food and drink from touching it, which is cleaner. For the beard itself, see the Sunnah length of the beard.
The evidence
Sahih al-Bukhari 5893
Sahih... انهكوا الشوارب وأعفوا اللحى ...
"Cut the moustaches right back and let the beards grow."
The command to cut the moustache short.
Jami' at-Tirmidhi 2761
Graded sahih... من لم يأخذ من شاربه فليس منا ...
"Whoever does not take from his moustache is not one of us."
A strong warning against leaving the moustache uncut.
Sahih Muslim 258
Sahih... وقت لنا في قص الشارب وتقليم الأظفار ونتف الإبط وحلق العانة ...
"We were given a time limit for trimming the moustache, cutting the nails, plucking the armpits and shaving the pubic hair: not to leave them more than forty nights."
Sets the 40-day outer limit.
Where the ruling is recorded
- al-Fatawa al-Hindiyya, Kitab al-Karahiyya, chapter on circumcision, hair and nails. Trimming the moustache and the 40-day limit.
- al-Durr al-Mukhtar with Radd al-Muhtar, Kitab al-Hazr wa al-Ibaha. The difference between trimming and shaving the moustache, and al-Tahawi's preference.
- al-Majmu' (Nawawi), Kitab al-Taharah, chapter on the siwak and the practices of the fitrah. The Shafi'i description of trimming to the lip's edge.
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.