When was the Old Testament Written? (Dates of All Books)

Written by Joshua Schachterle, Ph.D
Author | Professor | Scholar
Author | Professor | BE Contributor
Verified! See our editorial guidelines
Verified! See our guidelines
Date written: January 16th, 2025
Disclaimer: The views and opinions expressed in this article belong to the author and do not necessarily match my own. - Dr. Bart D. Ehrman
The Old Testament, usually viewed as a single, cohesive text, spans centuries and reflects the diverse voices and experiences of multiple authors. When was the Old Testament written? The answer is far more intricate than it might seem.
In this article, I investigate the varied timelines of the Old Testament’s composition, considering scholarly theories about its authorship, dating, and historical context. From the earliest traditions associated with the Pentateuch to the prophetic writings and wisdom literature, I’ll examine the layers of history embedded in these sacred texts and the challenges of pinpointing their exact origins.

Background: When Was the Old Testament Written?
Although we tend to think of the Bible as one book since its writings are bound together, many different people in many different historical eras wrote it. This is equally true of the Old and New Testaments, by the way. In The Rise And Fall Of The Bible: The Unexpected History of an Accidental Book, Timothy Beal writes that for this reason, it makes more sense to think of the entire Bible as a library rather than a single book.
(Affiliate Disclaimer: We may earn commissions on products you purchase through this page at no additional cost to you. Thank you for supporting our site!)
For this reason, when we ask the question “When was the Bible written?,” the answer is far from straightforward. The Old Testament, for example, consists of at least 39 books according to all Christian denominations, with Catholics and Orthodox Christians adding several deuterocanonical, or secondary books to the Protestant canon. Jews count the same canon of 39 books as only 24 books by grouping them differently. For example, they consider some books that Christians call two books, such as Ezra and Nehemiah, as only one.
Scholars have spent more than a century investigating the history and composition of each of the Old Testament writings, many of which had more than one author and more than one layer of composition over time.
The Christian Old Testament is generally divided into five categories: The Pentateuch, the Historical Books, the Wisdom Books, the Major Prophets, and the Minor Prophets. Without further ado, then, let’s look at each division of books and their composition.
The Pentateuch
The Pentateuch consists of the first five books of the Old Testament: Genesis, Exodus, Leviticus, Numbers, and Deuteronomy. For Jews, this is called the Torah and signifies the Jewish Law. It describes God’s creation of the world, the birth of the nation of Israel, the Israelites’ slavery in and deliverance from Egypt, and the granting of the Law to Moses on Mount Sinai.
Although tradition has long stated that these books were actually written by Moses, there are good reasons for doubting this. In The Bible's Foundation: An Introduction to the Pentateuch, Charles Aaron notes that, as early as the 12th century, people began to question the assumption of Moses’ authorship. In addition, in Moses the Egyptian: The Memory of Egypt in Western Monotheism, Jan Assman writes “We cannot be sure Moses ever lived because there are no traces of his existence outside the tradition.” So if Moses didn’t write the Pentateuch, who did and when?
As Bart Ehrman writes, the scholarly consensus has long held that it was written by four different authors, a theory known as the documentary hypothesis. Scholars call those authors J, E, D, and P.
The first source is known as the Yahwist source since it refers to God as “Yahweh.” Scholars usually abbreviate this source as “J” because the German transliteration of Yahweh begins with a J. The second source is called E because it calls God “Elohim. ” The third source is known as D because it is solely responsible for the book of Deuteronomy. The fourth and final source is called the Priestly source or “P.” Scholars refer to it as this because its main concerns are rules for priests involving the performance of ceremonies and other cultic functions.
As for specific dates, in The Composition of the Pentateuch: Renewing the Documentary Hypothesis, Joel Baden gives us some date ranges for when each of the four sources were written. He says that material written by J was produced between the 10th and 9th centuries BCE. The E source was written about a century later, possibly around the middle of the 9th century BCE. The D source was written later still, probably in the 7th century BCE, while the P source, the latest, was written in the 6th century BCE.
The five books of the Pentateuch reached their final form after the Babylonian Exile (597-538 BCE) during the Persian period (538-332 BCE).
The Historical Books
Next, there are 12 historical books in the Old Testament: Joshua, Judges, Ruth, 1 and 2 Samuel, 1 and 2 Kings, 1 and 2 Chronicles, Ezra, Nehemiah, and Esther. They constitute about half the Old Testament and were written anonymously. The books of Joshua, Judges, Samuel, and Kings tell the story of the Israelites from the conquest of the land of Canaan to the Babylonian exile. In the Eerdman’s Commentary on the Bible, John Rogerson writes that these books, along with Deuteronomy, were originally one long work, known as the Deuteronomistic History. They were written during the Babylonian Exile in the 6th century BCE, likely as an attempt to preserve Israelite culture and history in the face of exile.
In the same Bible commentary, Richard Coggins writes that the books of Chronicles cover much of the same material as the Pentateuch and the Deuteronomistic History and were written in the 4th century BCE. Ezra and Nehemiah, originally one work, were likely finished during the 3rd century BCE.
The books of Ruth and Esther are, in some sense, outliers in this group. In A History of the Jews and Judaism in the Second Temple Period, Lester Grabbe writes that Ruth’s identity as a non-Israelite in the book of Ruth and the book’s argument for inclusivity of non-Israelites probably places its composition in the 5th century BCE during the Persian period.
Esther was likewise composed during the Persian period, probably in the 4th century BCE. It features a Jewish woman named Esther, chosen by a Persian man to be his queen. The Jewish people under the Persians are then threatened by a high-ranking member of the Persian court and Esther is able to alert her husband to this danger, thereby saving her people.
The Wisdom Books
There are 5 Wisdom Books: Job, Psalms, Proverbs, Ecclesiastes, and Song of Solomon (or Song of Songs). They were written at various dates and differ from the preceding books in that wisdom is their focus rather than history.
In Old Testament Wisdom: An Introduction, James Crenshaw writes that Proverbs was probably completed during the Hellenistic Period (332-198 BCE), although it contained some material that was much more ancient. Ecclesiastes, on the other hand, was finished around the 3rd century BCE, while Job was complete by around the 6th century BCE.
The book of Psalms is a compilation of 150 religious hymns, although Eastern Orthodox churches add several more. Although the traditional attribution is to Israel’s King David, the scholarly consensus is that this is a misattribution. Instead, scholars believe the Psalms were written by several anonymous authors between the 9th and 5th centuries BCE.
Finally, the Song of Solomon, also known as the Song of Songs, is a long, erotic love poem attributed to King Solomon. In his commentary on Song of Songs, Martin Pope argues that the poem, which refers neither to God nor to the Jewish Law explicitly, might have been part of a ritual presented by some ancient fertility cults. Most scholars believe it was written during the 3rd century BCE and its author is unknown.
The Major Prophets
There are five books of the Major Prophets, so called because they are longer than the books of the Minor Prophets: Isaiah, Jeremiah, Lamentations, Ezekiel, and Daniel.
Although Isaiah is identified as the writings of 8th-century BCE prophet Isaiah ben Amoz, scholarly consensus places its composition during the Babylonian exile in the 6th century BCE. It actually consists of the contributions of two different authors. Chapters 1-33 contain forewarnings of punishment at the hands of the Babylonians and promises of a later reestablishment of Jerusalem and Judah. Chapters 34-66, on the other hand, assume that judgment has already happened and that restoration is on the verge of taking place.
Jeremiah is a later prophetic book. In The Oxford Companion to the Bible, Robert Davidson writes that the three types of material found in Jeremiah —poems, narratives, and biographies — have different sources. Some of this material may have originated during the Persian period, but in The Prophetic Literature: Interpreting Biblical Texts, Marvin Sweeney writes that the final version of Jeremiah was probably completed by the 2nd century BCE.
Lamentations is a collection of poems lamenting the destruction of Jerusalem, which occurred in 586 BCE. Because it follows the book of Jeremiah in the Bible and addresses some of the same themes, it was long attributed to the prophet Jeremiah, an attribution since discarded by biblical scholars. In The Jewish Study Bible, Adele Berlin writes that Lamentations was compiled by the end of the 6th century BCE.
The book of Ezekiel claims to recount six visions of the prophet Ezekiel in Babylon during the Babylonian exile. The book focuses on three major themes. Chapters 1-24 address the judgment on Israel, chapters 25-32 concern the judgment on the nations, and chapters 33-48, make promises of future blessings for Israel. Like Lamentations, it was likely composed in the 6th century BCE.
Daniel differs from the other Major Prophets in that it was written much later. Although its setting is the 6th century BCE during the Babylonian exile, scholars generally agree that it was written in the 2nd century BCE. It was a response to a different conflict when the tyrannical king Antiochus IV Epiphanes of the Seleucid empire threatened to destroy Jewish religious traditions. Daniel was written as an encouragement to those fighting for those traditions, showing that since they had successfully survived the Babylonian exile, they would outlast the Seleucid oppression as well.

