Segmentation
Segment builder
How results are checked
Named statistical review pending. Selected automated reference cases are published on the validation page.Recommended solution
k = 2
Segments of 308 and 292 respondents
Silhouette 0.273 · best of k = 2–6 on 8 brand statements
Segment builder groups survey respondents with similar answers using k-means clustering. Choose the attitude or need ratings that should define the segments and a range of k; the tool runs each solution, compares them by mean silhouette and smallest segment size, recommends one, and profiles the segments with means and indexes against the total. Name the segments and export your data with a segment column — free, with no account, and the file is never uploaded.
Build segments online
Open a CSV, Excel, SPSS, Stata, SAS or JSON file (or the synthetic sample), tick 2–20 numeric clustering variables, pick a range of k between 2 and 8 and run. Variables are standardized first so a 0–10 scale does not outweigh a 1–5 scale, and the starting centres are chosen deterministically, so the same file always gives the same segments. Rows missing any clustering variable are left out and get a blank segment in the export.
CSV, Excel, SPSS, Stata, SAS, R, Parquet, SQLite or JSON. The file is read in this browser tab and never uploaded.
Choosing the number of segments
There is no single correct k. The mean silhouette measures how clearly respondents sit in their own segment rather than the nearest other one; higher is better, and values near zero mean the segments overlap heavily. Very small segments are rarely actionable, so the recommendation is the highest-silhouette solution whose smallest segment holds at least 5% of respondents.
Then read the profiles. A solution with a slightly lower silhouette is often the better choice if its segments are easier to describe and target. Once you have a segment column, cross it with demographics or behaviours in the crosstab workspace to see who each segment is.
The method
Formula
minimise W = Σₖ Σ_{i ∈ Cₖ} ‖zᵢ − μₖ‖²; s(i) = (b(i) − a(i)) / max(a(i), b(i))
where
- zᵢ
- respondent i's clustering variables, each standardized to mean 0 and SD 1
- Cₖ, μₖ
- segment k and its centre (the mean of its members' z-scores)
- a(i)
- mean distance from respondent i to the other members of its own segment
- b(i)
- the smallest mean distance from respondent i to the members of any other segment
- s(i)
- silhouette of respondent i, from −1 (probably misassigned) to 1 (clearly placed); the table reports the mean over respondents
- Index
- segment mean ÷ total mean × 100; ≥ 110 is highlighted as high and ≤ 90 as low
Worked example
The synthetic sample has 600 respondents rating a brand on eight 1–5 attributes (brand_grid_1 to brand_grid_8). Running k = 2 to 6 on those eight ratings gives mean silhouettes of 0.273 (k = 2), 0.189 (k = 3), 0.172 (k = 4), 0.139 (k = 5), 0.131 (k = 6).
The recommended solution is k = 2, with segments of 308 (51.3%) and 292 (48.7%) respondents; k = 3 drops the silhouette to 0.189. Segment 1 has indexes of 77–81 across the eight attributes and segment 2 has 120–125: the brand grid splits into respondents who rate the brand above average on everything and those who rate it below average — a general brand-affinity split rather than distinct attribute profiles.
That is a useful lesson for real studies: when one overall attitude drives every rating, k-means finds “likes it” versus “does not”. To find segments that differ in what they value, cluster on needs or trade-off questions, or on ratings centred within each respondent.
Using it well
When to use it
Use it when
- Use: Attitudinal or needs-based segmentation from rating scales or numeric scores.
- Use: You want a reproducible first-pass segmentation and a segment column to analyse in crosstabs.
- Use: A few hundred or more complete respondents and clustering variables on comparable numeric scales.
Not the right tool when
- Avoid: Clustering variables are nominal categories (region, brand used) — k-means needs numeric distances; use latent class analysis.
- Avoid: You need to score new respondents with a validated typing tool — k-means centres here are a starting point, not a classifier.
- Avoid: Variables are dominated by one general factor (overall liking); segments will mostly split high versus low raters.
How to interpret it
Rule of thumb
Judge a solution on three things together: a mean silhouette that is not near zero, no segment below about 5% of the base, and profiles whose high and low indexes tell a story your team can name and act on. Segments are a summary of answer patterns, not natural types of people.
Questions
Frequently asked questions
How does the tool choose the recommended number of segments?
It runs k-means for every k in your range and recommends the solution with the highest mean silhouette among those whose smallest segment has at least 5% of the clustered respondents. If every solution has a smaller segment, it falls back to the highest silhouette and warns you. You can profile and export any k.
Why are the variables standardized?
K-means uses Euclidean distance, so a variable with a wider spread would dominate the segmentation. Each clustering variable is converted to a z-score (mean 0, standard deviation 1) before clustering. The profile table reports the original, unstandardized means so you can read them on the questionnaire scale.
Will I get the same segments every time?
Yes. The starting centres are chosen deterministically (a fixed first respondent, then the respondent farthest from the existing centres), so the same file, variables and k always produce the same segments. Segments are numbered from largest to smallest.
What does the index in the profile mean?
The index is the segment mean divided by the total mean, times 100. An index of 120 means the segment's average is 20% above the total; 85 means 15% below. Indexes of 110 or more are highlighted as high and 90 or less as low. Categorical columns such as age group are shown as column percentages within each segment.
Is my data uploaded anywhere?
No. The file is read and clustered in your browser tab, and the exports are generated there too. Nothing is sent to a server and no account is needed.
Sources and next steps
References & further reading
- [1]MacQueen, J. (1967). Some methods for classification and analysis of multivariate observations. Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, 1, 281–297.
- [2]Rousseeuw, P. J. (1987). Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of Computational and Applied Mathematics, 20, 53–65.doi.org
Try it on your own data — free, no signup
Upload a CSV, Excel, SPSS, Stata, SAS, R, Parquet or JSON file. Everything runs in your browser; your file never leaves your device.
Open the workspace →