Answer
The books of the Bible were written at different times by different authors over a period of approximately 1,500 years. But that is not to say that it took 1,500 years to write the Bible, only that it took that long for the complete canon of Scripture to be penned as God progressively revealed His Word. The oldest book of the Bible, according to most scholars, is either Genesis or Job, both thought to have been written by Moses and completed around 1400 BC, about 3,400 years ago. The newest book, Revelation, was written around AD 90.
The books of the Bible were not being written continuously. For example, 400 years elapsed between the completion of the last book of the Old Testament, Malachi, and the beginning of the New Testament with the gospel of Matthew. The “400 years of silence” occurred because the Spirit of God did not inspire any Scripture during that time. Although Matthew’s gospel is placed first in the New Testament, it is believed that the first New Testament book written was actually the epistle of James, written in approximately AD 44—49. The entire New Testament was written in about 50 years, from AD 44 to 90 or 95.
It is impossible to know how long it took each author to write his particular book. Moses wrote the first five books of the Old Testament in about 40 years (1445—1405 BC). Does that mean he was continually writing for 40 years? We just don’t know the answer. Paul’s letters to the New Testament churches, especially the shorter ones such as Philemon, may have been written in one sitting. The same can be said of 2 John and 3 John, which are very short letters written to specific individuals.
We do know that each of the Bible’s authors wrote only as much and as long as they were led to do so. Each author wrote at the direction of the Holy Spirit who “breathed out” Scripture to him. Peter explains this process: “Prophecy never had its origin in the human will, but prophets, though human, spoke from God as they were carried along by the Holy Spirit” (2 Peter 1:21; cf. 2 Timothy 3:16).