How do you calculate the hash rate of a GPU?
You don't. You use empirical data after drivers have been optimized by AMD/Nvidia (lol), mining software has been optimized for the given algorithm, and a sufficient number of users have tested various clock settings for the greatest raw performance or the greatest efficiency when mining coins on that algorithm.