Lexical Density Calculator screenshot

Lexical Density Calculator

Measure lexical density: the share of words in your text that are unique, compared case-insensitively.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No upload
Deterministic

What this page does

Lexical density is the share of a text's words that are unique, and it is one way to see repetition that a word count alone hides.

How to use it

Paste or type the text and press Run. The result appears beside the form. With "The cat sat on the mat. The cat looked at the dog. The dog ignored the cat.", the page gives:

Words:                           17
Unique words:                    9
Lexical density:                 52.94%
Type–token ratio:                0.5294
Basis:                           unique words ÷ words, compared case-insensitively after dropping surrounding punctuation; a word that repeats in another case still counts once

The rule it applies

Density is unique words ÷ words × 100, where words are compared case-insensitively after surrounding punctuation is dropped; the type–token ratio is the same division as a decimal.

Nothing is changed: the page only reads the text. Every character is read in your browser: nothing is uploaded and nothing is stored.

Lexical density is the share of a text's words that are unique, and it is one way to see repetition that a word count alone hides.

The rule this page applies: Density is unique words ÷ words × 100, where words are compared case-insensitively after surrounding punctuation is dropped; the type–token ratio is the same division as a decimal.

Worked example: "The cat sat on the mat. The cat looked at the dog. The dog ignored the cat." gives the output recorded in the example below, character for character.

How to use the Lexical Density Calculator

Paste or type the text into the box and press Run. The result appears beside the form, and pressing Run again re-reads whatever is in the box.

This page has nothing to configure: it reads the text and applies the rule below. The cat sat on the mat. The cat looked at the dog. The dog ignored the cat.

The rule this page applies

Density is unique words ÷ words × 100, where words are compared case-insensitively after surrounding punctuation is dropped; the type–token ratio is the same division as a decimal.

Nothing is changed: the page only reads the text.

What to Expect

Best for

  • Spotting repetitive phrasing
  • Comparing a summary with its source

Not ideal for

  • Very short texts, where one repeated word swings the ratio
  • Languages that compound words

What this tool keeps

  • The text exactly as you pasted it
  • The same answer on every run
  • Nothing sent, stored or logged

What may need cleanup

  • Nothing: the page prints its measurements and leaves your text alone
  • Unusual spacing in the paste, which changes the counts

Common errors

  • An input with no words is refused, so the division never runs on an empty count.
  • An empty box, which the page refuses rather than printing a blank result

Example use cases

  • Editing a landing page for repetition
  • Checking a student essay

Sample input

The cat sat on the mat. The cat looked at the dog. The dog ignored the cat.

Sample output

Words: 17 Unique words: 9 Lexical density: 52.94% Type–token ratio: 0.5294 Basis: unique words ÷ words, compared case-insensitively after dropping surrounding punctuation; a word that repeats in another case still counts once

Who this is for

  • copywriters
  • teachers

Frequently asked questions

What rule does this page apply?

Density is unique words ÷ words × 100, where words are compared case-insensitively after surrounding punctuation is dropped; the type–token ratio is the same division as a decimal.

What input does it refuse?

An input with no words is refused, so the division never runs on an empty count.

What is left unchanged?

Nothing is changed: the page only reads the text.

Is anything uploaded?

No. The text is read by JavaScript in this page and nothing is posted, stored or logged.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.