The Gospels do not explain the difference, and neither mentions the other's list. Every explanation adds something the texts do not say. Here are the main ones, with how well each is supported.
What the texts say
Textually statedMatthew: “Jacob begat Joseph the husband of Mary, of whom was born Jesus” (1:16), through Solomon and the kings. Luke: Jesus was “(as was supposed) the son of Joseph, which was the son of Heli” (3:23), through Nathan. They agree from Abraham to David, share Shealtiel and Zerubbabel, and differ everywhere else between David and Joseph.
Read: Matthew 1:16; Luke 3:23; Luke 3:31
16And Jacob begat Joseph the husband of Mary, of whom was born Jesus, who is called Christ.
23And Jesus himself began to be about thirty years of age, being (as was supposed) the son of Joseph, which was the son of Heli,
31Which was the son of Melea, which was the son of Menan, which was the son of Mattatha, which was the son of Nathan, which was the son of David,
Matthew's list is selective
Strongly supportedMatthew counts three groups of fourteen (1:17). To get them he passes over three kings between Joram and Uzziah (Ahaziah, Joash, Amaziah) and Jehoiakim before Jechoniah, all known from Kings and Chronicles. “Begat” can mean “was the ancestor of”. The third group has only thirteen names unless Jechoniah or Jesus is counted twice.
For
- The omitted kings are named in 2 Kings 8–24 and 1 Chronicles 3:11–16.
- Ancient genealogies often shortened lines to a pattern.
Against
- Matthew does not say why fourteen; that David's name in Hebrew letters adds up to 14 is only a suggestion.
Read: Matthew 1:17; Matthew 1:8; 1 Chronicles 3:11–12
17So 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.
8And Asa begat Josaphat; and Josaphat begat Joram; and Joram begat Ozias;
11Joram his son, Ahaziah his son, Joash his son, 12Amaziah his son, Azariah his son, Jotham his son,
Luke gives Mary's line
PlausibleHeli was Mary's father, and Joseph is “son of Heli” as his son-in-law; or the parenthesis “(as was supposed) the son of Joseph” sets Joseph aside and the line runs from Jesus to Heli through his mother. Matthew would then give Joseph's legal line, Luke Mary's natural one.
For
- Luke tells the birth from Mary's side (Luke 1–2).
- It gives Jesus physical descent from David, which the New Testament assumes (Romans 1:3).
Against
- Luke names Joseph, not Mary, and the pattern “the son of” runs unbroken.
- It became common only from the late fifteenth century; earlier hints are disputed.
Read: Luke 3:23; Luke 1:32; Romans 1:3
23And Jesus himself began to be about thirty years of age, being (as was supposed) the son of Joseph, which was the son of Heli,
32He shall be great, and shall be called the Son of the Highest: and the Lord God shall give unto him the throne of his father David:
3Concerning his Son Jesus Christ our Lord, which was made of the seed of David according to the flesh;
Both lists are Joseph's: by birth and by law
PlausibleJulius Africanus (c. AD 220), citing relatives of Jesus, says Jacob and Heli were half-brothers. Heli died childless, and Jacob married his widow to raise up a son for him, as the Law required. Joseph was then Jacob's son by birth and Heli's by law, so each Gospel is right.
For
- The oldest surviving explanation (Eusebius, Church History 1.7).
- Levirate marriage is in the text: Deuteronomy 25:5–6, Tamar (Genesis 38), Ruth and Boaz, and Mark 12:19.
Against
- It rests on a family tradition no one can check; Africanus admits it is unproven.
- It needs a second such case to explain Shealtiel's two fathers.
Read: Deuteronomy 25:5–6; Mark 12:19; Genesis 38:8
5If brethren dwell together, and one of them die, and have no child, the wife of the dead shall not marry without unto a stranger: her husband’s brother shall go in unto her, and take her to him to wife, and perform the duty of an husband’s brother unto her. 6And it shall be, that the firstborn which she beareth shall succeed in the name of his brother which is dead, that his name be not put out of Israel.
19Master, Moses wrote unto us, If a man’s brother die, and leave his wife behind him, and leave no children, that his brother should take his wife, and raise up seed unto his brother.
8And Judah said unto Onan, Go in unto thy brother’s wife, and marry her, and raise up seed to thy brother.
Matthew lists the royal succession, Luke the natural line
SpeculativeMatthew gives the heirs to David's throne, not necessarily fathers and sons. When Solomon's line failed, perhaps after Jechoniah, whose descendants Jeremiah said would not prosper on the throne, the right passed to a relative from Nathan's line, and the two lists meet at Shealtiel.
For
- Explains why Shealtiel is Jechoniah's son in Matthew and 1 Chronicles 3:17 but Neri's in Luke.
Against
- Jeremiah 22:30 concerns ruling, not descent.
- No text says the right passed through Nathan's line.
Read: Jeremiah 22:30; 1 Chronicles 3:17; Luke 3:27
30Thus saith the LORD, Write ye this man childless, a man that shall not prosper in his days: for no man of his seed shall prosper, sitting upon the throne of David, and ruling any more in Judah.
17And the sons of Jeconiah; Assir, Salathiel his son,
27Which was the son of Joanna, which was the son of Rhesa, which was the son of Zorobabel, which was the son of Salathiel, which was the son of Neri,
Shealtiel and Zerubbabel
PlausibleMost readers take them to be the same two men in both lists: the governor Zerubbabel and his father. Then Shealtiel had two fathers (Jechoniah, Neri), and 1 Chronicles 3:19 gives Zerubbabel a third (Pedaiah), which again points to levirate marriage or adoption. Others think Luke's pair were different men with the same names.
For
- Ezra, Haggai, Matthew and Luke all make Zerubbabel the son of Shealtiel (Matthew and Luke spell them Zorobabel and Salathiel).
Against
- Two famous names in the same order could also be a coincidence of common names.
Read: Ezra 3:2; 1 Chronicles 3:19; Luke 3:27
2Then stood up Jeshua the son of Jozadak, and his brethren the priests, and Zerubbabel the son of Shealtiel, and his brethren, and builded the altar of the God of Israel, to offer burnt offerings thereon, as it is written in the law of Moses the man of God.
19And the sons of Pedaiah were, Zerubbabel, and Shimei: and the sons of Zerubbabel; Meshullam, and Hananiah, and Shelomith their sister:
27Which was the son of Joanna, which was the son of Rhesa, which was the son of Zorobabel, which was the son of Salathiel, which was the son of Neri,
Cainan and other textual details
Strongly supportedLuke's Cainan (3:36) comes from the Greek Septuagint of Genesis 11:12, which Luke used; the Hebrew text lacks him. In Luke 3:33 many manuscripts read “Admin, the son of Arni” where the KJV, following the Textus Receptus, has “Aram”.
Read: Luke 3:36; Genesis 11:12; Luke 3:33
36Which was the son of Cainan, which was the son of Arphaxad, which was the son of Sem, which was the son of Noe, which was the son of Lamech,
12And Arphaxad lived five and thirty years, and begat Salah:
33Which was the son of Aminadab, which was the son of Aram, which was the son of Esrom, which was the son of Phares, which was the son of Juda,
Four women before Mary
Textually statedMatthew names Tamar, Rahab, Ruth and “her that had been the wife of Urias”. Why these four is a matter of interpretation: all have irregular or scandalous stories, and at least Rahab and Ruth were foreigners; together they prepare for the unusual birth from Mary.
Read: Matthew 1:3; Matthew 1:5–6; Matthew 1:16
3And Judas begat Phares and Zara of Thamar; and Phares begat Esrom; and Esrom begat Aram;
5And Salmon begat Booz of Rachab; and Booz begat Obed of Ruth; and Obed begat Jesse; 6And Jesse begat David the king; and David the king begat Solomon of her that had been the wife of Urias;
16And Jacob begat Joseph the husband of Mary, of whom was born Jesus, who is called Christ.
No explanation is proven. Christians have discussed the question since at least the early third century; the evidence leaves more than one reasonable answer.