Pokemon Red, Blue, and Yellow - Critical Hit Formula
CH Number = max(255,int(int(S/2)*N))
S = Pokémon's Base Speed
N = CH Modifier: N starts at 1. If the attacker has used Focus
Energy, divide N by 4.*
If the attacker is using Karate Chop, Slash, Razor Leaf, or
Crabhammer, multiply N by 8.
If a random number, from 0 to 255, is lower than the CH Number, the attack is a Critical Hit.
Pokémon Gold and Silver uses a different Critical Hit formula.
* It is known that Focus Energy reduces the chances of a Critical Hit. This has been fixed in Stadium (in which N should be multiplied, instead of divided, by 4).
When an attack does a critical hit, multiply the level by 2 and use the attacker's and defender's original, unmodified stats for the damage formula.