No clear answer
When the mother & child find it mutually agreeable is the time to stop.
It doesn't have to be all stop at once, some kids will just nurse once or twice a day. Obviously if mom's milk is gone then it has to stop. Look up some of the reasearch by kathryn dettweler about the "natural age of weaning" read full details on her website but from her research she gets an answer between 2.5 - 7 yrs.