Matthew 1:17

17 Thus there were fourteen generations in all from Abraham to David, fourteen from David to the exile to Babylon, and fourteen from the exile to the Messiah.

Matthew 1:17 in Other Translations

KJV
17 So all the generations from Abraham to David are fourteen generations; and from David until the carrying away into Babylon are fourteen generations; and from the carrying away into Babylon unto Christ are fourteen generations.
ESV
17 So all the generations from Abraham to David were fourteen generations, and from David to the deportation to Babylon fourteen generations, and from the deportation to Babylon to the Christ fourteen generations.
NLT
17 All those listed above include fourteen generations from Abraham to David, fourteen from David to the Babylonian exile, and fourteen from the Babylonian exile to the Messiah.
MSG
17 There were fourteen generations from Abraham to David, another fourteen from David to the Babylonian exile, and yet another fourteen from the Babylonian exile to Christ. The Birth of Jesus
CSB
17 So all the generations from Abraham to David were 14 generations; and from David until the exile to Babylon, 14 generations; and from the exile to Babylon until the Messiah, 14 generations.

Matthew 1:17 In-Context

15 Elihud the father of Eleazar, Eleazar the father of Matthan, Matthan the father of Jacob,
16 and Jacob the father of Joseph, the husband of Mary, and Mary was the mother of Jesus who is called the Messiah.
17 Thus there were fourteen generations in all from Abraham to David, fourteen from David to the exile to Babylon, and fourteen from the exile to the Messiah.
18 This is how the birth of Jesus the Messiah came about : His mother Mary was pledged to be married to Joseph, but before they came together, she was found to be pregnant through the Holy Spirit.
19 Because Joseph her husband was faithful to the law, and yet did not want to expose her to public disgrace, he had in mind to divorce her quietly.
Scripture quoted by permission.  Quotations designated (NIV) are from THE HOLY BIBLE: NEW INTERNATIONAL VERSION®.  NIV®.  Copyright © 1973, 1978, 1984, 2011 by Biblica.  All rights reserved worldwide.