كتاب الفضائل
43  
The Book of Virtues
(33)
Chapter: How Long Did The Prophet ft Stay In Makkah And Al-Madinah?
(33)
باب كَمْ أَقَامَ النَّبِيُّ صلى الله عليه وسلم بِمَكَّةَ وَالْمَدِينَةِ ‏.‏
Sahih Muslim 2351 b

Ibn 'Abbas reported that Allah's Messenger (ﷺ) stayed in Mecca for thirteen years (after he had received revelation) and stayed in Medina for ten years, and he was sixty-three when he died.

وَحَدَّثَنَا ابْنُ أَبِي عُمَرَ، حَدَّثَنَا بِشْرُ بْنُ السَّرِيِّ، حَدَّثَنَا حَمَّادٌ، عَنْ أَبِي جَمْرَةَ الضُّبَعِيِّ، عَنِ ابْنِ عَبَّاسٍ، قَالَ أَقَامَ رَسُولُ اللَّهِ صلى الله عليه وسلم بِمَكَّةَ ثَلاَثَ عَشْرَةَ سَنَةً يُوحَى إِلَيْهِ وَبِالْمَدِينَةِ عَشْرًا وَمَاتَ وَهُوَ ابْنُ ثَلاَثٍ وَسِتِّينَ سَنَةً ‏.‏
Reference : Sahih Muslim 2351b
In-book reference : Book 43, Hadith 155
USC-MSA web (English) reference : Book 30, Hadith 5802
  (deprecated numbering scheme)