The Prophet (saw) was 52 or 53 years old at the time of Migration which occurred in the year 622 AD.
The Prophet Muhammed migrated (hijra) from Mecca to Medina in the year 622 AD.
He was born in Mecca in the year 570 AD, so would have been 52 or 53 years old at the time of migration.
Bukhari narrated on the authority of Ibn `Abbas:
بُعث النبي ﷺ لأربعين سنة، فمكث فيها ثلاث عشرة يوحى إليه، ثم أمر بالهجرة فهاجر عشر سنين، ومات وهو ابن ثلاث وستين سنة
"The Prophet (saw) started receiving revelation in his fourtieth year; he stayed in Mecca thirteen years whilst receiving revelation; then he was commanded to migrate and lived there as a migrant for ten years; he passed away at the age of sixty-three." (Sahih al-Bukhari 3723)
The Hadith counts the years according to the lunar calender.