StatFas.com

Dendrogram Explained: How to Make, Read and Report Hierarchical Clustering

By StatFas · Updated 2026-11-09

A dendrogram shows how observations merge into clusters step by step, so you can see natural groups in samples or variables without defining them in advance. This guide explains how to read the tree, how to choose distance and linkage, how to decide the number of clusters, and how to report the result in APA7.

Open the free Dendrogram GeneratorStep-by-step tutorial (StatFas, SPSS, R, Python)

What is a dendrogram?

A dendrogram is the tree produced by hierarchical clustering. Each leaf is an observation (a sample, patient or gene). At the bottom every observation is its own cluster. At each step the two closest clusters are merged, and the height of the join records how far apart they were. Hierarchical clustering is a standard tool for gene expression and other omics data (Eisen et al., 1998), patient stratification and ecological data.

How to read a dendrogram

Choose a distance and a linkage

The distance defines similarity between observations. Euclidean distance on standardized variables is the usual default; correlation-based distance suits profiles such as gene expression. The linkage defines the distance between clusters. Ward’s method (Ward, 1963) minimizes the increase in within-cluster variance and tends to give compact, similar-sized clusters. Complete linkage gives tight clusters, average linkage is a compromise, and single linkage can chain observations into long straggling clusters. Standardize variables first if they have different units.

How many clusters? Silhouette width

The tree itself does not tell you how many clusters there are. The silhouette width (Rousseeuw, 1987) compares, for each observation, its distance to its own cluster with its distance to the nearest other cluster; values near 1 mean well-clustered, near 0 mean borderline. The Dendrogram Generator computes the mean silhouette width for 2 to 10 clusters and uses the best one unless you set a number yourself.

Does your data cluster at all? Cophenetic correlation and Hopkins

Two checks protect against over-interpretation. The cophenetic correlation (Sokal & Rohlf, 1962) correlates the original distances with the distances implied by the tree; values above about .75 mean the tree represents the data faithfully. The Hopkins statistic (Hopkins & Skellam, 1954) tests clustering tendency: about .50 means the data are spatially random, and values above about .75 suggest real clusters. If you supply a known-group column, the generator also reports the adjusted Rand index (Hubert & Arabie, 1985) to show how well clusters match known groups.

Step by step: make a dendrogram in StatFas

  1. Open the Dendrogram Generator.
  2. Load the example data (30 invented tumour samples with ten gene expression values), paste a table, or upload a CSV, Excel or SPSS file with numeric columns, an optional label column and an optional known-group column.
  3. Choose whether to cluster observations or variables, the distance (Euclidean, Manhattan or 1 − Pearson correlation), the linkage (Ward, complete, average or single) and whether to standardize. Leave Clusters to cut at 0 to use the best silhouette width.
  4. Run the analysis to get the tree, cut, cluster sizes, silhouette widths, cophenetic correlation, Hopkins statistic and APA7 interpretation.
  5. Style the figure, then log in (free) to download it, the tables and a Word report.

The tutorial repeats the analysis in SPSS, R, Python and MATLAB.

How to report it in APA7

State the distance, the linkage, how the number of clusters was chosen and the quality measures. Example wording (illustrative numbers):

Thirty tumour samples were clustered hierarchically using Ward’s method on Euclidean distances between standardized expression values of ten genes. The data showed clustering tendency (Hopkins statistic = .78). The mean silhouette width was highest for three clusters (0.41), and the dendrogram represented the distances well (cophenetic r = .81; Figure 1).

Common mistakes to avoid

Frequently asked questions

Which linkage method should I choose?

Ward’s method is a good default for compact clusters on standardized data. Try average or complete linkage as a check; if conclusions change a lot, the clusters are not robust.

What is the difference between hierarchical clustering and k-means?

Hierarchical clustering builds a tree and does not need the number of clusters in advance. k-means needs k up front and is faster for very large data.

Can I cluster variables instead of samples?

Yes. Transpose the table so variables become rows, or cluster on 1 − |r| distance to group related variables. See also the correlogram.

Can I make a dendrogram for free?

Yes. The StatFas generator is free to run in your browser; a free account is needed only to download results.

Try it now. Run the analysis in your browser with the free Dendrogram Generator. No account is needed to analyze; a free StatFas account is needed only to download figures, tables and the Word report.

Related tools, guides and tutorials

References

  1. American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.).
  2. Eisen, M. B., Spellman, P. T., Brown, P. O., & Botstein, D. (1998). Cluster analysis and display of genome-wide expression patterns. Proceedings of the National Academy of Sciences, 95(25), 14863–14868.
  3. Hopkins, B., & Skellam, J. G. (1954). A new method for determining the type of distribution of plant individuals. Annals of Botany, 18(2), 213–227.
  4. Hubert, L., & Arabie, P. (1985). Comparing partitions. Journal of Classification, 2(1), 193–218.
  5. 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.
  6. Sokal, R. R., & Rohlf, F. J. (1962). The comparison of dendrograms by objective methods. Taxon, 11(2), 33–40.
  7. Ward, J. H. (1963). Hierarchical grouping to optimize an objective function. Journal of the American Statistical Association, 58(301), 236–244.