The ark remained at Kiriath-jearim until David had it brought to Jerusalem (2 Samuel 6:1–23; 1 Chronicles 13:6; 2 Chronicles 1:4). Assuming that it was another 30–40 years before Samuel was old and the people started calling for a king (1 Samuel 8:1–22), with Saul reigning for forty years thereafter (Acts 13:21) and David another seven before he moved the ark, that would put the ark in Kiriath-jearim for around 100 years in total.
2 From the day that the ark was lodged at Kiriath-jearim, a long time passed, some twenty years, and all the house of Israel lamented after the LORD.