It should be possible to come up with an exact formula for how much XP it takes to gain each rank for a given character. That's just a math exercise.
It's never going to be possible to come up with an exact formula for mob xp because there are too many variables, and because so much information is not available to us. Some things that matter:
* Mob level
* Whether the mob is a weapon spec, or has other flags
* Group size
* Whether every group member is a PC or some are NPCs
* Morale
* Levels of each PC in a group; level 20 grouped with two level 12s will get more XP for killing a given mob than he would while grouped with two level 28s.
We know generally speaking what makes XP go up or down; not sure what value there is in trying to come up with an exact formula.