Critics of the Bible say that the Gospels are full of contradictions. They are quite mistaken about the matter and I address that here. But one particular difficulty that seems to come up more than others has to do with Jesus's genealogies mentioned in Matthew's and Luke's Gospels. They seem to differ. Jesus seems to have a different grandfather in Luke 3:23 (Heli) than He does in Matthew 1:16 (Jacob). So what's the solution? Norman Geisler and Thomas Howe provide the following solution in their fantastic book, The Big Book of Bible Difficulties:
"This should be expected, since they are two different lines of ancestors, one traced through His legal father, Joseph and the other through His actual mother, Mary. Matthew gives the official line, since he addresses Jesus’ genealogy to Jewish concerns for the Jewish Messiah’s credentials which required that Messiah come from the seed of Abraham and the line of David (cf. Matt. 1:1). Luke, with a broader Greek audience in view, addresses himself to their interest in Jesus as the Perfect Man (which was the quest of Greek thought). Thus, he traces Jesus back to the first man, Adam (Luke 3:38 ).
"That Matthew gives Jesus’ paternal genealogy and Luke his maternal genealogy is further supported by several facts. First of all, while both lines trace Christ to David, each is through a different son of David. Matthew traces Jesus through Joseph (his legal father ) to David’s son, Solomon the king, by whom Christ rightfully inherited the throne of David (cf. 2 Sam. 7:12ff ). Luke’s purpose, on the other hand, is to show Christ as an actual human. So he traces Christ to David’s son, Nathan, through his actual mother, Mary, through whom He can rightfully claim to be fully human, the redeemer of humanity.
"Further, Luke does not say that he is giving Jesus’ genealogy through Joseph. Rather, he notes that Jesus was “as was supposed” (Luke 3:23) the son of Joseph, while He was actually the son of Mary. Also, that Luke would record Mary’s genealogy fits with his interest as a doctor in mothers and birth and with his emphasis on women in his Gospel which has been called “the Gospel for Women.”
"Finally, the fact that the two genealogies have some names in common (such as Shealtiel and Zerubbabel, Matt. 1:12 ; cf. Luke 3:27) does not prove they are the same genealogy for two reasons. One, these are not uncommon names. Further, even the same genealogy (Luke’s) has a repeat of the names Joseph and Judah (3:26 , 30).
"The two genealogies can be summarized as follows: