This is the list of the ancestors of Jesus Christ, a descendant of David, who was a descendant of Abraham.
a From Abraham to King David, the following ancestors are listed: Abraham, Isaac, Jacob, Judah and his brothers; then Perez and Zerah (their mother was Tamar), Hezron, Ram, Amminadab, Nahshon, Salmon, Boaz (his mother was Rahab), Obed (his mother was Ruth), Jesse, and King David.
b-11 From David to the time when the people of Israel were taken into exile in Babylon, the following ancestors are listed: David, Solomon (his mother was the woman who had been Uriah's wife), Rehoboam, Abijah, Asa, Jehoshaphat, Jehoram, Uzziah, Jotham, Ahaz, Hezekiah, Manasseh, Amon, Josiah, and Jehoiachin and his brothers. 112
From the time after the exile in Babylon to the birth of Jesus, the following ancestors are listed: Jehoiachin, Shealtiel, Zerubbabel, Abiud, Eliakim, Azor, Zadok, Achim, Eliud, Eleazar, Matthan, Jacob, and Joseph, who married Mary, the mother of Jesus, who was called the Messiah.
So then, there were fourteen generations from Abraham to David, and fourteen from David to the exile in Babylon, and fourteen from then to the birth of the Messiah.