SPSS command: SPSS QUICK CLUSTER
K-means cluster analysis in your browser
K-means assigns every case to the nearest of k cluster centers and moves the centers until assignments settle.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs SPSS QUICK CLUSTER: SPSS's single-pass rule for well-separated initial centers, optional running means, then nearest-center iterations, with no random starts, so the same file always gives the same clusters.
- Where each cluster sits: the final cluster centers are the cluster means of every variable.
- How far apart the clusters are, from the Euclidean distances between final cluster centers.
- Which variables separate the clusters most, from the descriptive ANOVA F values.
- Which cluster each case belongs to and how far it lies from its center.
When to use it
Use it when
- Continuous variables on comparable scales, such as several 0–100 importance ratings, and a number of segments fixed in advance.
- Larger files where a full distance matrix would be slow: k-means only compares cases with k centers.
- Refining a solution found by hierarchical clustering, using its number of clusters.
Use something else when
- Categorical variables: k-means needs numeric distances; use TwoStep cluster for mixed data.
- Variables in very different units, unless you standardize them first, because the largest-scale variable would dominate.
- You do not know k at all: compare several values, or start with TwoStep or hierarchical clustering.
How to run it in Crosstabs
- 01
Select K-means cluster
Switch the workspace to Statistics mode and choose K-means cluster (QUICK CLUSTER) under Classify.
- 02
Pick the variables to cluster
Tick numeric variables under Variables to cluster, and optionally choose a variable under Label cases by for the membership table.
- 03
Set the number of clusters
Enter the Number of clusters (2 to 50; the default is 2).
- 04
Adjust iteration options
Maximum iterations defaults to 10 and the Convergence criterion to 0, as in SPSS. Tick Use running means to update centers after each case is assigned.
- 05
Run and check convergence
Run, then read the footnote under Iteration History: if iterations stopped at the maximum, raise Maximum iterations and run again. Variables are used on their original scale.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
60 synthetic survey respondents rating how important price, quality and service are (0–100), generated as three attitude profiles of 20 with normal noise and a fixed seed. All three ratings share one scale, so they are clustered unstandardized with k = 3, at most 10 iterations and convergence criterion 0 (the panel defaults).
| Iteration | 1 | 2 | 3 |
|---|---|---|---|
| 1 | 16.407 | 25.814 | 20.385 |
| 2 | 0.000 | 1.684 | 1.335 |
| 3 | 0.000 | 0.000 | 0.000 |
Convergence achieved due to no or small change in cluster centers.
| Item | 1 | 2 | 3 |
|---|---|---|---|
| price | 80.30 | 39.10 | 52.10 |
| quality | 45.95 | 83.30 | 58.90 |
| service | 40.90 | 52.05 | 87.95 |
| Item | Cluster Mean Square | df | Error Mean Square | df | F | Sig. |
|---|---|---|---|---|---|---|
| price | 8872.27 | 2 | 80.00 | 57 | 110.91 | <.001 |
| quality | 7193.62 | 2 | 100.05 | 57 | 71.90 | <.001 |
| service | 12089.45 | 2 | 69.54 | 57 | 173.85 | <.001 |
The F tests are descriptive only: clusters were chosen to maximize differences, so the significance levels are not corrected and cannot test equal cluster means.
| Cluster | N |
|---|---|
| 1 | 20 |
| 2 | 20 |
| 3 | 20 |
| Valid N | 60 |
| Missing N | 0 |
How to read it
K-means converged after 3 iterations and split the 60 respondents into clusters of 20, 20, 20. The highest final center in clusters 1, 2 and 3 is price, quality, service respectively, so the clusters read as respondents driven by one priority each. The ANOVA F values (largest 173.85) show which rating separates the clusters most, but as the footnote says they are descriptive, not tests. The average silhouette is 0.696.
Output tables explained
- Initial Cluster Centers
- The k cases chosen by SPSS's rule as starting centers, picked to be far apart.
- Iteration History
- How far each center moved at each iteration; a footnote says whether convergence was achieved or the maximum was reached.
- Final Cluster Centers
- The mean of every variable in each cluster: the basis for naming the segments.
- Distances between Final Cluster Centers
- Euclidean distances between every pair of final centers; small values flag clusters that may be worth merging.
- ANOVA
- Cluster and error mean squares with F for each variable. The F values rank variables by how much they separate the clusters; the significance levels are descriptive only.
- Number of Cases in each Cluster
- Cluster sizes with valid and missing N; Cluster Membership then lists each case's cluster and its distance to the center.
Assumptions and notes
- Distances are Euclidean on the raw values, so variables should share a scale or be standardized beforehand.
- K-means favours compact, roughly spherical clusters of similar spread; elongated or nested groups are split badly.
- Cases with a missing value on any clustering variable are excluded listwise, and outliers can become their own initial center.
- A workspace weight is not applied: the procedure assigns individual cases.
How the results are validated
QUICK CLUSTER is checked on 140 cases with k = 3 and k = 4: initial centers against an independent NumPy implementation of the SPSS initial-center rule, and iterations against scikit-learn 1.9.1 Lloyd k-means started from those centers. Initial and final centers agree to 10 decimal places, memberships are identical and the ANOVA F values agree with scipy.stats.f_oneway to 9 decimals; the running-means option is checked against a NumPy implementation of the update step, and the default 10-iteration limit is tested. Validation evidence
Questions
Why do I get the same clusters every time?
QUICK CLUSTER does not use random starts. Initial centers come from a deterministic pass over the file, so results are reproducible, though reordering cases can change them.
How do I choose the number of clusters?
Run several values of k and compare the final centers for interpretability, the distances between centers and the average silhouette shown in the summary line. A hierarchical cluster on a sample can suggest a starting k.
Can I trust the ANOVA significance levels?
Not as tests. The clusters were chosen to maximise differences, so the F values will be large by construction. Use them only to compare which variables separate the clusters most.
What do running means change?
With Use running means the centers are updated each time a case is assigned instead of after a full pass. Results can differ slightly; the SPSS default is off.
Is this the same as the Segment Builder?
No. The Statistics-mode panel follows SPSS QUICK CLUSTER; the Segment Builder uses a separate deterministic k-means for quick segmentation with profiles.
Related procedures
- Hierarchical ClusterCLUSTER
- TwoStep ClusterTWOSTEP CLUSTER
- Distances (Proximities)PROXIMITIES
- Discriminant AnalysisDISCRIMINANT
- DescriptivesDESCRIPTIVES
- Free SPSS alternative: full coverage list
Run K-Means Cluster on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.