Tennis Association Rankings

How is tennis rankings calculated?
Is there any calculations at all or is it just the Tennis Associations decision in who’s ‘better’ then who?
Its on a points system
look at http://www.atptennis.com/en/players/information/rankfaq.asp#
different tournaments have different points and each player wins points depending on how far they go in these tournament.
Basically there is a table of points:
http://www.atptennis.com/en/players/information/rankfaq.asp#
Other tournaments include the Tennis Masters cup (win) = 650 points.
In the ATP Masters there are points like:
ATP Masters Series Cincinnati = 500
ATP Masters Series Hamburg = 350
ATP Masters Series Monte Carlo = 350
ATP Masters Series Madrid = 350
ATP Masters Series Canada = 350
ATP Masters Series Indian Wells = 225
ATP Masters Series Rome = 125
ATP Masters Series Miami = 125
ATP Masters Series Paris = 75
Others include:
Basel = 250
Halle = 225
Estoril = 175
Dubai
Barcelona = 300
Stuttgart = 250
London / Queen’s Club = 225
Chennai
Vienna = 250
Marseille = 15
Umag = 15
Rotterdam = 25