Sounds like The Unsuccessful yet Academically Unparalleled Sage - A Cheating S-Rank Sorcerer's Post-Rebirth Adventurer Log.
From Baka-Updates:
After reincarnating in a different world, the great sage Ephthal spent all of his life researching magic. However, he who had aimed to reach the summit of magic, knew of the limits of his talents and fell into despair, thus closing the curtain to his lifetime. However, 400 years later, he reincarnated for the second time and enrolled in a magic academy using the sorcery and knowledge he acquired from his previous life. As if to sneer at the state of magic that had been in decline for the past 400 years, he easily invokes legendary class magic! With overwhelming power, the entire world will kneel before him.
Ephthal was one of four sages who helped the hero to defeat the Demon King. As a reward, all four sages were given the title of emperor, with Ephthal being "the Emperor of Thunder". In the aftermath of the battle with the Demon King, he also discovered the Demon King's orphaned baby daughter, Merlin, and adopted her as his disciple.
Years later, a test is performed on Ephthal (now an old man), revealing that he has no magic compatibility, which explains why he could never achieve the same level of proficiency in magic as the other three sages, despite training harder than any of them. Vexed by this discovery, he dies in his bed of natural causes.
Upon dying, he's greeted by a goddess, who tells him that he's been reincarnated before, and that it's now time for his third reincarnation. She offers him two new skills of his choosing, but he declines, stating that he doesn't need them as long as he retains the vast knowledge of magic he already has, and has more time to improve.
He's then reincarnated as a young boy (also named Ephthal), who is one of his own descendants, and soon realises that despite his young age, he's still as powerful as he was in the heyday of his previous life. In the 400 years which have passed since his death, the general level of magical proficiency in this world has also greatly declined. (Magical proficiency in this world is rated using levels, from Lv1 to Lv10, plus LvEX.)
His father in this new life is Duke Alcott, leader of the Order of Sorcery in the Kingdom of Azul. However, his mother isn't the Duke's wife, but one of his many concubines, making Ephthal an illegitimate child. And since both he and his mother lack magic compatibility, they were shunned by most of the family, and driven away to a remote land.
Later in the story, Ephthal encounters Merlin again, who is now the headmaster of a magic academy. Despite his new body, she quickly senses that he's in some way connected to the Ephthal she knew as her master, 400 years prior. She challenges him to a duel of magic, which he wins, and after that, she has no doubt that he is indeed the reincarnation of her former master.