Silhouette Score Calculator
Work out silhouette score instantly with clear inputs, formula shown and shareable results.
About Silhouette Score Calculator
For one point, the silhouette compares a, its mean distance to the other members of its own cluster, with b, its mean distance to the members of the nearest other cluster. The score (b - a) / max(a, b) runs from -1 to 1: near 1 the point is comfortably inside its cluster, near 0 it sits on a boundary and negative values mean it would fit better elsewhere.
Formula
Silhouette coefficient
s = (b - a) / max(a, b)
- a
- Mean intra-cluster distance
- b
- Mean distance to the nearest neighbouring cluster
Worked example
With the default values below, Silhouette Score Calculator returns Silhouette coefficient of 0.5714. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Mean distance to own cluster (a)minimum 0.001
- 1.2
- Mean distance to nearest other cluster (b)minimum 0.001
- 2.8
- Number of clustersminimum 2
- 4
Results
- Silhouette coefficient
- 0.5714
- Nearest-cluster distance / own-cluster distance
- 2.3333
- Structure strength
- Reasonable structure
- Clusters evaluated
- 4
Step by step
- 1Values used
- 2Silhouette coefficient
- 3Silhouette coefficient= 0.5714
- 4Nearest-cluster distance / own-cluster distance= 2.3333
- 5Structure strength= Reasonable structure
- 6Clusters evaluated= 4
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How do I use it to choose k?
Average the silhouette across all points for several values of k and take the k with the highest mean. Unlike inertia, the silhouette does not fall monotonically as k grows.
Does the distance metric matter?
Very much. Silhouette values computed with Euclidean and cosine distance are not comparable, so fix the metric before comparing runs.
Related Calculators
- Anomaly Threshold (Z Score) Calculator
- Model Drift Score Calculator
- A B Test For Models Calculator
- Active Learning Sample Budget Calculator
- Adjusted Rand Index Calculator
- AI Project ROI Calculator
- AIC And BIC Calculator
- Annotation QA Sample Size Calculator
- Annotation Time Calculator
- ARIMA Order Selection Calculator
You might also need
- Anomaly Threshold (Z Score) CalculatorAlso in AI, ML & Data Science
- Model Drift Score CalculatorAlso in AI, ML & Data Science
- AI Project ROI CalculatorAlso in AI, ML & Data Science
- Annotation Time CalculatorAlso in AI, ML & Data Science
- Distillation Speedup CalculatorAlso in AI, ML & Data Science
- Exponential Smoothing CalculatorAlso in AI, ML & Data Science