The Minor Prophets
There are 12 books of the Minor Prophets: Hosea, Joel, Amos, Obadiah, Jonah, Micah, Nahum, Habakkuk, Zephaniah, Haggai, Zechariah, Malachi. In A Brief Introduction to the Old Testament: The Hebrew Bible in Its Context, Michael Coogan writes that each book contains three types of material: autobiographical writing on the prophet whose name is given to the book, biographical writing about the prophet in the third person, and prophetic speeches by the prophets, often in the form of poetry. The exception to these is the Book of Jonah, a narrative about the titular prophet, written anonymously.
Hosea, Amos, Obadiah, Jonah, Micah, and Joel can be dated to the early part of the Assyrian period (912-612 BCE). Then, the dating for Nahum, Habakkuk, and Zephaniah is attributed to the later part of the same period. Finally, Haggai, Zechariah, and Malachi are usually dated to the Persian period (559-331 BCE).
When was the Old Testament written? Although we know the approximate answer for the individual books, when did the Old Testament become one whole unit, otherwise known as a canon?
Formation of the Old Testament Canon
In How to Read the Bible, Mark Zvi Brettler writes that Jews saw the five books of the Pentateuch as authoritative Scripture by the 5th century BCE. He writes that a similar status was conferred on all the prophetic books sometime in the 2nd century BCE. However, Brettler says that the other Jewish Scriptures had a more flexible standing. Books that one group saw as Scripture were sometimes either entirely rejected or given much less status by other groups. The Jewish canon, or Tanakh, was likely solidified by the end of the 1st century CE.
By about 130 BCE, the entire Jewish Scriptures had been translated into Greek — a translation known as the Septuagint— which early Christians would eventually use as their Old Testament. Christian author Jerome completed his Latin translation of the Septuagint Latin around 400 CE, and Protestant Bibles generally agreed with Jerome’s choices of canonical books.
Conclusion
When was the Old Testament written? Determining the answer is not simple as it may at first sound. The Old Testament is a collection of many books written (mostly anonymously) by many different authors in many different time periods. Additionally, even at the level of individual books, we can only determine a range of possible composition dates.
The Christian Old Testament is generally divided into The Pentateuch, the Historical Books, the Wisdom Books, the Major Prophets, and the Minor Prophets. Although this is a convenient way to arrange and study the books, it doesn’t always provide a perfect fit. Lamentations, for example, would seem to fit better with the Wisdom Books rather than the Major Prophets, while Daniel, although certainly an important book, was written in a far different time period than the other Major Prophets.
However, as a general rule, these divisions help us to understand and study this massive library of religious and cultural writings from distant times, places, and social locations.