Common Neighbors Calculator

Compare node neighborhoods to reveal hidden network structure. Get counts, sets, and similarity indicators instant. Perfect for graph models, link ideas, and validation work.

Calculator

Paste a neighbor list. Duplicates are removed.
Use the same style as Node A.
If unchecked, A and a are treated the same.
Natural sorting helps readability.
Tip: Separate values with commas or new lines.

Formula used

Let N(A) be the neighbor set of Node A, and N(B) for Node B.

  • Common neighbors set: N(A) ∩ N(B)
  • Common neighbors score: |N(A) ∩ N(B)|
  • Union set: N(A) ∪ N(B)
  • Jaccard similarity: |N(A) ∩ N(B)| / |N(A) ∪ N(B)|
  • Overlap coefficient: |N(A) ∩ N(B)| / min(|N(A)|, |N(B)|)
  • Cosine similarity: |N(A) ∩ N(B)| / sqrt(|N(A)| |N(B)|)

How to use this calculator

  1. Enter Node A neighbors as IDs or labels.
  2. Enter Node B neighbors using the same labeling.
  3. Select how values are separated, or keep Auto.
  4. Choose case handling, then press Calculate.
  5. Review counts, the intersection list, and similarity metrics.
  6. Use the export buttons to save CSV or PDF results.

Example data table

Node A neighbors Node B neighbors Common neighbors Common neighbors score Jaccard similarity
2, 3, 4, 5, 7 1, 3, 4, 6, 7 3, 4, 7 3 0.428571
Example: |A|=5, |B|=5, |A∩B|=3, |A∪B|=7.

Related Calculators

Network degree calculatorAverage path length calculatorClustering coefficient calculatorBetweenness centrality calculatorCloseness centrality calculatorEigenvector centrality calculatorPageRank score calculatorKatz centrality calculatorAssortativity coefficient calculatorModularity score calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.