lrn2math
Generation I
The capture method in Generation I differs significantly from those of later generations. To determine whether a Pokémon is caught or not, the following is performed:
- If a Master Ball is used, the Pokémon is caught.
- If a Poké Ball is used, generate a random number from 0 to 255. If a Great Ball is used, generate a random number from 0 to 200. Otherwise, generate a random number from 0 to 150.
- If the generated value is less than 25 and the Pokémon is asleep or frozen, the Pokémon is caught. If the generated value is less than 12 and the Pokémon is paralyzed, burned, or poisoned, the Pokémon is caught. If it is caught, skip all other steps.
- If the previous value (the generated value less than the status amount) is greater than the catch rate of the Pokémon, the Pokémon breaks free. Otherwise, generate a random value between 0 and 255. If f is greater or equal to this value, the Pokémon is caught. Otherwise, the Pokémon breaks free. If the Pokémon breaks free, do the following:
- Compute d. If d ≥ 256, the Ball shakes three times before it breaks free.
- Otherwise, compute d × f / 255. Add 10 if the Pokémon is asleep or frozen, and add 5 if it is paralyzed, poisoned, or burned. If this value is less than 10, the Ball misses the Pokémon completely. If it is less than 30, the Ball shakes once before it breaks free. If it is less than 70, the Ball shakes twice before it breaks free. Otherwise, the Ball shakes three times before it breaks free.
The variables above are computed as follows:
- d = Catch rate × 100 / Ball Factor, where the Ball Factor is 255 for the Poké Ball, 200 for the Great Ball, and 150 for all other balls.
- f = (HPmax * 255 / Ball Factor) / (HPcurrent / 4), where all divisions are rounded down to the nearest integer (the denominator is set to 1 if it is 0 as a result). The Ball Factor is 8 if a Great Ball is used, and 12 otherwise. The resulting value may not be larger than 255, in which case 255 is used instead.
Generation II
The modified catch rate
a is calculated in Generation II as follows:
a = (3 × HPmax - 2 × HPcurrent) × (rate × bonusball) / (3 × HPmax) + bonusstatus
with the final value rounded down to the nearest integer, where
- HPmax is the number of hit points the Pokémon has at full health,
- HPcurrent is the number of hit points the Pokémon has at the moment,
- rate is the catch rate of the Pokémon (which may have been previously modified from the use of the Heavy Ball modifiers),
- bonusball is the multiplier for the Poké Ball used, and
- bonusstatus is the multiplier for any status ailment the Pokémon has (10 for sleep and freeze, and 0 otherwise).
- bonusstatus was intended to equal 5 for paralyze, poison and burn, but due to a glitch, the game accidentally skips this check.
Note that in Generation II, if 3 × HPmax > 255, then both 3 × HPmax and 2 × HPcurrent are quartered (rounded down) for use in the formula; if the latter is 0, it is made to 1 instead in this case. Note that the subtraction itself may underflow, due to both values being unsigned 8-bit integers in Generation II.
Generation III-IV
The modified catch rate,
a, is calculated in Generation III and Generation IV as follows:

