The actual age of David when he slew Goliath is not specified in the scriptures. However, there are certain scriptures that indicate he was a “youth.” The word ‘youth’ is further explained below along with a consideration of David’s size to help us arrive at an educated guess as to David’s age when he slew Goliath.
David’s physique. Since David came from the same parents (or at least the same father) as his physically-impressive brother, Eliab, David may very well have grown to a similar impressive stature.
Saul’s argument to David. When David was offended by the Philistine’s words against the living God, he volunteered to fight the giant. Saul’s reaction to David’s offer is telling. Notice that he did not claim that David was too small, although even the tallest people today would be dwarfed by Goliath. Instead, Saul said, “You are not able to go against this Philistine to fight with him; for you are a youth, and he a man of war from his youth” (1 Samuel 17:33). Saul tried to dissuade David by recognizing David’s youthful age and Goliath’s seasoned experience. The Hebrew word translated as “youth” (נַעַר, na’ar) can refer to any age from an infant (Moses in Exodus 2:6) to someone old enough to lead a military coup (Absalom in 2 Samuel 18:32).
Some suggest that the slaying of Goliath may have been chronologically prior to the days in which David played the harp for Saul, but there are problems with this argument. First and foremost, 1 Samuel 17:15 states, “But David occasionally went and returned from Saul to feed his father’s sheep at Bethlehem.” So David regularly served Saul before his encounter with Goliath. Also, 1 Samuel 18:2, which immediately followed the battle with Goliath, states, “Saul took him [David] that day, and would not let him go home to his father’s house anymore.” Finally, chapter 16 shows that Saul and David were introduced to each other and that David became his armor bearer as seen in verse 21, whereas chapter 17 shows no such introduction, indicating they knew already knew each other.