This question doesn’t have a brief answer. Please click on the detailed answer.
The grand Ayatullahs and marja’s of taqlid have excluded old women and children who can't distinguish between good and bad from the rulings of non-mahrams. The late Ayatullah Bahjat says:
“Looking at and making physical contact with old women and little girls who can't distinguish between good and bad, without lust, is permissible.”
The ‘standard’ for seeing which women are considered ‘old’ and ‘aged’ has to do with society and the condition and circumstances of the woman; they are what determines which woman is aged and which isn't. It is possible for an old woman who is good-looking and in good shape to arouse the lust of men in a certain society, while that not being the case in another. The same goes for little girls who can't distinguish between good and bad; in some societies they might arouse the lust of men while in others, they don’t. Thus there is no one standard that applies everywhere, you just have to see which ones are considered so and which ones aren't (and in the case of not coming to a conclusion, you have to consider them not to have reached that level of age and unattractiveness yet until you are sure).
Ayatullah Mahdi Hadavi Tehrani’s response to this inquiry:
The old woman who no longer needs to observe the hijab is one who according to normal people, usually isn't the type who would attract anyone and doesn’t arouse the lust in anyone.
Looking at such women without lust is permissible.
For further information, see:
1- The ruling of looking at non-mahram women, Question 1066 (website: 1131).
2- Haram and sinful glances, Question 1396 (website: 1420).
3- Hijab in Islam, Question 431 (website: 459).
4- The reason for women’s hijab, Question 825 (website: 884).
5- The impact of society on hijab, Question 3439 (website: 4132).
 Tawdihul-Masa’el (annotated by Imam Khomeini), vol. 2, pg. 493.