In the starting of Thor after the battle between the Asgardians and the Frost Giants Loki is found as a child. And the war is in 965 AD. So by calculation the age can be obtained.
But in Avengers Infinity War Thor himself declares that Thanos is 1500 years old:
Thor: You know, I'm 1500 years old. I've killed twice as many enemies as that. And every one of them would have rather killed me than not succeeded. I'm only alive because fate wants me alive. Thanos is just the latest of a long line of bastards, and he'll be the latest to feel my vengeance - fate wills it so.
How can that be?