All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Al-Baraa' narrated that the hair of the Prophet used to reach down to his shoulders and ear-lobes. [Al-Bukhari and Muslim]
Moreover, ‘Aishah narrated that the hair of the Prophet did not reach his shoulders but it exceeded his ear-lobes. [At-Tirmithi]
Besides,Ibn Majah narrated that the Prophet once had Ghusl (ritual bath) and he noticed that there was a small place which was not moistened, so he moistened it with the wet hair that was hanging over his shoulders. [Ibn Maajah]
However, it was not reported that the jurists determined a given length to the hair as to how long or short it should be. Therefore, it is permissible to keep one’s hair long or short provided that one does not imitate the non-Muslims or dissolute people by doing so.
Allah knows best.