Damage = ((((2 * Level / 5 + 2) * AttackStat * AttackPower / DefenseStat) / 50) + 2) * STAB * Weakness/Resistance * RandomNumber / 100
Seems long and confusing? Compared to the other formula's, this one is easy as pie. Let me explain all the variables first. Damage is, well, damage, the output number. Level is your pokemon's current level. AttackStat is your pokemon's Attack/Special Attack stat, whichever one is being used at the moment. DefenseStat is your opponents Defense/SpecialDefense stat, depending on the attack your pokemon is using. AttackPower is the power of the specific move you're using. For example, if you were to have been using Thunderbolt, you would have a 95 for this variable seeing as in the status screen, there's a 95 clearly marked in the move description when you select it. STAB is the same type attack bonus. If you're using a move that coordinates with your own type, you get a 1.5 bonus here. Otherwise, this variable is equal to 1. Weakness/Resistance depends on if your move was super-effective or otherwise. This variable could be 0.25, 0.5, 1, 2, or 4 depending on how effective your attack was. RandomNumber is simply a Random Number between 85 and 100.
Now let's use this formula. Say I wanted to see the effectiveness of Umbreon's bite on an Espeon (I'm using neutral-nature maximum stats for this example). The pokemon are both level 100. Bite's attack power is 60. Lets say the Random Number is 100. Now let's plug in all the numbers:
Damage = ((((2 * 100 / 5 + 2) * 219 * 60 / 289) / 50) + 2) * 1.5 * 2 * 100 / 100
Damage = ((((42) * 219 * 60 / 289) / 50) + 2) * 1.5 * 2
Damage = (((1909.6) / 50) + 2) * 1.5 * 2
Damage = 44.9
Damage = ~45
You may be saying WTF THATS TOO LOW but that's indeed near what it's going to be. Umbreon's Special Attack isn't that great and Espeon's Special defense is decent, so it makes sense why that number's pretty low. Try it out with a Kyogre's Surf vs. a Magikarp. :P
Oh yeah, you may be wondering how Swords Dance and those attacks up your stats. Well, each of the moves like that will up your stat or decrease your stats depending on the move a number of levels, maximum is six. Say you used Howl and upped your Attack stat by 1 level. What does that translate to? Well depending how many levels you have, those moves will up either your Attack, Defense, Speed, Special Attack, or Special Defense stats by a certain percentage.
-6 levels: 25%
-5 levels: 29%
-4 levels: 33%
-3 levels: 40%
-2 levels: 50%
-1 level: 66%
0 levels: 100%
1 level: 150%
2 levels: 200%
3 levels: 250%
4 levels: 300%
5 levels: 350%
6 levels: 400%
That's basically all I can think of in calculating a move's damage.