The Prophet ﷺ remained in Mecca for thirteen years, meaning while revelation was being sent to him, and he died at the age of sixty-three.
حدثنا أحمد بن منيع حدثنا روح بن عبادة حدثنا زكريا بن إسحق حدثنا عمرو بن دينار
مكث النبي ﷺ بمكة ثلاث عشرة سنة يعني يوحى إليه وتوفي وهو ابن ثلاث وستين سنة
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the Book of the Virtues of the Ansar, chapter on the migration of the Prophet ﷺ and his companions to Madinah, hadith no. 3903, and Muslim, hadith no. 2351, from the hadith of Rawh bin Ubada, with this wording.There is also a version on this topic from Ayesha [to come: 3654], Anas bin Malik [previously mentioned: 3623], and Daghfal bin Hanzala [Shamail, hadith no. 383].