Level rank is determined two ways: Level and Rating. A level 8 guild will naturally be ranked higher than a level 7 guild. The Rating comes into factor when there is more than one guild of a same level. Rating is determined by the amount of wealth spent upgrading the guild and its territories. So a level 8 guild with all level 8 territories will be higher ranked with more rating than a level 8 guild with all level 7 territories.
(I don't think the rating is entirely based on territory levels, for 2 reasons. First among guilds with all level 10 territories there are still vast differences in rating. second I run a level 10 guild ranked 9th for level with all territories level 10 except a level 9 altar, and the guild in 8th place has a level 8 altar yet they are still ranked above use by a rating difference of 3mill. Any explanations or speculation?)