Abdullah bin Abbas reported,

The Messenger of Allah ﷺ was sent as a prophet at the age of forty. He remained in Mecca for thirteen years receiving revelation, then he was commanded to emigrate. He lived in emigration for ten years, and he died at the age of sixty-three.

Bukhari 3902

Sahih

حدثنا مطر بن الفضل حدثنا روح بن عبادة حدثنا هشام حدثنا عكرمة

عن ابن عباس رضي الله عنهما قال

بعث رسول الله ﷺ لأربعين سنة فمكث بمكة ثلاث عشرة سنة يوحى إليه ثم أمر بالهجرة فهاجر عشر سنين ومات وهو ابن ثلاث وستين

البخاري 3902صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Virtues of the Ansar
Chapter
Migration of the Prophet ﷺ and his companions to Madinah
Numbering
Darussalam 3902
Bukhari 3902