Letter Frequency Analysis Explained: From ETAOIN to Code-Breaking

What letter frequency is, why E and T dominate English, how frequency analysis cracks simple ciphers, and how to count and chart letters in any text.

Updated September 29, 2026 6 min read

Use the free Letter Frequency CounterCount how often each letter appears, with percentages and a bar chart

Letters are not used equally. In a typical page of English, you will see the letter E far more often than Z, and T far more often than Q. That uneven pattern is surprisingly useful. It helped early typesetters decide how many of each metal letter to cast, it is the basis of classic code-breaking, it guides strategy in word games, and it is a simple first step in analysing any unfamiliar text.

This guide explains what letter frequency is, what typical English frequencies look like, how frequency analysis breaks simple substitution ciphers, and how to count letters in your own text and compare the result with the English average.

What letter frequency means

Letter frequency is simply how often each letter appears in a text, usually expressed as a percentage of all letters. If a 1,000-letter passage contains 127 Es, the frequency of E is 12.7%.

Over large amounts of ordinary English, the percentages settle into a stable pattern. Commonly cited figures look like this:

Letter Approx. % Letter Approx. %
E 12.7 S 6.3
T 9.1 H 6.1
A 8.2 R 6.0
O 7.5 D 4.3
I 7.0 L 4.0
N 6.7 … …
J, X, Q, Z each well under 0.2

Different studies give slightly different numbers depending on the source texts (novels, newspapers, technical writing), but the ordering of the most common letters is consistent. The old typesetting phrase "ETAOIN SHRDLU" comes from the order of keys on Linotype machines, which were arranged roughly by letter frequency.

A short text rarely matches the average closely. A 50-word paragraph about "zoos and jazz" will have far more Zs than usual. Frequencies become reliable only with a few hundred letters or more.

How frequency analysis breaks simple ciphers

In a substitution cipher, each letter is consistently replaced by another. The Caesar cipher is the simplest version: every letter shifts the same number of places, so with a shift of 3, A becomes D and E becomes H.

The weakness is that substitution changes the letters but not their frequencies. If the most common letter in a ciphertext is H, it probably stands for E. The method goes like this:

  1. Count the letters in the ciphertext.
  2. Match the most common ones to the most common English letters: the top letter is likely E, the next ones likely T, A or O.
  3. For a Caesar cipher, one good match is enough: if H stands for E, the shift is 3, and every other letter follows.
  4. For a general substitution cipher, use more clues: frequent short words ("the", "and"), double letters (ee, ll, ss, oo) and common endings (-ing, -ed).
  5. Refine by trial and error until real words appear.

This approach was described by the Arab scholar al-Kindi more than a thousand years ago, and it is why simple substitution ciphers are considered insecure. Modern encryption is designed so that the output looks statistically random and reveals nothing through frequencies. You can experiment with shifting letters in the Caesar Cipher tool and see how the frequency pattern moves along the alphabet.

Count letter frequency step by step

The Letter Frequency Counter counts each character, charts the result and compares it with typical English.

  1. Open the Letter Frequency Counter and paste your text, a ciphertext or a word list into Text to analyse. Click Sample to load a famous opening line from Dickens.
  2. Under Count, choose Letters only, Letters and digits, or All characters (incl. spaces, punctuation).
  3. Under Sort by, choose Most frequent first or Alphabetical.
  4. Set the switches:
    • Case sensitive counts A and a separately.
    • Show A–Z with zero count lists letters that never appear, which is useful for pangrams and ciphers.
    • Compare with English adds an English % column and a marker on each bar showing where the letter would be in typical English. This works with letters only and case-insensitive counting.
  5. Read the tiles: Characters counted, Distinct characters and Most common.
  6. Study the Frequency table, with count, percentage and a bar chart for each character, and click Download CSV to analyse it further in a spreadsheet.

Letters from any alphabet are counted, including accented letters, Greek and Cyrillic, so the tool also works for other languages. The English comparison only applies to the 26 letters A to Z.

Other uses of letter frequency

  • Word games. Frequent letters make good early guesses in word-guessing games and are worth less in tile games, where rare letters score more points.
  • Language detection. Different languages have distinctive profiles. Spanish and French use more accented letters, German has more Z and Ü, and Polish text shows letters such as Ł and Ż. A quick frequency count can hint at the language of an unknown text.
  • Checking pangrams. A pangram uses every letter at least once. With Show A–Z with zero count on, any missing letter appears with a count of 0.
  • Keyboard and font design. Knowing which letters are most common informs keyboard layouts and helps type designers test the most frequent letter pairs.
  • Data quality. In codes, IDs or generated strings, an unexpectedly uneven distribution can reveal a bug or a pattern that should not be there.

For words rather than letters, use the Word Frequency Counter, and for a simple total of characters, the Character Counter.

Other ways to count letters

In a spreadsheet

Excel and Google Sheets can count one letter at a time with a formula that compares the text length before and after removing that letter:

=LEN(A1) - LEN(SUBSTITUTE(LOWER(A1), "e", ""))

Repeat it for each letter in a column of A to Z, then divide by the total to get percentages. It works, but setting it up takes time, and very long texts may exceed a cell's limit.

In code

A few lines of Python do the job:

from collections import Counter
counts = Counter(c for c in text.lower() if c.isalpha())

This is the right approach for large corpora or repeated analysis. For quick checks and charts, a browser tool is faster.

Tips and pitfalls

Short texts give noisy results

With fewer than a few hundred letters, random variation dominates. Do not read too much into small differences.

Topic skews frequencies

Technical text on "XML syntax" or a list of names will have an unusual distribution. Compare like with like.

Case and scope change percentages

Counting "all characters" includes spaces, which are usually the most common character of all, and lowers every letter's percentage. Use Letters only when comparing with published English frequencies.

Frequently asked questions

What is the most common letter in English?

E, at roughly 12 to 13% of letters in typical English text, followed by T, A, O and I.

What does ETAOIN SHRDLU mean?

It is the approximate order of the twelve most common letters in English, taken from the key layout of Linotype typesetting machines. It became a well-known phrase because it sometimes appeared by mistake in printed newspapers.

Can frequency analysis break any cipher?

No. It works well on simple substitution ciphers like the Caesar cipher. Modern encryption is designed so that its output shows no useful frequency pattern.

Why don't my results match the English table?

Your text may be short, focused on a particular topic, or in another language. The published figures are averages over very large amounts of text.

Can I export the frequency table?

Yes. Click Download CSV to save the character, count and percentage for every row, ready to open in a spreadsheet.

Try it now: Letter Frequency Counter

Loading tool…