This is the formula:

EXP=(ATBEL)/(7*S)

Variables-

* a is equal to 1 if the fainted Pokémon is wild, and 1.5 if the fainted Pokémon is owned by a Trainer. * t is equal to 1 if the winning Pokémon's OT is its current owner, 1.5 if the Pokémon was gained in a domestic trade, and 1.7 if the Pokémon was gained in an international trade. * b is the base experience yield of the fainted Pokémon's species * e is equal to 1.5 if the winning Pokémon is holding a Lucky Egg, and 1 otherwise. * L is the level of the fainted Pokémon. * s is the number of Pokémon that participated in the battle and have not fainted. If any Pokémon in the party is holding an Exp. Share, s is equal to 2, and for the rest of the Pokémon, s is equal to twice the number of Pokémon that participated instead.

http://bulbapedia.bulbagarden.net/wiki/List_of_Pokémon_by_effort_value_yield

look at the link to see what EXP each pokemon will yield for the value of "B"