Dungeons and Dragons has a lot of math in it. There are formulas and statistics in everything from experience point totals for each new level to hit points and attack rolls to damage from small and large weapons. I have written about some of the math below:

Experience

The PHB has a table listing the XP requirements for each level. It's fairly large, and doesn't go past 20th level. I've done up an XP table that goes to level 50, but it took a while, and there's always the player who wants to know how hard level 100 would be. Players quickly realize "<level> thousand XP to next level" gives rise to the table, and works past 20th level too. It takes a while to get anywhere with that rule though - a closed-form expression would be a lot more efficient. I'm having enough fun with HTML and CSS that I'm not going to do this up in pretty MathML for you, but here goes:

There are also cases where you want to go in the opposite direction: given some number of XP, what level am I? This formula (thanks to David Richards) is even simpler: level = floor[(1+sqrt(XP/125 + 1))/2]. Leave the floor function off for an alternative view of how far you have progressed through a level: at 200,000 XP, you have attained 20th level plus half the XP to level 21, but are at level 20.50625 according to the formula, which takes into account the rising cost of successive advancement.

Hit Points

A lot of game masters implement house rules for rolling hit points because players hate having their Barbarian's d12 hit die come up 1. One popular variant is rolling again if the die comes up below half and taking the second roll. Another is rolling two hit dice and taking the highest roll. Obviously taking the higher of 2 dice rolls is better than rerolling low rolls and potentially accepting an even worse result. In practice however, the average result is only slightly higher using this second method over the first. Variant 1 results in roughly 20% higher averages as compared to straight-up die rolls. Variant 2 is only about 5% better than variant 1.

Skill Checks

Weapon Damage

There's a lot to say about weapon damage, which is fitting considering the central role it plays in many campaigns. My friend Alan has a great page about weapon damage with average damage taking into account auto-miss and crits and the d20 result required to hit (essentially opponent's AC - attacker's to-hit).

Weapon damage scaling with size continues to make no sense in D&D. The left column is the damage done by a medium-sized weapon of a given type. To the right is the damage done by the same weapon in different sizes. Percent of medium damage is based on the average die roll for each size weapon.

Medium damage

Tiny damage

% of med.

Small damage

% of med.

Large damage

% of med.

1d2

0

00.000%

?

?%

1d3

133.33%

1d3

1

50.000%

1d2

75.000%

1d4

125.00%

1d4

1d2

60.000%

1d3

80.000%

1d6

140.00%

1d6

1d3

57.143%

1d4

71.429%

1d8

128.57%

1d8

1d4

55.556%

1d6

77.778%

2d6

155.56%

1d10

1d6

63.636%

1d8

81.818%

2d8

163.64%

1d12

1d8

69.231%

1d10

84.615%

3d6

161.54%

2d4

1d4

50.000%

1d6

70.000%

2d6

140.00%

2d6

1d8

64.286%

1d10

78.571%

3d6

150.00%

2d8

1d10

61.111%

?

?%

3d8

150.00%

2d10

2d6

63.636%

?

?%

4d8

163.64%

This table shows two distinct types of oddness. First, a medium weapon that does 2d? damage does twice as much damage as a medium weapon doing 1d? damage. However, this relationship does not hold for tiny, small, and large variants. A tiny 1d8 weapon does 1d6 damage, but a tiny 2d8 damage does 1d10 damage rather than 2d6. Likewise, a large 1d8 weapon does 2d6 damage but a large 2d8 damage does 3d8, rather than 4d6 damage.

Also, weapon size categories do not demonstrate even scaling relative to medium. Tiny, small, and large weapons do not do (approximately) a set percentage of the damage that a medium weapon does. For example, large weapon damage ranges from 125% to 165% of corresponding medium weapon damage. This variation is not due to the lack of convenient die combinations to yield the desired percentage. Again using large weapons, note that most hover around 150% of medium. However, 1d2, 1d3, and 1d6 are all notably low, and 1d10 and 2d10 are notably high. If we assume 150% is the target, 1d3 should become 2d2 (150%) or 1d3+1 (150%), and 1d6 should become 1d10 (157%); 1d10 should be 1d8+1d6 (145%) or 1d10+3 (155%), and 2d10 should either be 2d8+2d6 or 2d12+1d6 (150%) or 3d8+3 (150%). The point is that these numbers seem to have been arrived at more by virtue of their nice patterns than by virtue of any meaningful numerical relationship.

