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
Matthew Henry’s Concise Commentary
1:1-17 Concerning this genealogy of our Saviour, observe the chief intention. It is not a needless genealogy. It is not a vain-glorious one, as those of great men often are. It proves that our Lord Jesus is of the nation and family out of which the Messiah was to arise. The promise of the blessing was made to Abraham and his seed; of the dominion, to David and his seed. It was promised to Abraham that Christ should descend from him, Ge 12:3; 22:18; and to David that he should descend from him, 2Sa 7:12; Ps 89:3, &c.; 132:11; and, therefore, unless Jesus is a son of David, and a son of Abraham, he is not the Messiah. Now this is here proved from well-known records. When the Son of God was pleased to take our nature, he came near to us, in our fallen, wretched condition; but he was perfectly free from sin: and while we read the names in his genealogy, we should not forget how low the Lord of glory stooped to save the human race.