Skip to content
TabShedKitsMy desk

How Similar Are Two Texts? Reading the Similarity Percentage and Its Four Measures

Updated 5 min readBy

What the similarity percentage, word order, shared words and same lines mean in the Text Similarity tool, with examples of when each one misleads.

Text SimilarityHow similar two texts are, in percent
Open Text Similarity
On this page
  1. The big number: how it is calculated
  2. The cards under it
  3. Reading combinations
  4. Step by step
  5. What the numbers cannot tell you
  6. Good uses
  7. Troubleshooting
  8. A short example
  9. Frequently asked questions

You have two texts and want to know how close they are: an original and a rewrite, two versions of a product description, a student's answer and a model answer. A single percentage seems to answer that, but a percentage hides what kind of similarity it measures. The Text Similarity tool shows several measures at once. This guide explains each one, so that you read the numbers correctly.

The big number: how it is calculated

For texts up to about 5,000 characters, the big percentage is 100% minus the edit distance divided by the length of the longer text. Edit distance (Levenshtein) counts the smallest number of single-character insertions, deletions and replacements needed to turn one text into the other. If the texts are identical it is 100%. If you must change half the characters, it is about 50%. For longer texts, character-by-character comparison would be too slow and not very useful, so the tool compares by words instead, or, for very long texts, by the words they share.

That means the same pair of texts can score differently depending on its length. When you compare two long documents, read the word-based measures below rather than the big number alone.

The cards under it

CardWhat it measuresUse it to answer
Word orderEdit distance on words: same words in the same orderIs the sentence structure the same?
Shared wordsThe share of distinct words that appear in both texts, in any order (the Jaccard measure)Do they use the same vocabulary?
Same linesThe share of lines of A that also appear in BWere whole lines copied unchanged?
Words A / BNumber of words in each textAre they similar in length?
Only in A, Only in B, In bothCounts of distinct wordsHow much is new, removed, or common?

Reading combinations

  • High word order and high shared words: nearly the same text, with small edits.
  • Low word order but high shared words: the same words rearranged: a paraphrase that changed the sentence structure, or a list in another order.
  • Low shared words: the vocabulary differs; they are different texts, or a thorough rewrite.
  • High same lines, lower overall: some lines were copied exactly and others rewritten.
  • Very different word counts: one is a summary or an expansion of the other; percentages based on the longer text will look low.

Step by step

  1. Paste the first text into Text A and the second into Text B. The result appears as you type.
  2. Choose what to ignore: Ignore case is on by default; Ignore punctuation and spacing is off. Turn the second one on when small formatting differences should not count.
  3. Read the big number and the cards.
  4. Press See the differences in detail to open both texts in the Text Diff Checker, with each line highlighted.

What the numbers cannot tell you

  • Meaning. The tool compares characters and words, not ideas. "The dog bit the man" and "The man bit the dog" share all their words but mean different things. In the other direction, two texts that say the same thing in different words can score low.
  • Plagiarism. It compares two texts you provide, so it can show how close a rewrite is to its source. It does not search the web or any database, so it cannot tell you whether a text was copied from somewhere.
  • Quality. A high similarity between two drafts says nothing about whether the draft is good.
  • Languages. It works with Unicode characters and with words separated by spaces. For languages written without spaces between words, such as Chinese or Japanese, the character measure (the big number) is more meaningful than the word cards.

Good uses

  • Checking a rewrite of your own text: if you wanted to change an old article substantially, a high Word order score tells you it is still the same text with a few edits.
  • Product descriptions. Many listings from the same template look almost the same. Low shared words across a set of pages means they are different enough; high values mean you have duplicated content.
  • Comparing answers to a model answer, as one input of several, not as a grade.
  • Finding duplicates of a record: two entries with a high score are probably the same.

Troubleshooting

  • Word order shows a dash. For very long texts that measure is not calculated; use shared words.
  • Two clearly different texts score 40%. Short texts with common letters share many characters. Look at the shared-words card instead.
  • Identical texts score less than 100%. Check hidden differences: extra spaces, line endings, or case if Ignore case is off. Turn on Ignore punctuation and spacing and compare again.

A short example

Take two sentences: "The quick brown fox jumps over the lazy dog" and "The lazy dog is jumped over by the quick brown fox". The shared-words measure is high, because most of the vocabulary is the same, but the word-order measure is lower, because the structure was turned around. The big number, which counts character edits, will be lower still. This is a good picture of why one number is not enough: the sentences describe the same scene, yet a character comparison sees many changes. Read the card that matches your question.

Frequently asked questions

Is my text uploaded?

No. The calculation is done in your browser and nothing is sent or stored.

What is a good similarity score?

It depends on the purpose. There is no threshold that fits every job; read the measure that answers your question.

Can I compare more than two texts?

Compare them in pairs.