The age of animals can be determined by examination of the front teeth. However, you will not able to determine the exact age, especially in older animals.
How to hold the animals to check their teeth:
How to hold sheep and goat to check their teeth
How to hold cattle and buffalo to check their teeth
Temporary (Milk) and Permanent teeth
Young animals, like children, have temporary or milk teeth which will be replaced by permanent teeth.
Young ruminants have 20 temporary teeth, adult ruminants have 32 permanent teeth.
Temporary (milk) teeth:
Upper jaw
No front teeth
6 back teeth
Lower jaw
8 front teeth
6 back teeth
Permanent teeth:
Upper jaw
No front teeth
12 back teeth
Lower jaw
8 front teeth
12 back teeth
Remember that you will not be able to determine the exact age of the animal from its teeth, but there will be a few months either way.
You should develop the habit of regularly checking the teeth (not just for age) because bad or worn teeth will stop an animal eating or chewing the cud. Such an animal is of no use.