The length of his reign over Israel was forty years: he reigned seven years in Hebron and thirty-three years in Jerusalem.
In context
25Yahweh exalted Solomon greatly in the sight of all Israel and bestowed on him royal splendor such as no king over Israel had ever had before him. 26David son of Jesse reigned over all Israel. 27The length of his reign over Israel was forty years: he reigned seven years in Hebron and thirty-three years in Jerusalem. 28He died at a good old age, full of days, riches, and honor, and his son Solomon reigned in his place. 29Now the acts of King David, from first to last, are written in the records of Samuel the seer, the records of Nathan the prophet, and the records of Gad the seer,