If you read any of this answer, read this:
The formula for the score on the Top Users page looks like "The sum of all values of (upvotes - downvotes) for answers that are not Community Wiki"
The following goes into more detail on how this was decided.
The top users page has been altered at some point. Now it includes negatively rated posts in its calculations.
This was confirmed after seeing it consistently match the value shown on the user profile page's tag listing, which has always included negative values.
To further confirm, I checked Jeff Atwood again, but this time on the much simpler "cosmetic" tag. At the time of examination, Jeff has 3 non-wiki answers to it, at scores of 2, 1, and -39 (that's what happens when you oppose kbd, it seems). His profile confirms this by placing it at -36. Now, under the old formula, this would make his score equal to 3, however, the Top Users list doesn't even list him at all! This thus means the formula was changed to include negative changes, which explains why all positive instances are matched between the profile page and the Top Users.
I'm leaving the below mostly for posterity. You can skip the section now highlighted "OUTDATED".
It does not include Community Wiki posts. It is all based on the current status of the question - votes pre-wiki do not count.
I did a check on bobince on [regex]. His legendary answer only turned CW after a later point. I believed he claimed to get 800 reputation from it, at least. Now, I summed up all of his non-CW answers and got 276. This is equal to his value on the Stats page. So none of the votes on the legendary answer were counted, meaning all 3000+ votes are excluded. Prior to this I did a similar calculation on a random user Rex M. who had 85 score on [sharepoint]. He had 2 CW answers and they too were excluded if you manually tallied the scores.
The "Last 30 Days" only counts votes on answers within the last 30 days. I did this check on myself - I am on the Last 30 Days for SharePoint at 11 score. Within those 30 days I received 3 extra upvotes on my very first answer back in February, but 11 is only the sum of the answers within those 30 days. So answers from longer than 30 days ago are not counted, even if they received votes in that time.
Hah, I think I may have found what is throwing off your calculations. The upvotes-downvotes is a tricky beast, but I found a sensible enough sample checking Jeff Atwood on Meta and his performance in [duplicates]. For All Time, Jeff has a score of "23" in 10 answers.
His vote totals for all of his answers are 4, 3, 1, 1, 4, 0, 2, 1, 1, -4, 0, 0, 2, 0, and 4. The two highlighted ones are +3/-7 and +6/-2 respectively, so these are questions that are neither pure upvotes nor pure downvotes. If you sum up positive numbers (of which there are 10), you'll get Jeff's score of 23. The +3/-7 entry shows that an entry with a net negative score is completely ignored, including any upvotes. This is not the same behavior shown by the +6/-2 entry, where the downvotes are included.
So combine this with the point made with bobince (votes received before an answer was made wiki do not count), and our formula looks like "The sum of all non-negative values of (upvotes - downvotes) for answers that are not Community Wiki".
For fun, since I confirmed the behavior of pure upvotes with Rex M. (which is technically expected as when downvotes = 0, upvotes > downvotes is true.), I decided to do a check on pure downvotes. Naturally, it is expected to have the same effect, since upvotes is 0 then upvotes < downvotes is true and the answer will be skipped in the score calculation. I picked Marc Gravell's performance in override, which includes a single post that has a score of 0/-1. And his score does skip over it. Rather useless to point out in the long run but I figure no reason not to leave this test out.
ONE LATER WORD
Now that I have a flag on one of my posts, I was able to confirm that a live flag on a post does not impact the tag stats score. Naturally, the accumulation of flags that causes post deletion invalidates the post from being in the running, but live flags are disregarded even if they would bring your post to 0 or negative when calculated. Only the displayed amount matters.