Enter the number of common items and the total number of items in each set into the calculator to determine the similarity index. This index is a measure of the similarity between two sets.

Similarity Index Calculator

Dice (Sørensen)
Jaccard (IoU)
Dice ↔ Jaccard
From Lists
ML/Confusion Matrix

Enter any 3 values to calculate the missing one


Related Calculators

Similarity Index Formula

The following formula is used to calculate the similarity index between two sets.

SI = (2 * C) / (A + B)

Variables:

  • SI is the similarity index
  • C is the number of common items in both sets
  • A is the total number of items in set A
  • B is the total number of items in set B

To calculate the similarity index, multiply the number of common items by 2 and then divide by the sum of the total number of items in both sets.

What is a Similarity Index?

The similarity index is a metric used to quantify the similarity between two sets. It is often used in various fields such as biology to measure species similarity, in information retrieval to compare documents, or in data analysis to compare sets of data. The index ranges from 0 to 1, where 0 indicates no similarity and 1 indicates identical sets.

How to Calculate Similarity Index?

The following steps outline how to calculate the Similarity Index.


  1. First, determine the number of common items (C) shared by both sets.
  2. Next, determine the total number of items in set A (A).
  3. Next, determine the total number of items in set B (B).
  4. Next, gather the formula from above = SI = (2 * C) / (A + B).
  5. Finally, calculate the Similarity Index (SI).
  6. After inserting the variables and calculating the result, check your answer with the calculator above.

Example Problem : 

Use the following variables as an example problem to test your knowledge.

Number of common items (C) = 15

Total number of items in set A (A) = 30

Total number of items in set B (B) = 25