The story of Jesus’ birth is told in both Matthew and Luke. Each includes some details that are the same and some that are different. For that reason a few consider the stories to be two different stories. But if the two stories are put together, they mesh perfectly. It is likely the one story was composed before either of the two Gospel writers wrote the portion of the story that fit their rhetorical purpose into into their Gospels.
What follows is the whole story.
(New International Version)
Luke 1:5-25 The Angel Announces the Birth of John
5 In the time of Herod king of Judea there was a priest named Zechariah, who belonged to the priestly division of Abijah; his wife Elizabeth was also a descendant of Aaron. 6 Both of them were righteous in the sight of God, observing all the Lord’s commands and decrees blamelessly. 7 But they were childless because Elizabeth was not able to conceive, and they were both very old.
8 Once when Zechariah’s division was on duty and he was serving as priest before God, 9 he was chosen by lot, according to the custom of the priesthood, to go into the temple of the Lord and burn incense. 10 And when the time for the burning of incense came, all the assembled worshipers were praying outside.
11 Then an angel of the Lord appeared to him, standing at the right side of the altar of incense. 12 When Zechariah saw him, he was startled and was gripped with fear. 13 But the angel said to him: “Do not be afraid, Zechariah; your prayer has been heard. Your wife Elizabeth will bear you a son, and you are to call him John. 14 He will be a joy and delight to you, and many will rejoice because of his birth, 15 for he will be great in the sight of the Lord. He is never to take wine or other fermented drink, and he will be filled with the Holy Spirit even before he is born. 16 He will bring back many of the people of Israel to the Lord their God. 17 And he will go on before the Lord, in the spirit and power of Elijah, to turn the hearts of the parents to their children and the disobedient to the wisdom of the righteous—to make ready a people prepared for the Lord.”
18 Zechariah asked the angel, “How can I be sure of this? I am an old man and my wife is well along in years.”
19 The angel said to him, “I am Gabriel. I stand in the presence of God, and I have been sent to speak to you and to tell you this good news. 20 And now you will be silent and not able to speak until the day this happens, because you did not believe my words, which will come true at their appointed time.”
21 Meanwhile, the people were waiting for Zechariah and wondering why he stayed so long in the temple. 22 When he came out, he could not speak to them. They realized he had seen a vision in the temple, for he kept making signs to them but remained unable to speak.
23 When his time of service was completed, he returned home. 24 After this his wife Elizabeth became pregnant and for five months remained in seclusion. 25 “The Lord has done this for me,” she said. “In these days he has shown his favor and taken away my disgrace among the people.”
Luke 1:26- The Angel Announces the Birth of Jesus to Mary
26 In the sixth month of Elizabeth’s pregnancy, God sent the angel Gabriel to Nazareth, a town in Galilee, 27 to a virgin pledged to be married to a man named Joseph, a descendant of David. The virgin’s name was Mary. 28 The angel went to her and said, “Greetings, you who are highly favored! The Lord is with you.”
29 Mary was greatly troubled at his words and wondered what kind of greeting this might be. 30 But the angel said to her, “Do not be afraid, Mary; you have found favor with God. 31 You will conceive and give birth to a son, and you are to call him Jesus. 32 He will be great and will be called the Son of the Most High. The Lord God will give him the throne of his father David, 33 and he will reign over Jacob’s descendants forever; his kingdom will never end.”
34 “How will this be,” Mary asked the angel, “since I am a virgin?”
35 The angel answered, “The Holy Spirit will come on you, and the power of the Most High will overshadow you. So the holy one to be born will be called the Son of God. 36 Even Elizabeth your relative is going to have a child in her old age, and she who was said to be unable to conceive is in her sixth month. 37 For no word from God will ever fail.”
38 “I am the Lord’s servant,” Mary answered. “May your word to me be fulfilled.” Then the angel left her.
Matthew 1:18-25 The Angel Announces the Birth of Jesus to Joseph
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.
20 But after he had considered this, an angel of the Lord appeared to him in a dream and said, “Joseph son of David, do not be afraid to take Mary home as your wife, because what is conceived in her is from the Holy Spirit. 21 She will give birth to a son, and you are to give him the name Jesus, because he will save his people from their sins.”
22 All this took place to fulfill what the Lord had said through the prophet: 23 “The virgin will conceive and give birth to a son, and they will call him Immanuel” (which means “God with us”).
24 When Joseph woke up, he did what the angel of the Lord had commanded him and took Mary home as his wife. 25 But he did not consummate their marriage until she gave birth to a son. And he gave him the name Jesus.
Luke 1:39-56 Mary Visits Elizabeth
39 At that time Mary got ready and hurried to a town in the hill country of Judea, 40 where she entered Zechariah’s home and greeted Elizabeth. 41 When Elizabeth heard Mary’s greeting, the baby leaped in her womb, and Elizabeth was filled with the Holy Spirit. 42 In a loud voice she exclaimed: “Blessed are you among women, and blessed is the child you will bear! 43 But why am I so favored, that the mother of my Lord should come to me? 44 As soon as the sound of your greeting reached my ears, the baby in my womb leaped for joy. 45 Blessed is she who has believed that the Lord would fulfill his promises to her!”
Mary’s Song46 And Mary said:
“My soul glorifies the Lord
47 and my spirit rejoices in God my Savior,
48 for he has been mindful
of the humble state of his servant.
From now on all generations will call me blessed,
49 for the Mighty One has done great things for me—
holy is his name.
50 His mercy extends to those who fear him,
from generation to generation.
51 He has performed mighty deeds with his arm;
he has scattered those who are proud in their inmost thoughts.
52 He has brought down rulers from their thrones
but has lifted up the humble.
53 He has filled the hungry with good things
but has sent the rich away empty.
54 He has helped his servant Israel,
remembering to be merciful
55 to Abraham and his descendants forever,
just as he promised our ancestors.”
56 Mary stayed with Elizabeth for about three months and then returned home.
Luke 1:57-80 John’s Birth and What Happened Thereafter
57 When it was time for Elizabeth to have her baby, she gave birth to a son. 58 Her neighbors and relatives heard that the Lord had shown her great mercy, and they shared her joy.
59 On the eighth day they came to circumcise the child, and they were going to name him after his father Zechariah, 60 but his mother spoke up and said, “No! He is to be called John.”
61 They said to her, “There is no one among your relatives who has that name.”
62 Then they made signs to his father, to find out what he would like to name the child. 63 He asked for a writing tablet, and to everyone’s astonishment he wrote, “His name is John.” 64 Immediately his mouth was opened and his tongue set free, and he began to speak, praising God. 65 All the neighbors were filled with awe, and throughout the hill country of Judea people were talking about all these things. 66 Everyone who heard this wondered about it, asking, “What then is this child going to be?” For the Lord’s hand was with him.
Zechariah’s Song67 His father Zechariah was filled with the Holy Spirit and prophesied:
68 “Praise be to the Lord, the God of Israel,
because he has come to his people and redeemed them.
69 He has raised up a horn[c] of salvation for us
in the house of his servant David
70 (as he said through his holy prophets of long ago),
71 salvation from our enemies
and from the hand of all who hate us—
72 to show mercy to our ancestors
and to remember his holy covenant,
73 the oath he swore to our father Abraham:
74 to rescue us from the hand of our enemies,
and to enable us to serve him without fear
75 in holiness and righteousness before him all our days.
76 And you, my child, will be called a prophet of the Most High;
for you will go on before the Lord to prepare the way for him,
77 to give his people the knowledge of salvation
through the forgiveness of their sins,
78 because of the tender mercy of our God,
by which the rising sun will come to us from heaven
79 to shine on those living in darkness
and in the shadow of death,
to guide our feet into the path of peace.”
80 And the child grew and became strong in spirit; and he lived in the wilderness until he appeared publicly to Israel.
Matthew 2:1-18 The Visit of the Magi and Herod’s Evil Scheme
After Jesus was born in Bethlehem in Judea, during the time of King Herod, Magi from the east came to Jerusalem 2 and asked, “Where is the one who has been born king of the Jews? We saw his star when it rose and have come to worship him.”3 When King Herod heard this he was disturbed, and all Jerusalem with him. 4 When he had called together all the people’s chief priests and teachers of the law, he asked them where the Messiah was to be born. 5 “In Bethlehem in Judea,” they replied, “for this is what the prophet has written:
6 “‘But you, Bethlehem, in the land of Judah,
are by no means least among the rulers of Judah;
for out of you will come a ruler
who will shepherd my people Israel.’”
7 Then Herod called the Magi secretly and found out from them the exact time the star had appeared. 8 He sent them to Bethlehem and said, “Go and search carefully for the child. As soon as you find him, report to me, so that I too may go and worship him.”9 After they had heard the king, they went on their way, and the star they had seen when it rose went ahead of them until it stopped over the place where the child was. 10 When they saw the star, they were overjoyed. 11 On coming to the house, they saw the child with his mother Mary, and they bowed down and worshiped him. Then they opened their treasures and presented him with gifts of gold, frankincense and myrrh. 12 And having been warned in a dream not to go back to Herod, they returned to their country by another route.
The Escape to Egypt13 When they had gone, an angel of the Lord appeared to Joseph in a dream. “Get up,” he said, “take the child and his mother and escape to Egypt. Stay there until I tell you, for Herod is going to search for the child to kill him.”
14 So he got up, took the child and his mother during the night and left for Egypt, 15 where he stayed until the death of Herod. And so was fulfilled what the Lord had said through the prophet: “Out of Egypt I called my son.”[c]
16 When Herod realized that he had been outwitted by the Magi, he was furious, and he gave orders to kill all the boys in Bethlehem and its vicinity who were two years old and under, in accordance with the time he had learned from the Magi.
17 Then what was said through the prophet Jeremiah was fulfilled:
18 “A voice is heard in Ramah,
weeping and great mourning,
Rachel weeping for her children
and refusing to be comforted,
because they are no more.”
Matthew 2:19-23 The Return to Nazareth19 After Herod died, an angel of the Lord appeared in a dream to Joseph in Egypt 20 and said, “Get up, take the child and his mother and go to the land of Israel, for those who were trying to take the child’s life are dead.”
21 So he got up, took the child and his mother and went to the land of Israel. 22 But when he heard that Archelaus was reigning in Judea in place of his father Herod, he was afraid to go there. Having been warned in a dream, he withdrew to the district of Galilee, 23 and he went and lived in a town called Nazareth. So was fulfilled what was said through the prophets, that he would be called a Nazarene.
Luke 2:39-40 The Return to Nazareth
39 When Joseph and Mary had done everything required by the Law of the Lord, they returned to Galilee to their own town of Nazareth. 40 And the child grew and became strong; he was filled with wisdom, and the grace of God was on him.