This is the damage formula
^ Complicated math right there.
>Level is the level of the attacking Pokémon.
Attack and Defense are the working Attack and Defense stats of the attacking and defending Pokémon, respectively. If the attack is Special, the Special Attack and Special Defense stats are used instead. Some moves like Psystrike use other stat than usually move of this category would use (in case of Psystrike, it uses Special Attack and Defense).
Base is the base damage of the attack.
Modifier is calculated as follows:
STAB is the same-type attack bonus. This is equal to 1.5 if the attack is of the same type as the user, and 1 if otherwise.
Type is the type effectiveness. This can be either 0, 0.25, 0.5, 1, 2, or 4 depending on the type of attack and the type of the defending Pokémon.
Critical is 2 for a critical hit, 1 otherwise.
other counts for things like held items, Abilities, field advantages, and whether the battle is a Double Battle or Triple Battle or not.
rand is a random number from 0.85 to 1.00.
The damage done would be aroound 167. Here's another example:
>Imagine a level 75 Glaceon that has the following stats:
HP: 201
Attack: 123
Defense: 181
It uses the move Ice Fang (Ice, physical, base damage 65) against a level 78 Garchomp:
HP: 270
Attack: 210
Defense: 163
Garchomp is Dragon/Ground, so it has a double weakness to Ice. Thus, Type = 4. Additionally, Glaceon, being an Ice-type, receives STAB, so STAB = 1.5.
We then plug Modifier into the rest of the formula:
So depending on luck, Glaceon will do damage in the range 170-200 HP. Despite Garchomp's double weakness to Ice, Glaceon's Ice Fang will not defeat it in a single hit.
Bulbapedia
There you go xD Sorry if it's a little complicated.