It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) was given prophethood at the age of forty. He (peace and blessings be upon him) stayed in Makkah for thirteen years, with revelation coming to him. Then he was commanded to emigrate. He (peace and blessings be upon him) spent ten years in emigration, and when he passed away he was sixty-three years old.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللقطة / 12170