it is based on population, so if a big population planet with 5k loyalty combines with a 0 pop planet, the result cluster (assuming all other planets are 5k or 0pop ) loyalty will be 5k
the exact equation i am unsure of, but is probably an average of 5 colonies resulting loyalties when factoring in their respective populations
so (pop1/total pop )X(loyalty1) + 2...3...4...5..)) / 5
if that is unclear, pm me on GC/RT, and i will try and type it out better if needed