Age doesn't matter only if you train harder than hard and can defeat some people and the master recommend you black belt
It relates to the amount of time spent in training (usually years). Even a child can earn a black belt but won't be considered a full fledged black belt until they are an adult. Until that time, they are Jr. Black belts.
You may earn a black belt, in karate, at any age. My 5 year old cousin has one...he is fierce! LOL!