Silhouette Score Calculator

Silhouette Score Calculator

How good is a clustering result, really? The silhouette score answers this by comparing how close a point is to its own cluster versus how close it is to the nearest neighboring cluster.

s = (b - a) / max(a, b)
where a = mean intra-cluster distance, b = mean nearest-cluster distance

Example

Mean intra-cluster distance (a) = 2, mean nearest-cluster distance (b) = 8:

s = (8 - 2) / max(2, 8) = 6/8 = 0.75 (strong, well-separated clustering)

Reading the Score

Score RangeInterpretation
> 0.7Strong, well-separated clustering
0.5 - 0.7Reasonable clustering structure
0.25 - 0.5Weak clustering structure
< 0.25Poor or overlapping clustering

Practical Use

Silhouette score ranges from -1 to +1, with negative values suggesting a point may have been assigned to the wrong cluster entirely. Averaging this score across every point in a dataset is one of the most common ways to choose the optimal number of clusters (k) for algorithms like k-means, since it doesn't require knowing the "true" cluster labels in advance - unlike supervised evaluation metrics.