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
How to Use This Calculator
- Enter the number of clusters and within-cluster sum of squares (WCSS) values.
- Set the between-cluster sum of squares for separation measurement.
- Review the silhouette score and Calinski-Harabasz index.
- Compare metrics across different values of k to identify the optimal cluster count.
- 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 Distance | Silhouette Score | Quality Assessment |
|---|---|---|
| 2.5 | 0 | No substantial structure |
| 3.75 | 0.33 | Weak structure |
| 7.5 | 0.67 | Reasonable structure |
| 13 | 0.81 | Strong 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
- Identify Input Parameters4 parametersAvg Intra-Cluster Distance = 2.5, Avg Nearest-Cluster Distance = 5, Number of Clusters (k) = 3, Total Data Points = 300 = 4 input(s) provided
- Calculate Silhouette ScoreSilhouette Score0.5 = 0.5
- Calculate Quality AssessmentWeak structure = Weak structure
- Calculate Calinski-Harabasz IndexCalinski-Harabasz Index594 = 594
- Calculate Davies-Bouldin IndexDavies-Bouldin Index0.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.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Feature Scaling Calculator
Scale raw feature values using min-max normalization, z-score standardization, robust scaling, and max-abs normalization for machine learning preprocessing.
Data ScienceDimensionality Reduction Calculator
Determine how many principal components to retain based on eigenvalues and target explained variance. Includes scree plot data, Kaiser criterion, and cumulative variance analysis.
Data ScienceA/B Test Calculator
Determine statistical significance of A/B test results. Calculate z-score, p-value, conversion lift, and whether your variant beats the control at your chosen confidence level.
More in Math & Statistics.