# Gen III/IV Capture Mechanics

This section concerns how the game determines whether an attempted Pokémon capture will be successful. If you're not interested in how it works and just want my catch rate calculator, that's here.

Please note that the Pokémon games only work with integers. In practice, this essentially means that they round all numbers down, including at every intermediate step in a calculation. This will not be specifically included in the mathematical formulas on this page, but whenever you perform any action within a particular formula that results in a non-integer, round it down before performing the next action in the formula if you want to get a perfect result.

This section applies to the third- and fourth-generation games. For the R/B/Y algorithm (which is completely different), look here. For the G/S/C version (which is slightly less completely different, but makes up for it by being ridiculously buggy), check here. For the fifth generation, try this page.

## The Catch Rate Formula

While incorrect versions have been floating around for a while, the true catch rate formula looks like this:

`X = (((3 * M - 2 * H) * (C * B)) / (3 * M)) * S`

Explanations of all the variables follow.

### X (Final Capture Rate)

X is a number representing the success rate of this particular capture, with the chance that the Pokémon will be successfully caught being approximately `X/255`. Note that the accuracy of this approximation varies wildly thanks to rounding errors and should not be taken at face value. (See "Throwing a Ball" below for details of how to find the actual chance.)

### M (Max HP)

The maximum HP of the Pokémon being captured. Interestingly, this is the only part in the formula where the Pokémon's actual strength enters into the equation - there is no level factor or anything like that.

You may have noticed that it appears twice in the formula - if you wrote it out as a fraction, it would in fact be both above and below the line, but it can easily be rearranged (though this yields a slightly inaccurate formula thanks to rounding errors):

`X = ((3 * M * (C * B) - 2 * H * (C * B)) / (3 * M)) * S`

`X = ((C * B) - ((2 * H * (C * B)) / (3 * M))) * S`

This means that a greater M will result in a lesser value for (2 * H * (C * B)) / (3 * M) and thus, counterintuitively enough, a greater value for X (since (2 * H * (C * B)) / (3 * M) is negative in the formula). Or, in other words, a greater max HP results in a more likely capture if all other values are static. Note that H, the current HP, also needs to be static for this to apply, which of course changes things when dealing with a full-health Pokémon or one at some given percentage of its max HP - but not with one False Swiped to 1 HP, for example, which will be easier to capture the higher its maximum HP is.

This is because essentially, the formula is implementing the fraction of HP the Pokémon has left, not the actual current or maximum HP in itself. If we make a variable, say F, equal to H/M, then the formula for X becomes `((C * B) - ((2 * F * (C * B)) / 3)) * S`. Thus, because 1 HP is a smaller portion of the max for a Pokémon with a very great max HP, that yields a lower value for F and, again, since that part of the formula is negative, a higher value for X. If F is constant, however, no matter what the actual current and maximum HP values are, they won't make a difference beyond the possibility of rounding errors.

As F approaches zero (that is, as the current HP is whittled down towards the unattainable goal of being 0% of the max), X approaches C * B * S.

### H (Current HP)

The current HP of the Pokémon being captured. As we know, when everything else stays static, a lower current HP means a higher capture rate. Interestingly, for a full-health Pokémon, H will equal M, and then we can simplify the formula for X and in fact remove both M and H from the equation altogether:

`X = (((3 * M - 2 * M) * (C * B)) / (3 * M)) * S`

`X = ((M * (C * B)) / (3 * M)) * S`

`X = ((C * B) / 3) * S`

This means that all full-health Pokémon with the same capture rate, regardless of level, power, HP stats, etc., are equally likely to be caught with a given ball and status. In fact, as we saw above, all Pokémon with the same capture rate and at the same fraction of their maximum HP are equally likely to be caught with a given ball and status. A level 2 Pidgey at some given percentage of its HP is equally likely to be caught, bar rounding errors, as a hypothetical level 100 Pidgey at the same percentage of HP, or for that matter a hypothetical level 100 Caterpie or Magikarp.

We can also see here that if the Pokémon is at full health, X is roughly (bar rounding errors) (C * B * S) / 3, or a third of the limit of the catch rate for the same Pokémon as its current HP is reduced. Or, in other words, damaging the Pokémon will at most make it three times easier to catch than if it were at full health.

### C (Capture Rate)

This number starts out being the intrinsic capture rate of the Pokémon whose capture is being attempted. This is a number that is set for every individual species of Pokémon, just like base stats, and represents just how elusive this Pokémon is: early-game common Pokémon such as Caterpie and Pidgey usually have a capture rate of 255, while most legendary Pokémon have a capture rate of 3, and others take various values in between. A higher catch rate yields a higher X and thus a greater chance of a successful capture. This is generally the most influential value in the formula, unfortunately for everyone trying to capture a legendary, since it's a direct multiplier with a great range (from 1 to 255). Capture rates for individual species can be found in various online Pokédexes, such as veekun.

