← Text & List Tools
Text & List Tools · runs locally

Cosine Word-Frequency Similarity Calculator

Measure the angle between two normalized word-frequency vectors so repeated terms influence the resulting score.

Ready. Your working data stays in this browser.

Why this tool is useful

Use cosine similarity for local document comparison when term frequency matters but longer text alone should not automatically dominate the score.

How it works

The browser counts normalized Unicode word tokens, computes a sparse dot product and divides it by the product of both vector magnitudes.

Practical example

The sample vectors are [2,1] and [1,2], so their cosine similarity is 4/5, or 0.8.

Validation

The calculation is deterministic and explains validation errors instead of silently changing invalid input.

Privacy boundary

Input and output remain in this tab. Copy and download happen through browser APIs without a server upload.

Result passport

Every run reports its tool mode, timestamp and input/output size so transformed data can be audited.