The Bible does not say how old Jesus was when He returned from Egypt, but it is known that Herod died about 4 BC. Jesus was, most likely, born in 4 BC. That would have made Jesus less than 1 year old when Herod died. It was after Herod died that an angel spoke to Joseph and told him that it was safe to return. Jesus may have returned right away or it may have even been a few years later. It is known, however, that Jesus was living in Nazareth by the age of 12.
Matthew 2:15
And was there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son.
Matthew 2:19-23
" But when Herod was dead, behold, an angel of the Lord appeareth in a dream to Joseph in Egypt, Saying, Arise, and take the young child and his mother, and go into the land of Israel: for they are dead which sought the young child's life. And he arose, and took the young child and his mother, and came into the land of Israel. But when he heard that Archelaus did reign in Judaea in the room of his father Herod, he was afraid to go thither: notwithstanding, being warned of God in a dream, he turned aside into the parts of Galilee: And he came and dwelt in a city called Nazareth: that it might be fulfilled which was spoken by the prophets, He shall be called a Nazarene. "