Hidden Power (move)/Calculation

Main article: Hidden Power (move)
In the Pokémon games, Hidden Power is a Normal-type move when the type is displayed, such as in battle and on status screens. However, the actual type of Hidden Power is determined by the Pokémon's individual values, and through calculation, can be set as one of other natural types. In Generations II to V, Hidden Power's base power is also determined by the Pokémon's individual values; in Generation II it ranges from 31 to 70, while in Generation III to V it ranges from 30 to 70. From Generation VI onward, Hidden Power's base power is always 60.

The type of Hidden Power can be checked in certain locations in the games by talking to certain NPCs. These NPCs will refuse to tell the player the Hidden Power type of a Pokémon unless it can learn the move via level up or TM (even if it knows Hidden Power at the time).

* In Pokémon Platinum, in Veilstone Game Corner's prize house
* In Pokémon HeartGold and SoulSilver, in the Celadon Game Corner
* In Pokémon Black and White, in Mistralton City's Pokémon Center
* In Pokémon Black 2 and White 2, the PWT
* In Pokémon X and Y, in the house to the right of the Boutique in Anistar City
* In Pokémon Omega Ruby and Alpha Sapphire, in the second northern house from the west in Fortree City
* In Pokémon Sun, Moon, Ultra Sun and Ultra Moon in the Pokémon Nursery on Paniola Ranch

There is no in-game way to determine Hidden Power's power directly in games where it is not fixed.

## Generation II

### Type

Consider an example Pokémon, like Pikachu with this set of IVs:

Template:Hidden Power calculation/II

The type is determined by taking the two least significant bits of the Attack and Defense IVs, then concatenating these two values in that order.

Mathematically, this is the equivalent of

H

P

t
y
p
e

=
4
×
a
mod
4
b
mod
4

{\displaystyle HP\_{type} = 4 \times a \bmod 4 + b \bmod 4}

, where *a* represents the Attack IV and *b* represents the Defense IV.

The resulting number will correspond to a type as marked below.

In our example, we get:

H

P

t
y
p
e

=
4
×
15
mod
4
15
mod
4

=
4
×
3
3

=
12
3

=
15

{\displaystyle
\begin{align}
HP\_{type} & = 4 \times 15 \bmod 4 + 15 \bmod 4 \\
& = 4 \times 3 + 3 \\
& = 12 + 3 \\
& = 15
\end{align}
}

Since this value is equal to 15, per the table above, this means that our Pikachu has a Dark-type Hidden Power.

### Power

The power of the Hidden Power is calculated using the following formula:

H

P

p
o
w
e
r

=

⌊

5
×
(
v
2
w
4
x
8
y
)
Z

2

31

⌋

{\displaystyle HP\_{power} = \bigg\lfloor \frac{5 \times (v + 2w + 4x + 8y) + Z}{2} + 31\bigg\rfloor}

* The variables *v* through *y* (the "damage bits") represent the most significant bit of each IV. If a variable is less than eight, this bit is 0; otherwise, it is 1.

* *v* depends on the Special IV.
* *w* depends on the Speed IV.
* *x* depends on the Defense IV.
* *y* depends on the Attack IV.

* *Z* is equal to the Special IV mod 4 (its remainder when divided by 4).

Hidden Power's base power is therefore a number ranging from 31 to 70, inclusively.

In our example, we get:

Template:Hidden Power calculation/II

H

P

p
o
w
e
r

=

⌊

5
×
(
1
2
⋅
1
4
⋅
1
8
⋅
1
)
2

2

⌋

31

=

⌊

5
×
(
1
2
4
8
)
2

2

⌋

31

=

⌊

5
×
15
2

2

⌋

31

=

⌊

75
2

2

⌋

31

=

⌊

77
2

⌋

31

=
⌊
38.5
⌋
31

=
38
31

=
69

