Lexical diversity calculator
Measure how varied a text’s vocabulary is with type-token ratio and related indices.
Lexical diversity calculator
Paste any text and this tool measures how varied its vocabulary is — a signal writers, editors, teachers and researchers use to spot repetitive phrasing or compare the richness of two passages. It counts the total words and the unique words, then reports the type-token ratio (TTR), its root variant (Guiraud's index) and its logarithmic variant (Herdan's C), plus a moving-average TTR that samples diversity across windows of the text so long documents aren't unfairly penalized just for having more words.
The options shape what counts as a distinct word. Ignore stop words to strip common function words like "the" or "and" before comparing, so the ratio reflects content words rather than grammar. Ignore case and diacritics to treat "Apple" and "apple" — or "café" and "cafe" — as the same word. Trim words to a base form applies a lightweight suffix-stripping heuristic tuned for English, so "running" and "runs" collapse toward "run", rather than full lemmatization. A minimum word length filters out short filler, the moving-average window controls how many words each diversity sample covers, and you can list as many of the most frequently repeated words as you like. Choose a plain-language summary or a tab-separated table depending on whether you're reading the numbers or pasting them into a spreadsheet.
Type-token ratio alone shrinks as a text gets longer, purely because words start repeating — that's why the root and logarithmic variants and the moving-average score exist, each correcting for length differently. Comparing all four side by side gives a fuller picture than any single number. The tool handles Windows (CRLF) and Unix (LF) line endings the same way, and the live tally under the output shows the word and unique-word counts alongside the plain TTR as you type.
Everything runs in your browser. Your text is never uploaded to a server, so it's safe to paste drafts, manuscripts or student essays. Copy the result, download it as a .txt file, or send the output back into the input to keep refining your analysis.