Skip to main content
Calcimator

Clustering Quality Score Calculator

Evaluate clustering quality using silhouette score, Calinski-Harabasz index, Davies-Bouldin index, and Dunn index from cluster distance metrics.

About this calculator

This calculator scores a clustering solution using four related metrics — Silhouette Score, Calinski-Harabasz index, Davies-Bouldin index, and Dunn Index — all derived from two distance summaries you provide: the average distance between points inside the same cluster (Avg Intra-Cluster Distance) and the average distance from points to their nearest other cluster (Avg Nearest-Cluster Distance). The headline Silhouette Score is (avgNearestClusterDist − avgIntraClusterDist) / max(avgIntraClusterDist, avgNearestClusterDist) (lines 11-13) — it never references Number of Clusters (k) or Total Data Points at all, so those two inputs move only the Calinski-Harabasz index and Avg Points per Cluster, leaving Silhouette Score, Davies-Bouldin, and Dunn Index completely untouched.

Widening the gap between the two distance inputs — a larger nearest-cluster distance, a smaller intra-cluster distance — raises Silhouette Score toward "Strong structure"; narrowing that gap drags the label down toward "No substantial structure." The calculator does not examine your actual data points or compute a true per-point silhouette; it approximates the standard metrics from just two summary distances, a simplification real clustering software does not make.

Inputs

Results

Silhouette Score

0.5

Quality Assessment

Weak structure

Calinski-Harabasz Index594
Davies-Bouldin Index0.5
Dunn Index2
Separation Ratio2
Avg Points per Cluster100
How to Use This Calculator
  1. Enter the number of clusters and within-cluster sum of squares (WCSS) values.
  2. Set the between-cluster sum of squares for separation measurement.
  3. Review the silhouette score and Calinski-Harabasz index.
  4. Compare metrics across different values of k to identify the optimal cluster count.
  5. Use the elbow method on WCSS and peak silhouette score to finalize cluster selection.

How the result changes with Avg Nearest-Cluster Distance

Avg Nearest-Cluster DistanceSilhouette ScoreQuality Assessment
2.50No substantial structure
3.750.33Weak structure
7.50.67Reasonable structure
130.81Strong structure

What each input means

Avg Intra-Cluster Distance
Average distance between points within the same cluster. Lower is better (tighter clusters).
Avg Nearest-Cluster Distance
Average distance from points to the nearest neighboring cluster. Higher is better (more separated).
Number of Clusters (k)
The number of clusters in your clustering solution.
Total Data Points
Total number of data points across all clusters.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Avg Intra-Cluster Distance = 2.5, Avg Nearest-Cluster Distance = 5, Number of Clusters (k) = 3, Total Data Points = 300 = 4 input(s) provided
  2. Calculate Silhouette Score
    Silhouette Score
    0.5 = 0.5
  3. Calculate Quality Assessment
    Weak structure = Weak structure
  4. Calculate Calinski-Harabasz Index
    Calinski-Harabasz Index
    594 = 594
  5. Calculate Davies-Bouldin Index
    Davies-Bouldin Index
    0.5 = 0.5

Engine last updated . Checked against 1 independently-derived test — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Does the number of clusters I set change the Silhouette Score?

No. Silhouette Score is computed purely from Avg Intra-Cluster Distance and Avg Nearest-Cluster Distance (lines 11-13); Number of Clusters (k) never appears in that formula, though it does drive the Calinski-Harabasz index and Avg Points per Cluster elsewhere on the page.

What does a Quality Assessment of "Weak structure" mean?

The engine buckets Silhouette Score into four labels — above 0.7 is "Strong structure," above 0.5 is "Reasonable structure," above 0.25 is "Weak structure," and anything lower is "No substantial structure" (lines 41-44) — so "Weak structure" means your score sits between 0.25 and 0.5: real but modest separation between clusters.

Why doesn't Total Data Points move the Silhouette Score?

Silhouette Score, Davies-Bouldin, and Dunn Index are all built from the two distance inputs alone and have no term involving how many points you told the calculator you have. Total Data Points isn't inert everywhere, though — it does feed the Calinski-Harabasz formula's (totalPoints − clusterCount) / (clusterCount − 1) term (line 21) and Avg Points per Cluster (line 37), just not Silhouette Score specifically.

Do a bigger nearest-cluster distance and a smaller intra-cluster distance both improve the score?

Yes. Increasing Avg Nearest-Cluster Distance raises Silhouette Score, Dunn Index, and Separation Ratio while lowering Davies-Bouldin, and decreasing Avg Intra-Cluster Distance does the same across every one of those metrics, because all four measure the same underlying idea: tight, well-separated clusters.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.