In the third-generation games and D/P/Pt, this was it and you could skip right down to the ball bonus section. Unfortunately, HG/SS's Apricorn balls complicate things, because they actually modify the C number itself instead of just applying a ball bonus. Most notably, the Heavy Ball's effect could not be emulated with a ball bonus at all, since it actually works by adding to the capture rate instead of multiplying it. One might think at a glance that the other balls, which do just apply multipliers to the catch rate, would be functionally indistinguishable from balls that applied the same multiplier through the ball bonus, but interestingly, this is not so thanks to the aforementioned 1-255 range of the catch rate, which is enforced by the game after the Apricorn ball multipliers have been applied. This restriction does not apply to the ball bonus. Thus, for example, with a ball bonus of three or more, a ball can be guaranteed to capture a full-health Caterpie every time (`X = ((C * B) / 3) * S = 255 * 3 / 3 * 1 = 255`); with an Apricorn ball, however, C cannot end up any higher than 255, and thus, no matter what, a full-health Pokémon will never have more than a 1/3 chance of being caught with an Apricorn ball. Of course, you can rectify this problem by reducing its health and applying status effects, but with Apricorn balls, your chances never get any better than if you were trying to capture a Caterpie at the same status of health in a Poké Ball, so keep this in mind in HG/SS.

The modifiers the HG/SS balls apply to the capture rate (for those that do) are as follows, if we call the original capture rate of the Pokémon R:

Fast Ball
C = R * 4 if the Pokémon has a base Speed of 100 or more; C = R otherwise
Heavy Ball
C = R + 20 if the Pokémon weighs more than 204.8 kilograms (451.5 lbs); C = R + 30 if the Pokémon weighs more than 307.2 kilograms (677.3 lbs); C = R + 40 if the Pokémon weighs more than 409.6 kilograms (903.0 lbs); C = R - 20 otherwise (this is actually probably a bug, as the game subtracts 20 if none of the bonuses apply and the catch rate is less than 1024, which is always true, while they presumably intended to have it check the weight)
Level Ball
C = R * 2 if your Pokémon's level is greater than that of the Pokémon; C = R * 4 if your Pokémon's level divided by two and rounded down is greater than the Pokémon's level; C = R * 8 if your Pokémon's level divided by four and rounded down is greater than the Pokémon's level; C = R otherwise
Love Ball
C = R * 8 if the Pokémon is of the same species as your Pokémon but the opposite gender; C = R otherwise
Lure Ball
C = R * 3 when fishing; C = R otherwise
Moon Ball
C = R * 4 if the Pokémon belongs to a family that evolves by Moon Stone (those would be both Nidoran families, the Clefairy and Jigglypuff families, and the Skitty family); C = R otherwise

Remember, of course, that after applying all this, if the capture rate is greater than 255 you must knock it back down to 255, and if you're throwing a Heavy Ball and have ended up with a negative catch rate, you must bump it back up to 1. (Interestingly, the game only bumps it up to 1 if it is indeed less than zero, so you could theoretically have a catch rate of zero; however, as that could only happen with a 20-catch-rate Pokémon having a Heavy Ball thrown at it without a bonus, and as there are no Pokémon with a catch rate of 20, this will never actually happen.)

Note that the Heavy Ball, thanks to adding to the catch rate rather than multiplying it, works by somewhat different principles than other Pokéballs. It is not very practical to use a Heavy Ball on a Pokémon that already has a high catch rate, even if it is very heavy; a +20 Heavy Ball bonus for a Pokémon with an intrinsic catch rate of more than 40, for instance, would be outperformed even by a measly Great Ball. However, the proportional bonus is immense when it comes to Pokémon with low intrinsic catch rates, such as legendaries - with the usual legendary catch rate of 3, a +30 Heavy Ball bonus will effectively be a multiplier of 11, for instance, vastly outperforming any other ball in the game. Better yet, for low intrinsic catch rates the aforementioned limitation of the Apricorn balls will not be affecting you either.

What this amounts to, if we look at the weights and catch rates of the third- and fourth-generation Pokémon, is that Heavy Balls are highly effective for Giratina, Metagross, Heatran and Regigigas (normal catch rate 3, +40 Heavy Ball bonus; effective multiplier of 14.33), Arceus (normal catch rate 3, +30 Heavy Ball bonus; effective multiplier of 11), Groudon (normal catch rate 5, +40 Heavy Ball bonus; effective multiplier of 9), Kyogre (normal catch rate 5, +30 Heavy Ball bonus; effective multiplier of 7), Regirock, Lugia, Rayquaza and Registeel (normal catch rate 3, +20 Heavy Ball bonus; effective multiplier of 6.67). However, for all other Pokémon you can do better with something like a nighttime Dusk Ball; while Snorlax (normal catch rate 25, +40 Heavy Ball bonus; effective multiplier of 2.6), Dialga (normal catch rate 30, +40 Heavy Ball bonus; effective multiplier of 2.33) and Steelix (normal catch rate 25, +30 Heavy Ball bonus; effective multiplier of 2.2) are more easily caught in Heavy Balls than any nonconditional ball, Heavy Balls just plain aren't worth it for any other Pokémon and you might as well be using Ultra Balls.

