The type-token ratio measures how varied the vocabulary of a text is. The type-token ratio calculator takes the total number of words and the number of different words, and gives the type-token ratio and four corrected indices for length: Guiraud, Carroll, Herdan’s C and Maas.
How the calculation works
- Count the tokens, which are all the running words of the text, and the types, which are the different words, counting each form once.
- The type-token ratio is types ÷ tokens. It runs from 0 to 1, and a higher value means a more varied vocabulary.
- Because the plain ratio falls as texts get longer, other measures correct for length: Guiraud = types ÷ √tokens, Carroll = types ÷ √(2 × tokens) and Herdan’s C = ln(types) ÷ ln(tokens).
- Maas a² = (ln tokens − ln types) ÷ (ln tokens)² is also designed to be steady across lengths, and lower values mean a richer vocabulary.
Example
A text has 500 words, of which 210 are different. The type-token ratio is 210 ÷ 500 = 0.420. Guiraud’s index is 210 ÷ √500 = 9.39, Carroll’s is 6.64, Herdan’s C is ln 210 ÷ ln 500 = 0.860, and Maas a² is 0.0225.
Why it matters
Vocabulary richness is a basic feature of writing and speech. Students of language, teachers of second languages and anyone comparing texts can use these indices to put a number on repetition and variety.
Good to know
The measures depend on how you define a word and whether you count forms such as walk and walked as one or two types. They also depend on text length, so only compare texts cut to the same size. Short samples under 100 words give unstable values.
Related tools
The readability calculator scores how easy a text is, and the reading time calculator estimates how long a text takes to read.