ToolJoltTools

Silhouette Score Calculator

Cluster cohesion vs separation for one point — the building block of the silhouette metric for choosing K.

Silhouette coefficient

Average the per-point silhouette over all points to score a whole clustering, and compare across K to pick the number of clusters. A negative silhouette means the point is closer to a neighboring cluster than its own — a sign of over- or under-clustering.

Formula

s = (b − a) / max(a, b) — a = mean intra-cluster distance, b = mean nearest-other-cluster distance; ranges −1 to +1
References: Rousseeuw (1987), Silhouettes: a graphical aid to the interpretation and validation of cluster analysis

About Silhouette Score Calculator

The silhouette coefficient measures how well a single point fits its assigned cluster versus the nearest alternative, combining cohesion (how close it is to its own cluster) and separation (how far from the next-nearest) into one number from −1 to +1. This calculator computes it for one point from its two mean distances, building the intuition behind the full silhouette metric — averaged over all points, it's the standard way to evaluate a clustering and, by comparing across candidate K values, to choose the number of clusters when you have no ground truth labels.

How to use Silhouette Score Calculator

  1. 1Enter your values into Silhouette Score Calculator — sensible, domain-typical defaults are pre-filled so you see a real result immediately.
  2. 2The result recomputes live using the formula shown on the page; there is no button to press.
  3. 3Adjust any input to compare scenarios, then read the worked example to see the substituted numbers.

Why use Silhouette Score Calculator?

  • Computes Silhouette Score instantly in your browser — no sign-up, no upload, no server round-trip.
  • 100% free and unlimited, with the exact formula shown: s = (b − a) / max(a, b) — a = mean intra-cluster distance, b = mean nearest-other-cluster distance; ranges −1 to +1.
  • Runs entirely client-side, so every value you enter stays private on your device.
  • Live recompute as you type, with a worked example and authoritative references for trust.

Frequently asked questions

How do I use silhouette scores to pick the number of clusters?+

Run clustering for several K values, compute the mean silhouette over all points for each, and pick the K with the highest average. A silhouette plot (per-cluster distributions) is even better — it reveals whether one cluster is dragging the average down or whether clusters are uneven in quality.

What does a negative silhouette mean?+

The point is, on average, closer to a neighboring cluster than to its own — it's probably misassigned. A few negatives are normal at boundaries; many negatives signal that your K is wrong or the clusters genuinely overlap and aren't well-separated in this feature space.

Silhouette vs elbow method for choosing K?+

The elbow method (inertia vs K) is heuristic and often ambiguous — the 'elbow' is subjective. Silhouette gives an actual quality score you can maximize, and it penalizes both under- and over-clustering. Many practitioners use both; silhouette is the more principled tiebreaker.

Does silhouette work for all clustering algorithms?+

It works for any algorithm that assigns points to clusters and any distance metric, but it implicitly favors convex, roughly equal-sized clusters — the kind K-means produces. For density-based clusters (DBSCAN) with arbitrary shapes, silhouette can be misleading; consider density-based validity indices instead.

Related tools

Related ML & AI tools

Sponsored