Silhouette Score Calculator

Evaluate clustering quality, inspect every observation, compare metrics, identify weak assignments, visualise separation, and export clear silhouette score reports for practical machine learning analysis.

Dataset and calculation options

Paste a feature table with cluster labels, upload a CSV file, or provide a precomputed distance matrix.

Text and numeric cluster labels are supported. Select columns after parsing.
Use Ctrl or Command to select multiple numeric columns.
Excluded columns remain available as identifiers or labels.

Formula used

s(i) = [b(i) - a(i)] / max[a(i), b(i)]

a(i) is the mean distance from observation i to other observations in its assigned cluster.

b(i) is the smallest mean distance from observation i to observations in any different cluster.

The coefficient normally ranges from −1 to 1. Singleton clusters receive zero because their within-cluster cohesion cannot be estimated meaningfully.

How to use this calculator

  1. Paste a table or upload a supported text file.
  2. Parse columns, then select labels, identifiers, and numeric features.
  3. Choose a metric, preprocessing method, and missing-value rule.
  4. Enable optional comparisons, matrices, or calculation steps.
  5. Calculate, inspect weak points, and export the report.

Example data

IDFeature 1Feature 2Cluster
P11.01.2A
P21.30.9A
P30.81.4A
P46.87.1B
P57.26.7B
P66.57.4B

Interpretation guide

Score rangeGeneral interpretation
0.71 to 1.00Strong separation and compact clusters.
0.51 to 0.70Reasonable and useful clustering structure.
0.26 to 0.50Weak or overlapping cluster structure.
0.01 to 0.25Very weak separation.
Near 0Observations lie near decision boundaries.
Below 0Possible assignment errors or severe overlap.

These ranges are practical guidelines, not universal statistical rules. Domain knowledge and cluster stability should also guide decisions.

Frequently asked questions

What is a silhouette score?

It measures how closely each observation matches its assigned cluster compared with the nearest alternative cluster.

What is considered a good score?

Higher positive values are generally better, but acceptable values depend on data geometry, noise, and the chosen metric.

Why can a score be negative?

A negative value means the observation is, on average, closer to another cluster than its assigned cluster.

Should features be standardised?

Standardisation is helpful when feature scales differ and the selected metric is sensitive to magnitude.

Which distance metric should I choose?

Euclidean is common for continuous compact clusters. Manhattan, cosine, Canberra, or other metrics may better match particular data.

Can this evaluate DBSCAN labels?

Yes. Provide DBSCAN labels, but decide whether noise points should be removed or treated as a separate cluster.

Does it support categorical features?

The feature-table mode expects numeric features. Encode categories appropriately or provide a valid precomputed distance matrix.

How is the nearest cluster selected?

The calculator computes mean distance to every other cluster and chooses the smallest of those means.

How are singleton clusters handled?

Their silhouette value is set to zero because no within-cluster average distance can be calculated.

How does silhouette differ from inertia?

Inertia measures within-cluster compactness only. Silhouette scoring also considers separation from competing clusters.

Can it help select the number of clusters?

Yes. Enable the k comparison to test several deterministic k-means solutions and compare their average silhouette scores.

Related Calculators

K-Means Clustering CalculatorEuclidean Distance CalculatorManhattan Distance CalculatorCosine Similarity CalculatorDavies-Bouldin Index CalculatorCalinski-Harabasz Score CalculatorCluster Centroid CalculatorWithin-Cluster Sum of Squares CalculatorElbow Method CalculatorDBSCAN Neighbourhood 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.