### B (Ball Bonus)

This number is a multiplier that changes depending on the type of Pokéball you're using and whatever conditions the individual Pokéballs might define for the bonuses they give. As detailed above, the HG/SS Apricorn balls apply their modifiers directly to the C number, hence why they are all listed with a ball bonus of 1. Note that despite the note at the beginning of this section about the games always rounding down, the B value can be a decimal (but the C * B value in the formula is rounded down); this is because the game actually treats it as ten times higher than listed here and then has an additional division by ten in the formula for X. This division is incorporated directly into the B number here to simplify the formula and give a clearer idea of how much the balls affect your chances: Pokémon are just about (bar rounding errors) twice as likely to be caught in an Ultra Ball than a Pokéball and so on.

Poké Ball, Premier Ball, Luxury Ball, Heal Ball, Cherish Ball, Friend Ball, Fast Ball, Heavy Ball, Level Ball, Love Ball, Lure Ball, Moon Ball
B = 1
Great Ball, Safari Ball, Sport Ball
B = 1.5
Ultra Ball
B = 2
Master Ball, Park Ball
Capture is always successful, so there is no need to use a formula; you can treat it as if B equals infinity.
Net Ball
B = 3 if one of the Pokémon's types is Water or Bug; B = 1 otherwise
Nest Ball
B = (40 - Pokémon's level) / 10, minimum 1
Dive Ball
B = 3.5 when underwater in R/S/E or fishing/surfing in D/P/HG/SS; B = 1 otherwise
Repeat Ball
B = 3 if the Pokémon is already registered as caught in the Pokédex; B = 1 otherwise
Timer Ball
B = (number of turns passed in battle + 10) / 10, maximum 4
Quick Ball
B = 4 on the first turn of a battle; B = 1 otherwise
Dusk Ball
B = 3.5 at night and inside caves; B = 1 otherwise

(Yes, these catch rates are all correct. Some, in particular the Dusk Ball's 3.5 as opposed to the usually reported 4 and the Quick Ball's bonus only applying on the first turn, go against the common fandom knowledge, but a_magical_me actually disassembled the capture routines used by both Diamond and Pearl and HeartGold and SoulSilver and this is really how it works.)

### S (Status)

We all know that Pokémon are easier to catch when, say, asleep or paralyzed. This is entered into the formula here, with the status modifier. Basically, if the Pokémon is asleep or frozen, S = 2; if the Pokémon is poisoned, paralyzed or burned, S = 1.5; and otherwise, S = 1.

## Throwing a Ball

Now, after calculating X, the game doesn't just leave it at that. When you throw a Pokéball, X is plugged into a second formula:

`Y = 1048560 / √(√(16711680 / X))`

That's quite a mouthful, but actually some quite impressive simplification magic can be done on it by dividing by sixteen both above and below the line. (If you hate math, you can skip this bit.) Observe:

`Y = (1048560 / 16) / (√(√(16711680 / X)) / 16) = 65535 / (√(√(16711680 / X)) / 16)`

65535 is the maximum value of an unsigned 16-bit integer and is therefore a number that pops up a lot in computer systems - for instance, it's also the maximum value your trainer ID number can take. The fact we have 65535 appearing here is an immediate hint that we're getting somewhere with this. But what can we do with that humongous brain-hurting number inside the fourth root (what those two square roots actually amount to)? Well, if you've learned a bit about square roots, you'll know that `√(A)/√(B) = √(A/B)`. So if we take that 16 and instead write it as `√(√(65536))` (since 164 = 65536), we get...

`Y = 65535 / (√(√(16711680 / X)) / √(√(65536))) = 65535 / √(√((16711680 / X) / 65536))`

And lo and behold: if we evaluate that division, 16711680 / 65536 gets us another one of those numbers game mechanics enthusiasts should be quite familiar with:

`Y = 65535 / √(√(255 / X))`

Yup, it's good old 255, the maximum value of an unsigned 8-bit integer, which we also know as the maximum value of base stats, base damage and effort points in a single stat, to name just a couple of things. So all those huge scary numbers amounted to was two of the most common numbers in computer science. Fancy that.

Why isn't this just the formula implemented by the game, then? Simple: thanks to the fact the game only operates on integers as I mentioned above - that is, rather than it just specifically rounding things when it wants to, it never sees any fractional parts at all - that would result in only a few possible Y values. For instance, absurdly, any X of 16 or higher would yield a Y of 65535 (if X >= 16, 255/X returns something less than 16, the inner square root returns something less than four, and the outer square root returns something less than two which then has to be one).

Obviously this wouldn't do, so to be able to get a respectable range of values out of this, they simply multiply by sixteen both above and below the line and then absorb the one below the line into the fourth root - essentially the same formula, but not plagued by rounding erorrs quite as ridiculous as those of the other one. In practice it's just a matter of working around the limitations of integer division by having more exact numbers to deal with during the individual steps of the calculation. If this confuses you, just leave fourth roots out of it for the moment and imagine the problem of calculating something like 65535 / (255 / 200) when all you have is integer division. Just like this, 255/200 will round to 1 and the final result will be the highly inaccurate 65535. However, if you multiply both sides by sixteen first, you'll get 1048560 / (4080 / 200) = 1048560 / 20 = 52428, considerably closer to the true result of 51400.

That being said, as that example also demonstrated, sixteen isn't a very high number, and this doesn't eliminate the problem entirely; it only lessens it somewhat. In particular, due to the rounding errors created by the integer roots, all X values greater than 200 yield a Y value of 65535, even though only 255 "should" give that result, and the second-highest possible Y - for X values between 160 and 200 inclusive - is only 61680. The next one after that is 58523, when X is 129-159 - meaning the whole upper half of X values can only lead to three possible Y values. As you may be able to tell, however, the "steps" get steadily smaller for lower X values.

In any case, this Y number could be said to represent the strength of the Pokéball relative to the Pokémon. Once this has been calculated, the Pokémon makes up to four attempts to break out of the ball, each represented by a random integer between 0 and 65535 (inclusive). For each breakout attempt, the random number is compared to Y; if it is greater than or equal to Y, the Pokémon breaks out of the ball then and there, but otherwise, the ball holds, you will see the Pokéball wobble on your screen, and it tries again. If the Pokémon's fourth and final breakout attempt fails, the ball will lock shut and the Pokémon is successfully captured.

Thus, wobbles are actually the Pokémon trying and failing to break the ball. If it breaks out with no wobbles ("Oh no! The Pokémon broke free!"), it means it broke out on the first attempt, with the first random number; if it breaks out after one wobble ("Aww! It appeared to be caught!"), the first attempt failed but the second succeeded; if it breaks out after two ("Aargh! Almost had it!"), it only managed it on the third, and if it breaks out after three whole wobbles ("Shoot! It was so close, too!"), it was the fourth and final random number that got it out of the ball, meaning it really was as close as the game wants you to believe. (You never see a fourth wobble because if all four attempts fail, you see the ball sealing instead of a wobble.)

Now, since you need all four breakout attempts to fail in order to capture the Pokémon, the exact chance of success when you throw an individual ball (that is, the chance that all four random numbers are less than Y) is `(Y / 65536)4`. Ta-da! That's it. Of course, since you're hardly going to be bothered to do the math yourself on paper, luckily I have a catch rate calculator handy.

The observant might notice that because the Pokémon breaks out if the random number is greater than or equal to Y, this actually means that even when Y is the maximum of 65535, there is a tiny chance that the Pokémon won't be caught. However, to save us from the nightmare of a tiny chance of having our Master Balls fail, the game actually saves itself the bother of going through the Y formula at all if X is 255 or more and just has the Pokémon be automatically caught. On the other hand, all other X values above 200 (which, as explained above, also yield a Y of 65535) are not safe from this tiny chance of failure, so if the calculator gives you a 99.994% chance of capturing something, don't be surprised.

## Catch Rate Calculator

To approximate your chances of catching any Pokémon, enter the appropriate information into this form. The number of balls needed is rounded up from the strict average, but you should of course always bring considerably more balls than that for safety. Also note that these ball numbers naturally become inaccurate if the capture rate for the ball changes during the course of the battle, such as if you're using Timer Balls prior to when the multiplier maxes out at 4, you're using balls that compare the Pokémon to yours and your Pokémon get switched, or you switch to using a different type of ball.

The calculator will do the calculation for each of the thirty-two possible HP IVs. If you check the "Show detailed report?" box, it will show the exact chance for each given IV; otherwise, it will show the overall chance assuming each HP IV is equally likely (which is normally the case). Note, however, that if the Pokémon isn't at full health or False Swiped, the inaccuracy of the estimate of the Pokémon's current HP is generally going to introduce a bigger margin of error than IV-induced variation in the max HP will, making the detailed report not very meaningful.

Approximation of current HP: