How to get maximum of animated value?

I need to get a maximum of value to get it’s ratio (current/max). How can i get it? Maybe i can get info from keys or smth?