Power = (U + V + W + X + Y + Z) * (40 / 63) + 30

If the IV of HP divided by 4 has remainder 2 or 3, then U = 1.

If the IV of Attack divided by 4 has remainder 2 or 3, then V = 2.

If the IV of Defense divided by 4 has remainder 2 or 3, then W = 4.

If the IV of Speed divided by 4 has remainder 2 or 3, then X = 8.

If the IV of Special Attack divided by 4 has remainder 2 or 3, then Y = 16.

If the IV of Special Defense divided by 4 has remainder 2 or 3, then Z = 32.

If the IV of any divided by 4 has remainder 0 or 1, then their variable = 0

In other words, if the IV is 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, or 31, you use the number given, otherwise, use 0.

The final number is rounded down, and that is the power of your Hidden Power.

Souce

IV calculator