Feats and Damage

To simplify the following descriptions, I'm introducing a new term: Attack Difficulty (AD). The AD of a given attack is the number you need to roll on a d20 in order to hit your target. This takes into account any bonuses the attacker and the defender may have, with the exception of the feat under discussion. An AD may be negative in rare cases, and is sometimes used when you have multiple attacks. Any AD over 20 simply uses the numbers for an AD of 20, as it falls under the auto-hit on 20 rule.

The Power Attack feat allows a fighter to trade to-hit for damage. A fighter using a two-handed weapon gains twice the advantage at the same cost as a fighter using a one-handed weapon, indicating that such fighters should use the feat more often. But how much more often? And with what weapon? In what situations?

The full answer is of course complicated (the full table of outcomes has over 4000 entries, not including the effect of differing starting strength or critical hit ranges and multipliers). The two most important factors are how easy the target is to hit without using the feat, and how much damage the weapon can be expected to do on its own. The shorter answer is the following calculator which will tell you the best amount to power attack given your weapon type and AD. The averages are slightly inaccurate due to not taking into account critical threat ranges and multipliers. However, adding them considerably complicates the calculations, and would rarely result in a different recommendation for the amount by which to power attack.

I've expanded the calculator to be more general. Basic power attack has a 1:1 ratio of to-hit cost versus damage bonus, or 1:2 if using a 2-handed weapon. I'm now allowing you to enter the cost and benefit manually, so this calculator can be applied to Improved Power Attack, Supreme Power Attack, and one particular use of the Combat Brute feat, in addition to any other permutations WotC might throw our way.

Fill in ADs below for a related group of attacks. If you are performing a standard full attack action, your ADs would increase by 5 until you run out of attacks. Leave boxes blank for attacks you don't get.

Base Weapon Damage: die plus
Power attack costs to hit; gives bonus to damage.
Can Power Attack for up to .

The Rapid Shot feat allows a character to fire an extra arrow during a full attack action, taking a -2 penalty on all arrows fired to do so.

In short: use Rapid Shot. It's only a (very minorly) bad idea if you need to roll an 18 to hit your target.

The following table gives the full answer, the expected increase in number of arrows that hit from using Rapid Shot rather than a basic full-round attack action, assuming a 19-20/x2 crit range. As you would expect, Rapid Shot is more helpful when the target is easier to hit but even with difficult targets, the effect is slightly positive.

The Manyshot feat allows a character to fire multiple arrows (as many as could be fired with a full attack action) at a single target as a standard action rather than the full-round attack action typically used to make multiple attacks. It requires that all arrows be fired at the same target, and imposes penalties on the to-hit roll of each arrow. However, it allows a move-equivalent action which may be worth enough to justify the restrictions.

Base attack

Normal attacks

Manyshot attacks

6-10

0, -5

-4, -4

11-15

0, -5, -10

-6, -6, -6

16-20

0, -5, -10, -15

-8, -8, -8, -8

21-25

0, -5, -10, -15, -20

-10, -10, -10, -10, -10

In short: Manyshot will cost you approximately 15-20% of your expected damage for most things you'll be shooting at. If the move action that you buy by using the feat is worth that, go for it. Also note that if moving gets you within Point Blank Shot range of your target, you'll almost completely wipe out the penalty for using the feat.

Calculating the cost of using Manyshot versus a full-round attack action is fairly straightforward. Only the attack difficulty and the number of arrows to be fired affect the outcome. The table cells contain the cost, expressed as a fraction of an arrow (whatever amount of damage that represents), of using manyshot as opposed to a full-round attack action. Negative numbers indicate a case where manyshot would cause more arrows to hit than using a normal full-round attack action. These cases are rare and occur only when the target is easy to hit.