About this tool
The Index of Coincidence (IoC) Calculator computes a classic cryptanalysis statistic: the probability that two letters drawn at random from the text are the same. It filters the input to letters only, upper-cases it, counts each of the 26 letters n_i over a total of N letters, and evaluates IC = Σ n_i·(n_i − 1) / (N·(N − 1)). It also reports the normalized IC = IC × 26, scaled so that uniform random text sits near 1.0 and English plaintext near 1.73.
These reference values are what make the IoC useful. English plaintext has an IC around 0.0667 (normalized ≈ 1.73) because its letter distribution is far from flat, while uniform-random or well-mixed polyalphabetic ciphertext falls to about 0.0385 (normalized ≈ 1.00). A monoalphabetic substitution preserves the plaintext IC, so a high IC signals a simple cipher; a low IC signals a polyalphabetic one such as Vigenère.
For Vigenère key-length recovery, enter a maximum key length to run a column scan. The tool splits the text into k columns for each candidate k, computes the average IC across those columns, and flags the k whose average is closest to the English value — the likely key length, because splitting by the true period reassembles monoalphabetic columns. Everything is deterministic and computed offline in your browser; nothing is uploaded.