Calculators

Jaccard Similarity Calculator

Calculate Jaccard similarity, distance, intersection, and union sizes for two sets privately in your browser.

Enter two sets separated by commas, semicolons, or new lines. Spaces within an item are preserved; surrounding spaces and empty entries are ignored. Matching is case-sensitive and duplicates count once. One set may be empty. The calculation runs locally in your browser; your values are not uploaded or stored.

Your Jaccard similarity will appear here.

Compare overlap between two sets.

Jaccard similarity J(A, B) = |A intersection B| / |A union B|. Jaccard distance is 1 minus similarity. For A = apple, banana, cherry and B = banana, cherry, date, the intersection has 2 items and the union has 4, so similarity is 0.5 (50%) and distance is 0.5. Identical nonempty sets give 1; disjoint sets give 0. Repeated items count once, regardless of frequency or order. Matching uses exact case-sensitive text after trimming surrounding whitespace: Apple and apple differ, as do 01 and 1. Commas, semicolons, and newlines separate items; spaces inside an item are retained. Delimiters cannot be part of an item and quoted CSV fields are not supported. Empty entries are ignored. One empty set and one nonempty set give similarity 0; two empty sets are reported as undefined rather than choosing a convention. Enter at most 10000 items and 200000 characters per set. Scores display up to 12 significant digits. This unweighted set measure does not compare item frequencies or semantic meaning. All processing stays in your browser.

Frequently Asked Questions

Everything you need to know about this tool, how it works, and privacy.

How is Jaccard similarity calculated?

Divide the number of unique shared items by the number of unique items across both sets. Two shared items out of four total unique items give 0.5 or 50%.

Are duplicates and capitalization considered?

Duplicates count once and order does not matter. Matching is case-sensitive after trimming surrounding whitespace. Apple and apple are different items. Spaces inside an item are preserved.

Can a set be empty?

Yes. Comparing one empty set with a nonempty set gives similarity 0 and distance 1. Two empty sets have a zero union, so this calculator reports the ratio as undefined.

What input format is supported?

Separate items with commas, semicolons, or newlines. Empty entries are ignored. Each set allows at most 10000 entries including duplicates and 200000 characters. Quoted CSV delimiters are not supported. All calculations run locally.