Where
- HPmax is the number of hit points the Pokémon has at full health,
- HPcurrent is the number of hit points the Pokémon has at the moment,
- rate is the catch rate of the Pokémon (which may have been previously modified from the use of the Heavy Ball or Safari Zone modifiers),
- bonusball is the multiplier for the Poké Ball used, and
- bonusstatus is the multiplier for any status ailment the Pokémon has (2 for sleep and freeze, 1.5 for paralyze, poison and burn, and 1 otherwise).
Given this formula, the maximum value for
a (if the Pokémon could have 0 HP) would be catch rate × bonusball × bonusstatus. The minimum value for
a (for a Pokémon with full health) would be ⅓ × catch rate.
Generation V
Generation V follows the formula in Generation III-IV, with all divisions above rounded down to the nearest multiple of 1/4096. Furthermore, two additional factors are multiplied into the above formula:
- Capture Power factor: Multiply by 1.1 if Capture Power ↑ is active, 1.2 if Capture Power ↑↑ is active, and 1.3 if Capture Power ↑↑↑, Capture Power S, or Capture Power MAX is active, and round down to the nearest multiple of 1/4096.
- Dark grass factor: This factor, multiplied into the HP factor (3 × HPmax - 2 × HPcurrent above) and then rounded to the nearest multiple of 1/4096, depends on whether or not the battle occurs in dark grass (where Double Battles may occur), and the number of Pokémon that have been caught in the Pokédex: if the battle is not in
dark grass, this is 1. If it is, consult the table below.
Code:
Multiplier Number Caught
1 >600
3686/4096 (90%) 451-600
3277/4096 (80%) 301-450
2867/4096 (70%) 151-300
2048/4096 (50%) 30-151
1229/4096 (30%) <30
If the modified catch rate is greater than 255, the Pokémon is automatically caught. A critical capture check is done regardless of whether the Pokémon is otherwise automatically caught.
Shake probability
The shake probability,
b, is the probability that a single shake check passes.
Generation II
Consult the following table to determine
b:
Generation III-IV
The shake probability is calculated as follows in Generation III and Generation IV:
Generation V
In Generation V, the formula is
b = 65536 / (255/
a)(¼)
where all divisions and the fourth-roots are rounded to the nearest 1/4096, and the final value is rounded down to the nearest whole number.
Shake checks
A "shake check" is done to determine whether the Pokémon is caught, and, if the Pokémon breaks free, the number of shakes that occurs before it does so.
Generation II
In Generation II, a check occurs to determine whether the Pokémon is caught outright, and shake checks are only used if this check fails to determine the number of shakes before the Pokémon breaks free. To determine if the Pokémon is caught outright, generate a random number between 0 and 255. If this value is less than or equal to
a, the Pokémon is caught. To perform a shake check, generate a random number between 0 and 255, and compare it against
b. Do this three times or until the check fails, whichever comes first, to determine the number of shakes before the Pokémon breaks free.
Generation III-IV
Unlike Generation II, the shake checks themselves determine whether or not the Pokémon is caught, and, if it is not, the number of shakes a Poké Ball will make before the Pokémon breaks free. Four checks are performed, and all checks must pass in order for the Pokémon to be caught, and if the Pokémon breaks free, the number of times the Poké Ball shakes is equal to the number of passed checks. To perform a shake check, generate random numbers between 0 and 65535, inclusive, and compare it against
b; the checks fail if the generated value is greater.
Note that as a result of the formula, if
a is 255 or greater, then
b is 65535 or greater, and then the Pokémon is thus guaranteed to be caught; the game does not perform shake checks in the event of a guaranteed capture before this occurs.
Generation V
Generation V's shake checks work identically to those of Generation III and IV, except that after the critical capture check only three checks are performed in a normal capture and one in a critical capture. In a normal capture, the Pokémon breaks free without shaking if the first check fails, while the Pokémon breaks free after one shake if the second check fails. The Pokémon breaks free after
three shakes (not two) if the third check fails. In a critical capture, the Ball will always shake once, and the Pokémon will break free or be caught depending on the check.
Probability of capture
Therefore, the probability
p of catching a Pokémon in Generation IV, given the values
a and
b calculated above, is:

The second expression for
p may be expanded as follows:

Since (216 - 1)4 ≈ 264, we can approximate
p with the following expression:

The percentage error in this approximation approaches 0 as
a approaches 255, and does not exceed 21.2%.
For a constant probability
p, the probability
P that a player can capture the Pokémon with no more than
r tries is:

Note that this is the cumulative probability function for a geometric distribution. The expected value of
r is 1/
p, that is to say, on average, a Pokémon that can be caught with probability
p will be caught with 1/
p tries.
The inverse problem, the number of tries,
r, needed to have a probability
P of capturing a Pokémon is:
