Statistics & probability

One factor PERMANOVA calculator from a distance matrix

Enter a complete dissimilarity matrix and one categorical group label for every object in the matching order.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Enter a complete dissimilarity matrix and one categorical group label for every object in the matching order. This page supports a single fixed factor with two through eight groups and at least two objects per group. Distances may come from multivariate features, but the feature transformation and distance definition must be decided before the matrix is entered.

THE FORMULASS_T=Σ(i<j)dᵢⱼ²/n; SS_W=Σ_g Σ(i<j in g)dᵢⱼ²/n_g; F=[(SS_T−SS_W)/(k−1)]/[SS_W/(n−k)]; R²=1−SS_W/SS_T.

A worked example

Distances from 0,1,2 in group A and 5,6,8 in group B give total SS49.3333333, within SS6.6666667, pseudo-F25.6 and R²0.864864865.

Good to know

6–100 objects, 2–8 independent groups of at least two; complete symmetric zero-diagonal dissimilarities. Return pseudo-F, R squared and plus-one seeded permutation p; B=999–4999, 20 million pair-evaluation cap. One fixed categorical factor, no covariates, interactions, repeated measures or automatic dispersion correction; explain centroid/dispersion confounding.

Arrange dissimilarities and group labels

Enter a complete dissimilarity matrix and one categorical group label for every object in the matching order. This page supports a single fixed factor with two through eight groups and at least two objects per group. Distances may come from multivariate features, but the feature transformation and distance definition must be decided before the matrix is entered.

Zero diagonal, symmetry, finite values, and nonnegativity are necessary numeric requirements. They do not certify that a dissimilarity is scientifically suitable or Euclidean. A Bray–Curtis matrix, for example, carries a different geometry from ordinary Euclidean distances. Preserve the preprocessing choices and sampling unit when reporting the result, rather than calling all dissimilarity inputs equivalent measurements of variation.

A one-factor squared-distance partitionEuclidean example: distances from a single line012568Group AGroup BTotal SS = 49.3333; within SS = 6.6667Between SS = 42.6667 → pseudo-F = 25.6
Scroll across to see the full diagram.
Six observations on a line yield the same partition as ordinary one-way ANOVA; labels alone are permuted.

Compare this with the Multivariate energy distance two sample permutation test calculator. Partitions squared pairwise dissimilarity into group sums of squares and computes a multi-group pseudo-F under label permutations. Existing energy-distance tool is a two-sample Euclidean V-statistic and does not offer dissimilarity-matrix ANOVA or multi-group variance partitioning.

Partition squared pairwise separation

For n objects the total sum of squares is the sum of squared distances over unordered pairs divided by n. Within-group variation is the sum, over groups, of the corresponding within-group squared-distance sum divided by that group's size. Between-group variation is total minus within. This construction agrees with ordinary one-way ANOVA when the input distances come from one-dimensional Euclidean observations.

The pseudo-F statistic divides between-group variation by k minus one, then divides by within-group variation over n minus k. R squared is the between-group fraction of total variation. These quantities describe the entered dissimilarity geometry. The word pseudo distinguishes the permutation-based multivariate calculation from an automatic use of a textbook F distribution with the same displayed degrees of freedom.

Shuffle labels while retaining group sizes

The test holds the dissimilarity matrix fixed and permutes the group labels, so each simulated allocation has the same group sizes as observed. For each allocation it recomputes pseudo-F. The Monte Carlo p is one plus the number of statistics at least as large as observed, divided by one plus the number of randomized allocations.

Unrestricted label exchangeability is central. A treatment assigned within blocks, repeated observations from subjects, or temporal dependence needs a restricted design-aware procedure. This interface does not accept strata or covariates. It also does not fit interactions or perform a sequence of marginal and conditional tests. Its one-factor scope makes the sums of squares transparent, but limits the range of study designs it can analyze.

Check the two-group worked example

The default dissimilarities are absolute differences among measurements 0, 1, 2, 5, 6, and 8. The first three observations belong to A and the last three to B. There are fifteen distinct pairwise separations. Squaring and summing those separations gives a total sum of squares of 49.3333333 after division by six.

Within-group variation is 6.6666667, leaving 42.6666667 between groups. The group and residual degrees of freedom are one and four. Their mean squares give pseudo-F equal to 25.6, while R squared is approximately 0.864864865. These deterministic quantities can be checked independently of the random-number generator; the sampled permutation p additionally depends on the seed and number of shuffles.

Interpret the partition diagram

The example figure distinguishes within-group connections from connections between groups. It is a geometric explanation of the squared-distance bookkeeping, rather than a map of the original observations. Short connections within both groups and longer connections between them support the large default pseudo-F. The total partition must account for every pair with the correct group-size divisor.

A permutation reference distribution, when displayed, compares the observed statistic with values produced under relabeled memberships. A distant right-tail observation supplies evidence against exchangeability under this particular design. The horizontal position of that statistic is not an effect in the original measurement units. Read R squared alongside pseudo-F when describing how much of the entered distance variation the factor accounts for.

Dispersion can affect the inference

A significant PERMANOVA result need not isolate a difference in group centroids. Unequal dispersions, especially combined with unequal sample sizes, can affect the test. Examine group spread and the study design instead of translating significance directly into a location-only claim. This calculator supplies no automatic dispersion correction and does not replace a dedicated assessment of distances to group centroids.

The page accepts six through one hundred objects and 999 through 4,999 permutations within a twenty-million pair-evaluation budget. Zero total variation or a zero residual denominator prevents an informative finite statistic. Some non-Euclidean dissimilarities also produce awkward partitions; an unresolved or invalid partition should be investigated rather than clipped into an apparently ordinary ANOVA table. Model transformations are not applied silently.

Distinguish PERMANOVA from energy distance

An energy-distance two-sample tool compares two multivariate empirical distributions through a particular Euclidean statistic. This calculator accepts a supplied matrix and permits several groups while partitioning squared dissimilarities. A positive energy statistic and a large PERMANOVA pseudo-F are related ways of inspecting group structure, but they use different constructions and should not be presented as interchangeable numerical results.

For reproducibility save group order, matrix, distance definition, sample counts, sums of squares, degrees of freedom, R squared, pseudo-F, seed, and permutation count. Explain whether groups arose through random assignment or observational sampling. The p summarizes compatibility with a label-exchangeability null; it does not estimate a probability that a treatment is effective or establish that a factor explains a causal mechanism.

A few questions, answered

Can I use more than two groups?

Yes. Two through eight groups are supported, with at least two observations each and one fixed factor.

Is pseudo-F compared with an F distribution?

No. This page estimates its upper tail through label permutations with fixed group sizes.

Does significance prove different centroids?

No. Differences in dispersion can affect the result, particularly with unequal group sizes.

Can I enter repeated-subject samples?

The unrestricted permutation design is not suitable for dependent rows. This page has no subject blocks or restricted permutations.

Find your calculator

Start typing to explore the library.