{\displaystyle
\begin{align}
HP\_{power} & = \bigg\lfloor \frac{5 \times (1 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1) + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{5 \times (1 + 2 + 4 + 8) + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{5 \times 15 + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{75 + 2}{2}\bigg\rfloor + 31 \\
& = \bigg\lfloor \frac{77}{2}\bigg\rfloor + 31 \\
& = \lfloor 38.5 \rfloor + 31 \\
& = 38 + 31 \\
& = 69
\end{align}
}

Which means that our Pikachu's Hidden Power's power is **69**.

Template:Hidden Power calculation/II

### Remarks

* Because Shininess is also determined by IVs, Shiny Pokémon can only have a Grass-type or Dragon-type Hidden Power with a power of 49 or 69.
* Because gender is also determined by the Attack IV, female Pokémon of species with a seven male to one female ratio can only have a physical Hidden Power.

## Generation III onward

### Type

Consider an example Pokémon, like Pikachu with this set of IVs:

Hidden Power's type of a Pokémon with given IVs is represented by a number, calculated with this formula:

H

P

t
y
p
e

=

⌊

(
a
2
b
4
c
8
d
16
e
32
f
)
×
5

21

⌋

{\displaystyle HP\_{type} = \bigg\lfloor \frac{(a + 2b + 4c + 8d + 16e + 32f) \times 5}{21}\bigg\rfloor}

where *a*, *b*, *c*, *d*, *e*, *f* (the "type bits") are the least significant bit of their respective IVs. If a number is odd, its least significant bit is 1; otherwise (if the number is even), it is 0.

* *a* depends on the HP IV.
* *b* and *c* depend on the Attack and Defense IVs respectively.
* *d* depends on the Speed IV.
* *e* and *f* depend on the Special Attack and Special Defense IVs respectively.

The sum inside the formula may range from 0 (when all IVs are even) to 63 (when all IVs are odd), inclusive. This sum is equivalent to constructing the binary number (*fedcba*)2.

The sum is then multiplied by 15 and divided by 63. This ensures that the number representing the type ranges from 0 to 15, inclusive. The floor of this value is taken, meaning that if the result is not an integer, it will be rounded down to the nearest integer less than it.

The resulting number will correspond to a type as marked below.

In our example, we get:

H

P

t
y
p
e

=

⌊

(
1
⋅
0
2
⋅
1
4
⋅
1
8
⋅
1
16
⋅
0
32
⋅
1
)
×
15

63

⌋

=

⌊

(
0
2
4
8
0
32
)
×
15

63

⌋

=

⌊

46
×
15

63

⌋

=

⌊

690
63

⌋

(

690
63

≈
10.952

)

=
10

{\displaystyle
\begin{align}
HP\_{type} & = \bigg\lfloor \frac{(1 \cdot 0 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1 + 16 \cdot 0 + 32 \cdot 1) \times 15}{63}\bigg\rfloor \\
& = \bigg\lfloor \frac{(0 + 2 + 4 + 8 + 0 + 32) \times 15}{63}\bigg\rfloor \\
& = \bigg\lfloor \frac{46 \times 15}{63}\bigg\rfloor \\
& = \bigg\lfloor \frac{690}{63}\bigg\rfloor & \bigg(\frac{690}{63} \approx 10.952\bigg)\\
& = 10
\end{align}
}

Which means that our Pikachu has a Grass-type Hidden Power.

### Damage

Damage of the Hidden Power is calculated in a manner very similar to that of its type, using the following formula:

H

P

p
o
w
e
r

=

⌊

(
u
2
v
4
w
8
x
16
y
32
z
)
×
40

63

⌋

30

{\displaystyle HP\_{power} = \bigg\lfloor \frac{(u + 2v + 4w + 8x + 16y + 32z) \times 40}{63}\bigg\rfloor + 30}

* The variables *u* through *z* (the "damage bits") represent the second least significant bit of each IV. If a variable has a remainder of 2 or 3 when divided by 4, this bit is 1; otherwise, the bit is 0.

* *u* depends on the HP stat.
* *v* and *w* depend on the Attack and Defense stats respectively.
* *x* depends on the Speed stat.
* *y* and *z* depend on the Special Attack and Special Defense stats respectively.

Like before, the sum may range from 0 to 63, inclusively. The calculated number is then multiplied by 40 and divided by 63 to make sure that the fraction will not exceed 40. Then, the number is increased by 30 and rounded down, making Hidden Power's power a number ranging from 30 to 70, inclusively.

In our example, we get:

H

P

p
o
w
e
r

=

⌊

(
1
⋅
1
2
⋅
1
4
⋅
1
8
⋅
1
16
⋅
1
32
⋅
1
)
×
40

63

⌋

30

=

⌊

(
1
2
4
8
16
32
)
×
40

63

⌋

30

=

⌊

63
×
40

63

⌋

30

=

⌊

2520
63

⌋

30

=
⌊
40
⌋
30

=
40
30

=
70

{\displaystyle
\begin{align}
HP\_{power} &= \bigg\lfloor \frac{(1 \cdot 1 + 2 \cdot 1 + 4 \cdot 1 + 8 \cdot 1 + 16 \cdot 1 + 32 \cdot 1) \times 40}{63}\bigg\rfloor + 30 \\
&= \bigg\lfloor \frac{(1 + 2 + 4 + 8 + 16 + 32) \times 40}{63}\bigg\rfloor + 30 \\
&= \bigg\lfloor \frac{63 \times 40}{63}\bigg\rfloor + 30 \\
&= \bigg\lfloor \frac{2520}{63}\bigg\rfloor + 30 \\
&= \lfloor 40 \rfloor + 30 \\
&= 40 + 30 \\
&= 70 \\
\end{align}
}

Which means that our Pikachu's Hidden Power's power is **70**

### Number of possible Hidden Powers

As there are 6 IVs, ranging from 0 to 31 (32 in total), the number of different possible Hidden Powers should be 326=230, which is more than one billion possibilities. But let us consider two Pokémon with one different IV:

and

As we see, both 26 and 30 are divisible by 2 and give the remainder of 2 when divided by 4. So, in both cases the algorithms will interpret the IVs of those Pokémon in the same way, returning Grass-type Hidden Power with 70 power. It means that for the mentioned algorithms an IV of 30 is treated in the same way like IVs of 2,6,10,14,18,22 and 26 (8 in total).

In fact, there are only four essentially different types of IV when calculating Hidden Power:

In other words: only four IVs that give different remainders when divided by four would cover all possible Hidden Power types and powers.

If so, the number of possible Hidden Powers should be 46 = 4096. This number, however is again far too large, as the real number of possible variations of Hidden power is simply 16\*41=656, as Hidden Power exists in 16 types and has 41 different powers. The significant difference between 656 and 4096 is explained by the fact that the floor function results in distinct values (e.g. 10.952 and 10.476) being mapped to the same integer result (in this case 10).

### Percentage distribution of different variations of Hidden Power

Due to the fact that both Hidden Power's type and its power are the products of rounding down, chances of getting a Pokémon with certain Hidden Power are not equal, as one might have thought, and are different for every Hidden Power's type and damage value.

As it was stated before, the number of theoretically different Hidden Powers is 4096, which is the result of multiplying theoretical values of possible types (64) and powers (also 64). It means that every of 64 "types" comes into 64 "powers". After rounding down, however, the number of 64 "types" is reduced to 16 and the number of 64 "powers" to 41.

## Generation AN-I

Consider an example Pokémon, like Pikachu with this set of IVs:

Hidden Power's type of a Pokémon with given IVs is represented by a number, calculated with this formula:

H

P

t
y
p
e

=

⌊

(
4
a
2
b
c
32
d
16
e
8
f
)
×
5

21

⌋

{\displaystyle HP\_{type} = \bigg\lfloor \frac{(4a + 2b + c + 32d + 16e + 8f) \times 5}{21}\bigg\rfloor}

where *a*, *b*, *c*, *d*, *e*, *f* (the "type bits") are the least significant bit of their respective IVs. If a number is odd, its least significant bit is 1; otherwise (if the number is even), it is 0. This is equivalent to taking the following values modulo 2:

* *a* depends on the HP IV.
* *b* and *c* depend on the Attack and Defense IVs respectively.
* *d* depends on the Speed IV.
* *e* and *f* depend on the Special Attack and Special Defense IVs respectively.

The sum inside the formula may range from 0 (when all IVs are even) to 63 (when all IVs are odd), inclusive. This sum is equivalent to constructing the binary number (*defabc*)2. While this formula is very similar to the formula used in canon games after Generation III, it differs in the order by which the stats' lowest bits are ordered, likely done to ensure the change in what types Hidden Power can be is apparent.

The sum is then multiplied by 18 and divided by 63. This ensures that the number representing the type ranges from 0 to 18, inclusive. The floor of this value is taken, meaning that if the result is not an integer, it will be rounded down to the nearest integer less than it.

The resulting number will correspond to a type as marked below.

In our example, we get:

H

P

t
y
p
e

=

⌊

(
4
⋅
0
2
⋅
1
1
⋅
1
32
⋅
1
16
⋅
0
8
⋅
1
)
×
18

63

⌋

=

⌊

(
0
2
1
32
0
8
)
×
18

63

⌋

=

⌊

43
×
18

63

⌋

=

⌊

774
63

⌋

(

774
63

≈
12.286

)

=
12

{\displaystyle
\begin{align}
HP\_{type} & = \bigg\lfloor \frac{(4 \cdot 0 + 2 \cdot 1 + 1 \cdot 1 + 32 \cdot 1 + 16 \cdot 0 + 8 \cdot 1) \times 18}{63}\bigg\rfloor \\
& = \bigg\lfloor \frac{(0 + 2 + 1 + 32 + 0 + 8) \times 18}{63}\bigg\rfloor \\
& = \bigg\lfloor \frac{43 \times 18}{63}\bigg\rfloor \\
& = \bigg\lfloor \frac{774}{63}\bigg\rfloor & \bigg(\frac{774}{63} \approx 12.286\bigg)\\
& = 12
\end{align}
}

Which means that our Pikachu has a Psychic-type Hidden Power.

## External links

Many Pokémon related sites prepared web-based calculators, which allows to compute Hidden Power of a Pokémon with given IVs:

* Psypoke's Hidden Power calculator (Generation II)
* Psypoke's Hidden Power calculator (Generation III and on)
* Legendary Pokémon Hidden Power calculator (Generation III and on)