Our only sources of information on Jesus’ birth are the gospels of Matthew and Luke of the Bible, which provide two different accounts of the nativity.
Matthew describes King Herod as the ruler during the time of the Nativity, and Herod died in 4BC. Furthermore, in order to kill Jesus and eliminate him as a rival king, Herod orders the “Massacre of the Innocents” — the killing of all male children in Bethlehem aged two years and under. This implies that Jesus may have been up to two years old already by that time, and this sets the Nativity at around 6BC.
Luke on the other hand places the Nativity during the Census of Quirinius which took place in 6 AD, although Luke also implies that the conception took place during the reign of King Herod – about 10 years earlier.
Because both Gospel accounts seem to assume that the birth took place some time before the death of Herod, most historians assume that Jesus was born around 4 BC or slightly before.