DataToolsLab
Text Analysis Tools

Vocabulary Diversity Calculator (Type-Token Ratio)

Type-token ratio and unique word count for a text, with the repeated words that drive the result.

Loading tool…

What is Vocabulary Diversity?

Vocabulary diversity, or type-token ratio, is the number of distinct words divided by the total words: 0.5 means half the words in the text are used only once. It is the standard measure of how varied the vocabulary is, and it has a property that makes it easy to misuse — TTR falls as a text gets longer, because the words already used keep reappearing while the supply of new ones runs out. Comparing a 200-word paragraph with a 2,000-word essay on this number compares lengths, not vocabularies.

How it works

Words are tokenised and lower-cased, and the distinct count is divided by the total to give the ratio, reported as a percentage. Because of the length dependence, the tool also reports the counts the ratio is made of — how many distinct words were used once and how many were repeated — and charts the most frequent words, which is where the number becomes actionable: a low ratio is usually a handful of words carrying the whole text. For comparing two texts of different lengths, the per-100-words distinct count is reported alongside the ratio, which is a length-normalised reading of the same data.

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Realistic sample

Type or paste any realistic input — the tool computes the result locally and instantly.

Common mistakes

Expecting a server round-trip

Nothing is uploaded — every tool in this category runs entirely in your browser.

Online