The period that David reigned over Israel was forty years; seven years he reigned in Hebron, and in Jerusalem he reigned thirty-three years.
1 Kings 2:11
Surrounding context
2:10 So David rested with his fathers, and was buried in the City of David.
2:11 The period that David reigned over Israel was forty years; seven years he reigned in Hebron, and in Jerusalem he reigned thirty-three years.
2:12 Then Solomon sat on the throne of his father David; and his kingdom was firmly established.