I cant write it all but scroll down on this page untill you come to the Gain formula
Read this
Example (Generation V)
An internationally traded, level 55 Venusaur has just defeated a wild, level 62 Zekrom.
The base experience yield of Zekrom is 306, meaning that a level 62 Zekrom will normally yield 3794 experience points, when defeated by another Pokémon at level 62. However, this Venusaur is at level 55, meaning that it will yield 4338 experience points. The constant of 1 is added, giving 4339, and the international trade multiplies this by 1.7, meaning that this Zekrom will yield a total of 7376 experience points.
////Jofly Hope I helped