The most widely accepted view is that the First Temple lasted 410 years and the Second Temple 420. This is mentioned in the Talmud Yoma 9a: “Rabbi bar bar Chana said, Rabbi Yochanan said: Why is it written (Proverbs 10:27): 'The fear of God prolongs life and shortens the years of the wicked'? 'The fear of God prolongs life' refers to the First Temple, which lasted 410 years and had only 18 High Priests working in it, 'and shortens the years of the wicked' refers to the Second Temple, which lasted 420 years and had more than 300 priests working in it.
The concept that the Second Temple lasted longer than the First is indicated in the Jerusalem Talmud (Megillah 1:12) in its explanation of a verse. It states, “And in Jerusalem they were in the First Temple for 410 years and in the Second for 420 years, to fulfill what is written (Haggai 2:9): “The glory of this latter house will be greater than that of the former.”” This verse is also cited in the Babylonian Talmud (Bava Batra 3a-b) as evidence that the Second Temple lasted longer than the First, but it does not specify the number of years for each.
The same is found in the Tosefta, which predates the Gemara. The Tosefta details the number of years the Tabernacle remained in each encampment. This is what it says there (Zevachim 13:3): The days (years) of the Tent of Meeting: 39. And in Gilgal: 410 years. In Shiloh: 369. In Nov and Gibeon: 57. The First Temple: 410 years and the Second Temple: 420.
Rambam also writes this (Laws of Shmita and Yovel, chapter 10, law 3): The First Temple lasted 410 years, from when it was destroyed, the land remained desolate for 70 years and the Second Temple was built, which lasted 420 years.
To understand our sages' account of the years the First Temple lasted, we must clarify in what year it was built and in what year it was destroyed.
King Solomon began the construction of the First Temple in the fourth year of his reign, 480 years after the Exodus from Egypt, as clearly stated in the verse (1 Kings 6:1): “And it was in the 480th year from the exodus of the Israelites from the land of Egypt, in the fourth year, in the month of Ziv, the second month of Solomon’s reign over Israel, that he built the house for God.” The Jewish people left Egypt and received the Torah in the year 2448, as stated in the Talmud (Avodah Zarah 9a). If this is the case, King Solomon began the construction of the First Temple in the year 2928. The Temple lasted until the year 3338 from creation (Rashi Ahi), 890 years after the Exodus from Egypt, which is 850 years after the Jewish people entered the Land of Israel. This calculation follows the opinion of Ula in the Talmud (Sanhedrin 38a), which states that God showed kindness to the Jewish people, who did not fulfill what is stated in the Torah (Deuteronomy 4:25): “When you have children and grandchildren and they settle in the land and become wicked, etc., and they will perish.” This is because God brought forward the destruction and exile by two years, and they were exiled for 850 years after their entry into the Land, so that the number of years added to the phrase “and settle” (852) would not be fulfilled. In other words, 852 years would not pass from their entry into the Land, thus preventing the continuation of the verse “and they will perish.”.
The count of the duration of the First Temple for 410 years is based, according to Rashi (Sanhedrin 97a) on the sum of the years of the reign of Shlomo, from the fourth year of his reign, in which the construction of the First Temple began, together with the years of the reign of the kings of Judah until the destruction of the Temple, on the 9th of Av of the 11th year of the reign of Tzidkiahu (Melachim 2, chap. 25, Jeremiah chap. 52).
King Solomon reigned for a total of 40 years (1 Kings 11:42). Therefore, from the construction of the First Temple to the end of his reign, there were 36 years. After King Solomon, 20 kings reigned over Judea:
1) Rejavám 17 years old (Melachim 1, 15:1)
2) Aviam his son 3 years cut short, in practice only 2 years (Melachim 1, 15:9)
3) Asa his son 41 years (Melachim 1, 15:10)
4) Yehoshafat his son 25 years cut off, in practice as 23 years (Melachim 1, 22:42)
5) Jehoram, his son, 8 years old (Melachim 2, 8:17)
6) Ahaziah his son 1 year old (Melachim 2, 8:26)
7) Atalia bat Ajav 6 years, reduced, in practice as 5 years (Melajim 2, 11:3)
8) Yoash ben Ahaziahu 40 years old (Melachim 2, 12:2)
9) Amatziahu his son 29 years old (Melachim 2, 14:2)
10) Uzziah (Azariah), his son, 52 years old (Melachim 2, 15:2)
11) Iotam his son 16 years old (Melachim 2, 15:33)
12) Ahaz his son 16 years old (2 Kings 16:2)
13) Hezekiah his son 29 years old (Melachim 2, 18:2)
14) Manasseh his son 55 years old (Melachim 2, 21:1)
15) Amon his son 2 years old (Melachim 2, 21:19)
16) Joshua, his son, 31 years old (Melachim 2, 21:1)
17) Joachaz his son 3 months old (2 Kings 23:31)
18) Ioakim his son 11 years old (Melachim 2, 23:36)
19) Yoachim his son 3 months old (2 Kings 24:8)
20) Tzidkiahu his son 11 years old (Melachim 2, 24:18)
If we add up the years of the kings we get 389, together with the 36 of Shlomo's reign we get 425, which is 15 years more than those mentioned by our sages in the Talmud.
Rashi (Melachim 2, 14:22) comments on this contradiction between the verses and the Talmud, saying that although the verse in Melachim 2, 14:2 says that the ninth king of Judah Amatzia reigned for 29 years, in practice, he reigned for only 14 years, and the last 15 years of his reign are counted as the reign years of his son, King Uzziah (Azariah).
The Radak (2 Kings 14:22) argues against Rashi's view because it doesn't quite align with the verses. He addresses the contradiction by stating that while the years of the First Temple do indeed begin to be counted from its construction in the fourth year of King Solomon's reign, they are counted up to the third year of King Jacob's reign, when Nebuchadnezzar came to power, and not until its actual destruction. According to this view, the Temple lasted 410 years and 3 months.
In his introduction, Don Itzjak Abarbanel argues that the Book of Kings disregards the words of our sages in the Talmud and calculates the time of the First Temple according to a simplistic interpretation of the verses. He also counts the years of the kings of Judah, including the years that our sages say were omitted. According to his calculation, the Temple was destroyed in the year 3358 from creation and lasted approximately 430 years from the beginning of its construction.
The Raavad writes in his introduction to the book of tradition (Sefer HaKabala) that the First Temple lasted 433 years. To address the contradiction with the words of our sages who say that the Temple lasted 410 years, the Raavad wrote that our sages did not take into account the years of Kings Yoakim and Zedekiah because from the beginning of Yoakim's exile, the Temple was considered destroyed.
Side note:
Ezekiel 4:4-5 mentions 390 days in its prophecy concerning the atonement of the sin of the "House of Israel" and 40 days of atonement for the "House of Judah." Each day in the prophecy of Ezekiel represents a year of sin.
Rashi explains this verse with the words of the Seder Olam (chapter 26) saying that the count of sins goes from the entry of the Jewish people into the Land of Israel with Joshua bin Nun.
However, this does not mean that 390 + 40 years passed from when the Jewish people entered the Land of Israel until the destruction of the Temple, but rather that the northern kingdom (Israel) sinned for 390 years (out of the 850 years that the Jewish people spent in the land from when they arrived until they were exiled) and the southern kingdom (Judah) sinned for 40 years.
Rashi even mentions 110 years of sin during the time of the Shoftim and 243 during the time of the Northern Kingdom. It is interesting to note that in Shoftim 2:7 the Torah states that the Jewish people did not sin during the lifetime of Joshua and the elders (except for Achan, as is known; see Joshua chapter 7).
Shalom. Thank you, it's important for me to know that story from years ago. It would be good to tell the story, from the creation of the world to Noah's departure from the ark, with dates, centuries, and years. Ha'Shem, it's in your hands. Amen.