Mercs take the same exp as any other group member. I have never heard if a merc contributes to the group bonuses though. I am guessing that they are flagged as a normal group member; therefore, they should contribute to the bonuses as well.
For simple math assume same level and only discussing regular exp, not AA.
1 person in group gets 100% exp
2 group members, +20% group bonus, each share is (100+20)/2 = 60%
3 group members, +40% bonus, each share is (100+40)/3 = 47%
4 group members, +60% bonus, each share is (100+60)/4 = 40%
5 group members, +80% bonus, each share is (100+80)/5 = 36%
Sixth group member doesn't decrease the percentage any further, so 6 group members, each share is 36%.