How old do you have to be to be a police detective?

Federal guidelines prohibit anyone from purchasing a firearm until they are 21 yrs old. Once you pass the police academy, it is up to the department that you work for.. to promote you through the ranks. Some detectives worked for over 10 years as a patrolman. Some never reach the level of detective after 25 years.