Hidden Power is a damage-dealing Normal-type move introduced in Generation II. Although it appears as a Normal-type move, Hidden Power's actual type and base power vary.

Effect

Hidden Power inflicts damage using a type and base power determined by the user's IVs.

Hidden Power can receive same-type attack bonus. For instance, a Bug-type Pokémon will receive same-type attack bonus when using a Bug-type Hidden Power. Although Hidden Power is Normal-type in the game's data, a Normal-type Hidden Power is not obtainable. Because of this, a pure Normal-type Pokémon will never receive same-type attack bonus when using Hidden Power.

In Mystery Dungeon, the type and base power of Hidden Power is randomly calculated whenever a Pokémon enters the dungeon. It does not change between floors.

"Testing" Hidden Power

You are able to test what the type of their Hidden Power is most often by utilizing a Kecleon. It does not have to be their own, though this makes it more convenient. Entering any double battle with the Pokémon with Hidden Power and Kecleon at the front of the list, then using Hidden Power on the Kecleon will cause it to change types to the type that Hidden Power is, or, if the Hidden Power is a Ghost-type move, cause nothing to happen due to Kecleon's immunity.

However, in Platinum, there is a man in the Veilstone Game Corner Prize Exchange house that will tell the player the type of their Pokémon's Hidden Power. In HeartGold and SoulSilver, he is present in the Celadon Game Corner Prize Exchange house.

Type

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

HP TYPE: (a+2b+4c++8d+16e+32f) x15 all over (divided by) 63

where a,b,c,d,e,f are calculated in this way:

* a=1 if the Individual Value of HP is odd. If not, a=0

* b=1 if the Individual Value of Attack is odd. If not, b=0

* c=1 if the Individual Value of Defense is odd. If not, c=0

* d=1 if the Individual Value of Speed is odd. If not, d=0

* e=1 if the Individual Value of Special Attack is odd. If not, e=0

* f=1 if the Individual Value of Special Defense is odd. If not, f=0

Which simply means that every element of the sum in the brace is the remainder of division of corresponding IV and 2, multiplied by appropriate power of 2 (20 in case of a and 25 in case of f). The sum may range from 0 (when all IVs are even) to 63 (when all IVs are odd), inclusively. It is worth mentioning that the computed sum may be easily calculated by putting its variables a,b,c,d,e,f together in reverse order and interpreting this as a number in the binary system, which then needs to be reverted to decimal system:

fedcba(2) = 32f+16e+8d+4c+2b+a (10)

The summed value is then multiplied by 15 and divided by 63, to be sure that the number representing Hidden Power Type will range form 0 to 15, inclusively (16 values in total). The calculated number is then rounded down (floor[]), which simply means that only integral part of the calculated number is considered.

The resulting number will correspond to a type; utilize the table below.

Number Type

0 Fighting

1 Flying

2 Poison

3 Ground

4 Rock

5 Bug

6 Ghost

7 Steel

8 Fire

9 Water

10 Grass

11 Electric

12 Psychic

13 Ice

14 Dragon

15 Dark

Damage

Damage of the Hidden Power is calculated in a very same manner like its type, using the following formula:

HP POWER: (u+2v+4w+8x+16y+32z) x40 all over (divided by) 63 +30

* u=1 if the Individual Value of HP divided by 4 has a remainder of 2 or 3. If not, u=0.

* v=1 if the Individual Value of Attack divided by 4 has a remainder of 2 or 3. If not, v=0.

* w=1 if the Individual Value of Defense divided by 4 has a remainder of 2 or 3. If not, w=0.

* x=1 if the Individual Value of Speed divided by 4 has a remainder of 2 or 3. If not, x=0.

* y=1 if the Individual Value of Special Attack divided by 4 has a remainder of 2 or 3. If not, y=0.

* z=1 if the Individual Value of Special Defense divided by 4 has a remainder of 2 or 3. If not, z=0.

I realize it is a very hard thing to understand but the only way to do this is to well just do this lol. Thanks to Bulbapedia for this