Ammar reported,

Rubai said, I asked Ibn Abbas, "How old was the Messenger of Allah ﷺ when he died?"He replied, "I would not have thought that someone like you among his people would be unaware of that."I said, "I have asked others and received conflicting answers, so I wished to know your view on it."He said, "Can you count?"I said, "Yes."He said, "Then keep track. Forty years before he was sent as a prophet, fifteen years he remained in Makkah experiencing both safety and fear, and ten years as an emigrant in Madinah."

Ahmad 2640

Sahih

حدثنا عفان حدثنا يزيد بن زريع حدثنا يونس

عن عمار مولى بني هاشم قال

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

أحمد 2640صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Abbas bin Abdul-Muttalib
Numbering
Darussalam 2640
Ahmad 2640