Lexical Diversity: Type-Token Ratio, Hapax Legomena and MATTR
November 21, 2026 · Equipo Style Optimizer
Lexical diversity measures how varied your vocabulary is: how many different words you use and how often you come back to the same ones. It’s worked out by counting the distinct words in a text and, above all, the ones that appear only once. You can measure any passage of your own with our lexical density calculator, free and without signing up.
Measure your vocabulary
Paste a few paragraphs into the calculator and you get six figures: total words, unique words, the type-token ratio, MATTR, the share of hapax legomena and lexical density, plus the words used only once and the content words you repeat most. Everything runs in your browser; your text never leaves your computer.
The measures
- Type-token ratio (TTR). Unique words (types) divided by total words (tokens). A thousand-word passage with six hundred different words has a TTR of 60%. It’s the oldest and simplest measure, and the one most affected by length.
- Hapax legomena. A hapax legomenon is a word that appears only once in a text. Their share of the vocabulary is the classic measure of richness: the higher it is, the less the writer repeats.
- MATTR. The moving-average type-token ratio, proposed by Michael Covington and Joe McFall in 2010, works out the TTR of every stretch of 50 words in a row and takes the average. Because each window has the same length, the result barely changes with the length of the text. Researchers also use MTLD and vocd-D for the same reason.
- Lexical density. A different measure that often gets mixed up with diversity: the share of content words (nouns, verbs, adjectives and adverbs) against grammatical ones (articles, prepositions, pronouns, auxiliaries). Jean Ure proposed it in 1971, and found that spoken English usually stays below 40% while written English goes above it.
The length problem
Here’s the trap most explanations skip. The longer a text, the lower its type-token ratio, for purely arithmetical reasons: “the,” “of” and “and” repeat whatever you do, and every new page brings fewer words you haven’t used yet. Linguists call the pattern behind it Heaps’ law.
That’s why comparing the TTR of a piece of flash fiction with that of a novel tells you nothing. The raw ratio only makes sense between texts of similar length, or for the same text before and after revision. When the lengths differ, use MATTR, which was designed precisely for that.
When a narrow vocabulary is the point
A wide vocabulary helps precision, but deliberate repetition is a technique, not a flaw. Hemingway and Raymond Carver built superb prose on a vocabulary they kept narrow on purpose, and the opening of A Tale of Two Cities hangs a whole paragraph on one repeated frame. A key word that returns through a chapter can be what holds it together.
What does deserve a look is the repetition of words that aren’t key words. That’s usually where your default vocabulary lives: the adjective you reach for without thinking, the verb that comes out on its own. The list of most repeated content words in the calculator is built to show you exactly that.
What to look at instead of the score
- The repeated content words. If “dark,” “slowly” or “glance” top your list, you’ve found a habit, not a style.
- Echoes at close range. The same word twice in three lines is more noticeable than ten times across a chapter. Our guides to repeated words and to repetitions, alliteration and internal rhyme cover how to find and judge them.
- Weak words. Thing, stuff, get, make and nice keep the diversity score up while saying very little. The weak words checker marks them family by family.
A revision exercise
- Paste a chapter into the calculator and write down its MATTR and its five most repeated content words.
- For each of those words, decide whether it’s a key word of the chapter or a habit.
- Revise only the habits, then measure again. If MATTR rises and the chapter still reads like you, the revision worked.
Frequently asked questions
What is a hapax legomenon?
A word that appears only once in a text or a body of texts. The term is Greek for “said once.” In literary studies it measures variety of vocabulary; in classical philology it has another use, because the hapaxes of an ancient author are often the hardest words to translate, with nothing to compare them to. Shakespeare’s “honorificabilitudinitatibus,” in Love’s Labour’s Lost, is a famous one.
What is a good type-token ratio?
It depends above all on length. In a passage of about a thousand words, a hapax share above half of the vocabulary points to varied vocabulary, and one below a third to a repetitive one. In longer texts every figure falls, so the comparison only holds between texts of similar size. For texts of different lengths, compare their MATTR.
Is repeating words always a flaw?
No. Repetition can be structural, a word that runs through a chapter, or a matter of style, as in minimalist prose. The problem is the repetition you didn’t intend: the same word twice in three lines because it was the first one that came. You find that by looking at close echoes, not at the overall percentage.
What’s the difference between lexical diversity and lexical density?
Diversity counts how many different words you use; density, how many of your words carry content. A technical report can be dense and repetitive at the same time, and a breezy dialogue scene can be varied and light. The calculator gives you both.
Vocabulary is one of the traits of a writing style. To see how your sentences move, try the sentence length checker.