The damage formula changes a bit from game to game, and the damage formula for Monster Hunter 3U doesn't appear to be available in any English resources yet. However, the formula remains mostly the same from game to game, so I should at least be able to give you the general structure of the formula used. I'll be drawing on the following sources, which detail the damage formula for MHFU, MH3, and MHP3rd.
Raw Damage = [ATP x TYPE x SHARP x HITZONE] / CLASS
ATP: The Attack power of your weapon.
Type: The modifier for the attack you used. In general, slower weapons will have a higher modifier than faster weapons, resulting in more damage per hit.
Sharp: The Sharpness modifier from the weapons current sharpness.
Class: This is the class modifier. All weapons have a class modifier which you divide RAW damage by during calculations. The purpose of modifier is just to inflate the ATP of slower and harder hitting weapons. This was removed in MHP3rd, but added back in MH3U. I'll include a list of all weapon class modifiers below, but you can read more about them here.
Hitzone: The Hitzone modifier. This value varies from monster to monster, and depends on which part of the monster you hit. This value is different for Cutting and Impact damage. I've included a hitzone chart for Monster Hunter Tri below, courtesy of the Monster Hunter Wiki Do note these values have decreased a lot since 3U. Finally, the modifiers displayed are: MODIFIER / 100. For example, Cutting modifier for his head is 50 / 100 = 0.5.
Elemental Damage = [ELEMENT x ESHARP x ELMZONE] / [DIVIDER]
Element: The Elemental attack power of your weapon.
ESharp: The elemental sharpness modifier from the weapons current sharpness.
Elmzone: The Elemental hitzone modifier. This value varies from monster to monster, and depends on which part of the monster you hit. This value is different for each type of element. Note that if a monsters Elmzone value for an element is 0, you'll deal no elemental damage with that element.
Divider: The damage modifier for all elemental damage. This essentially replaces the type modifier in the Raw damage formula. This value changes between generation (and was removed in MHP3rd, but re-added in 3U), so I'm uncertain what the divider is now. However, in previous games the divider was a value such that the faster the weapon was the more important elemental damage was.
Raw Damage = [ATP x CHARGE x ARROW x RANGE x HITZONE] / CLASS
ATP: The Attack power of your weapon.
CHARGE: The Charge modifier for your bow, determined by the charge level. This value has changed between games, but the pattern is that at charge level 1 RAW damage will receive a penalty, charge level 2 will do normal damage, and charge level 3 will do extra damage. The skill Load Up will give the Bow a fourth charge level, which further increases raw damage.
HITZONE: Same as the Blademaster hitzone, except the shot value is used instead of Cut of Impact.
RANGE: A distance modifier, determined by how far you are away from the monster. To do the most damage with an attack you want your Arrow to hit at the top of its arc (visible when you aim with "R"). This means that if your either too close or too far away from a monster you'll do less damage. Do note that this does not apply to the arrow rain attack a bow has, which you can fire at charge level 3.
CLASS: Bow Class modifier, 1.2.
ARROW: There are 3 different arrow types: Rapid, Spread, and Pierce.
Rapid fires several arrows in a vertical line, with the arrow at the
top dealing the most damage with each arrow down the line doing less
damage. Higher level rapid shoot more arrows than lower level ones.
Spread fires arrows in a vertical line, with the center arrow doing the most damage and with each other arrow doing less damage the further they are away from the center. Higher level spread shots shoot more arrows than lower level ones.
Pierce fires a shot which will travel through a monster multiple times, with each hit doing more damage. The higher the pierce level the more times the arrow is able to hit.
Elemental Damage = [ELEMENT X EHITZONE X ECHARGE]
ELEMENT: The Elemental power of your weapon.
ECHARGE: The Charge modifier for your bow, determined by the charge level. This value has changed between games, but the pattern is that at charge levels 1 and 2 elemental damage will receive a penalty, charge level 3 will do normal damage, and charge level 4 will do extra damage.
EHITZONE: Same as the Blademaster elemental hitzone.
Raw Damage = [ATP x PWR x RANGE x HITZONE] / CLASS
ATP: The attack power of your bowgun.
RANGE: The Range modifier, which changes based on your distance from the target. For Normal shots you'll do more damage the closer you are to the target. For Pierce shots you want to be further back to ensure your arrows will pierce several times. Pellet shots want to be somewhere in-between the two in order to ensure all your pellets hit.
PWR: The attack power of your shot. Every shot has a different attack power which will modify the damage you do, with higher level shots being able to deal more damage. Pierre achieves this by increasing the number of times your arrow can pierce, and Pellet will increase the number of shots fired. Normal 2 does more damage than Normal 1, and Normal 3 will bounce around on the target (if it hits more than once it will deal more damage than Normal 2).
HITZONE: Identical to the Hitzone modifier of the Bow.
CLASS: Class modifier. Different for light (1.3) and heavy (1.5) bowguns.
Elemental Damage = [ATP * ELEMENT * EHITZONE]
ATP: The attack power of your weapon.
ELEMENT: The elemental modifier for your shot type. This only exists on the elemental shots, Fire, Ice, Water, Thunder and Dragon. This value is equal for all shots except Dragon, which behaves similiar to a Pierce shot, being able to hit a target multiple times. The other elemental shots can only hit once, similiar to a Normal shot. The Elemental damage you do is determined by shot type (i.e. Fire S does Fire damage).
EHITZONE: Identical to the elemental hitzone modifier on Blademaster weapons and the bow.
Total Damage = Raw Damage + Elemental Damage
taken from the Official Brady Guide
When I first wrote this answer up I excluded information on class modifiers, since I wasn't sure if they were still present in MH3U. I've been looking around since then and it appears class modifiers have been added back in the game. Mean_Beanie did some calculations and research over at GameFaqs and was able to come up with the class modifiers for each weapon, and posted his results here.
The class modifier for each weapon is as follows:
- Greatsword: 4.8
- Longsword: 3.3
- Sword and Shield: 1.4
- Dual Blades: 1.4
- Hammer: 5.2
- Hunting Horn: 4.6
- Lance: 2.3
- Gunlance: 2.3
- Switch Axe: 4.6
- Light Bowgun: 1.3
- Heavy Bowgun: 1.5 (Mean_Beanie is uncertain about this number)
- Bow: 1.2
Assume you are using the Svarog Starsmasher Hammer, which has 1404 power, 320 Fire damage, and white sharpness (without Sharpness +1). Let's further assume the Elemental Divider has remained unchanged from MH3, and is equal to 10, and that the Class modifier is 5.2. Let us also assume you're hitting with a super pound, which has an attack modifier of 0.76. Finally, let's assume you're hitting a Royal Ludroth in the mane, which has an Impact Hitzone of 0.50, and a Fire Hitzone of 0.40.
Your damage would be as follows:
Total Damage = [[1404 * 0.76 * 1.32 * 0.5] / 5.2] + [[320 * 1.13 * 0.40] / 10]
= 135.43 + 14.464 = 149.90
As you can see, for a Hammer your elemental damage contributes very little, that's because the Type modifier for Hammer attacks is very high. It's almost always better to go for RAW damage when using a slow weapon like a Hammer. When using a weapon like a Sword and Shield the Elemental damage is a lot more important, since the attack type modifiers are a lot smaller.