Skip to content
Omnikalc

Type-token ratio calculator: how rich is the vocabulary of a text?

Enter the number of words and the number of different words to get the type-token ratio and four length-corrected measures of lexical diversity.

Updated on
Your inputs

Value out of range

Value out of range

Results

Type-token ratio (TTR)

0.420

Guiraud's root TTR (types ÷ √tokens)
9.39
Carroll's corrected TTR (types ÷ √(2 × tokens))
6.64
Herdan's C (log types ÷ log tokens)
0.860
Maas index a² (lower means richer vocabulary)
0.0225

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.

The readability calculator scores how easy a text is, and the reading time calculator estimates how long a text takes to read.

Frequently asked questions

What is the type-token ratio?

It is the number of different words in a text divided by the total number of words. A text that repeats the same words a lot has a low ratio, and a text with little repetition has a high one. It is one of the oldest measures of lexical diversity in linguistics and language teaching.

Why does the ratio fall as the text gets longer?

As a text grows, common words are repeated more and fewer new words appear. A long novel will always have a lower ratio than a short note, even with the same author. This makes plain TTR a poor way to compare texts of different lengths.

Which corrected measure should I use?

Guiraud and Carroll divide by the square root of the length, which helps for samples of similar size. Herdan's C and Maas use logarithms and are flatter across lengths. For fair comparisons, the best approach is to cut the texts to the same length, for example the first 500 words.

What is it used for?

Teachers use it to follow vocabulary growth in learners, researchers compare authors or genres, and clinicians use it to look at language in assessments. It is also used to check translations and to measure how technical a document is.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.