How to Check Text Similarity Between Two Pieces of Text (Cosine Similarity Explained)
Cosine similarity between two texts is a score from 0% to 100% that measures how much vocabulary they share, not how similar their meaning is. Two reworded product listings that share most of their words might score 74%. The same original text compared against a genuine paraphrase, one that says the same thing in completely different words, can score as low as 6%. Both numbers are correct. They just measure different things than most people assume.
How the score is actually calculated
The math behind this sounds intimidating, but the steps are simple.
- Lowercase both texts and strip punctuation, then split each one into individual words.
- Drop very short words (single letters) and common stop words like “the,” “and,” “a,” so the score reflects meaningful vocabulary instead of grammatical glue.
- Turn what’s left of each text into a list of word counts, essentially “this word appears twice, that word appears once.”
- Compare the two lists using cosine similarity: multiply the matching counts together, sum them up, and divide by a normalizing factor based on how long each list is. The result is a number between 0 and 1, shown as a percentage.
The intuition: if two texts use the same words in roughly the same proportions, the score climbs toward 100%. If they share almost no vocabulary, it drops toward 0%, no matter how closely related the underlying ideas are. This is a bag-of-words method, not a language model. It counts overlap; it doesn’t read for meaning.
Worked example 1: two reworded product listings
This is the scenario that matters most for duplicate-content checks: two versions of the same listing, reworded just enough to look different at a glance.
Text A: “Buy affordable wireless bluetooth headphones with active noise cancellation and thirty hour battery life. Free shipping on every order today.”
Text B: “Shop cheap wireless bluetooth headphones featuring active noise cancellation and a thirty hour battery. Enjoy free shipping on every order this week.”
Result: 74% similarity (“High similarity”).
| Terms | |
|---|---|
| Shared (13) | active, battery, bluetooth, cancellation, every, free, headphones, hour, noise, order, shipping, thirty, wireless |
| Only in A (4) | affordable, buy, life, today |
| Only in B (5) | cheap, enjoy, featuring, shop, week |
A person skimming these two paragraphs would probably say they’re “different enough.” The vocabulary tells a different story: 13 of the meaningful words are identical, and only 9 words total are unique to either version. That’s the classic sign of lazy rewriting, swap a few adjectives and verbs, keep the structure and the product details intact. A score this high, sitting just under the tool’s own “high similarity” cutoff of 70%, is a real signal that these two pages are too close for comfort if they’re meant to look like independent content.
Worked example 2: same text vs. a genuine paraphrase
Now compare the same original (Text A again, relabeled Text C) against a version that expresses the identical idea in different words.
Text C (same as Text A): “Buy affordable wireless bluetooth headphones with active noise cancellation and thirty hour battery life. Free shipping on every order today.”
Text D: “Our over ear audio devices block outside sound automatically and last more than a full day per charge, and delivery costs nothing no matter what you order.”
Result: 6% similarity (“Low similarity”). Only shared word: “order”.
Read Text D on its own. It describes headphones that cancel noise, last all day on a charge, and ship free, the exact same three selling points as Text A. A human editor would flag this instantly as the same content in different clothes. The cosine score doesn’t see it that way, because it never looks at meaning, only at literal word overlap. “Wireless” and “audio devices” don’t match. “Noise cancellation” and “block outside sound” don’t match. “Battery life” and “day per charge” don’t match. The only word both texts happen to share is “order,” so the score bottoms out at 6%.
This is the tool’s blind spot, and it’s worth internalizing: a high score is strong evidence of overlap, but a low score is not evidence of originality. It only tells you the wording differs.
Score bands
| Score | Label | What it suggests |
|---|---|---|
| 70% and up | High similarity | Substantial shared vocabulary; likely near-duplicate or lightly reworded content |
| 40-69% | Moderate similarity | Meaningful overlap, worth a manual read to judge intent |
| 1-39% | Low similarity | Mostly different vocabulary; could still describe the same thing (see Example 2) |
| 0% | No similarity | No shared words survive after stop-word removal |
Check your own text
Paste any two passages below and get the score, along with the exact shared and unique terms behind it, instantly. It works with text in any language; English is only used for the examples above so the numbers stay verifiable.
Enter both texts above to calculate similarity
TF cosine similarity · stop words removed · runs in your browser
Common mistakes and edge cases
Assuming this measures meaning like a real AI embedding model. It doesn’t. This is term-frequency cosine similarity, counting shared words, not a neural embedding model that understands synonyms or context. Example 2 above is the clearest illustration: same message, 6% score, because the words themselves barely overlap.
Trusting a low score to mean “definitely not a copy.” A well-paraphrased version of your content can score near 0% while still lifting your structure, claims, and ideas. If you’re checking for plagiarism rather than lazy duplication, a low cosine score tells you nothing useful either way.
Comparing a short snippet against a much longer page. If Text A is a two-sentence snippet and Text B is a 2,000-word article that happens to contain those exact two sentences, the score will look lower than expected. All the extra unique vocabulary in the longer text dilutes the overlap, even though the snippet is fully present inside it. Compare texts of similar length and scope when you can.
Not accounting for stop-word removal. Words like “the,” “and,” “is,” and “a” are stripped before scoring. A very short text made up mostly of common words can legitimately return 0%, not because the tool failed, but because there was nothing left to compare once the stop words were removed.
Frequently asked questions
How is this different from a real embedding model like OpenAI’s text-embedding-3? A true embedding model converts text into a dense vector that captures meaning, so “cheap headphones” and “affordable earbuds” would land close together even without sharing a single word. This tool builds a much simpler vector from literal word counts after removing stop words, then applies the same cosine math. It’s fast, runs entirely in your browser, and is great for spotting copied or lightly reworded text, but it has no concept of synonyms or context.
What score should worry me for duplicate-content SEO purposes? Treat 70% and up as the range worth taking seriously; that’s the “high similarity” band, and Example 1 above sits right at 74%, a realistic score for two listings that were rewritten just enough to look different to a human. But don’t stop at the number alone. Always check which words are actually shared and which are unique. Two pages can hit a similar score for very different reasons.
Does this catch paraphrased plagiarism? No, and Example 2 is the proof: the same underlying content, reworded with different vocabulary, scored only 6% because just one word (“order”) happened to match. If you need to detect meaning-level plagiarism rather than literal copy-paste, you need a semantic tool, not a word-overlap one.
Are stop words included in the score? No. Common words like “the,” “and,” “a,” and “is” are removed before the comparison runs, along with single-letter tokens. Only the remaining meaningful vocabulary feeds into the cosine calculation.
Is my text sent to a server when I use this tool? No. The entire calculation, tokenizing, counting, and the cosine math, runs client-side in your browser. Nothing you paste in is transmitted anywhere.
Can I get a shareable link with my inputs pre-filled? Not from this embedded version inside the article. Open the tool’s full page to generate a link that pre-fills both text boxes for someone else to open.