It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) resided in Makkah Mukarramah for fifteen years: seven years in such a way that he would see light and hear voices, and eight years in such a way that revelation would descend upon him. And in Madinah Munawwarah, he resided for ten years.
Hadith Referenceمسند احمد / ومن مسند بني هاشم / 2846