Cut it in 1/2 around the mid section and count the rings.
Sorry, that was in poor taste...
There is no way to tell unless someone kept accurate records of the animal.
If you have a youth, you may be able to guess, but as someone said, they all grow at different rates so weight can't be used
at all. I've had one girl hit 4100 grams at 27 months (yes, seriously) and I've had two year old snakes barely hit 800 grams.
I've heard of them being much smaller.
You can try, but a snake will NEVER tell you their age... If they did, they'd be lying.