Skip to content

Friedman Test Calculator

Paste one row of scores per subject and one column per condition, and get the Friedman χ² with its tie correction, the degrees of freedom, an exact p-value, and Kendall's W as an effect size — with the ranks, rank sums, and every step of the working shown. Nemenyi and Conover pairwise comparisons then show which conditions differ. It is the rank-based alternative to a one-way repeated-measures ANOVA. Free, no sign-up.

0 subjects · 0 conditions

Enter at least two subjects and at least two conditions to see the result.

How to Use the Friedman Test Calculator

  1. 1. Paste the scores. One line per subject, one column per condition, in the same order on every line. Numbers can be separated by commas, spaces, or tabs, so a block copied from Excel or Google Sheets works as it is. A first line of words is read as the condition names.
  2. 2. Name the conditions. Optionally type the names, separated by commas, if your data has no header line.
  3. 3. Choose α. It sets the decision line under the results; the post hoc table shows exact p-values whatever you pick.
  4. 4. Read the result. A significant χ² says the conditions do not all rank alike within subjects. Kendall's W says how strongly, and the pairwise table shows where. Copy the APA line when you are done.

What the Friedman Test Does

The Friedman test asks whether k conditions, measured on the same n subjects, tend to produce different scores. Instead of comparing means it ranks each subject's scores from 1 (lowest) to k (highest), with tied scores sharing the average of their ranks, and then adds up the ranks for each condition. If the conditions made no difference, every condition would collect about the same rank sum, n(k + 1)/2. The statistic measures how far the rank sums Rⱼ stray from that: χ²F = 12 / (n k (k + 1)) × Σ Rⱼ² − 3n(k + 1).

Ties inside a subject make the ranks less spread out, so the statistic is divided by the correction C = 1 − Σ(t³ − t) / (n k (k² − 1)), where t is the size of each set of tied scores in a row. This is the version R's friedman.test and SciPy's friedmanchisquare report. Under H₀ the result approximately follows a chi-square distribution with k − 1 degrees of freedom; that approximation is rough with fewer than about ten subjects, where exact tables are more accurate.

Kendall's coefficient of concordance, W = χ²F / (n (k − 1)), is the effect size. It runs from 0 (the subjects' orderings share nothing) to 1 (every subject ranks the conditions identically).

Worked Example: Pain Ratings Under Three Treatments

Click Try an example to load pain ratings (0–10) from 12 patients who each tried a placebo, ibuprofen, and a combination treatment. The medians are 7, 5.5, and 4. Some ratings tie within a patient.

Friedman test, step by step

Rank sums: placebo 35, ibuprofen 23.5, combination 13.5 → mean ranks 2.92, 1.96, 1.13

χ²′ = 12 / (12 × 3 × 4) × (35² + 23.5² + 13.5²) − 3 × 12 × 4 = 19.29

C = 1 − 18 / (12 × 3 × 8) = 0.9375, so χ²F = 19.29 / 0.9375 = 20.58

df = 2, p = .00003; W = 20.58 / (12 × 2) = .86

In APA style: pain ratings differed across treatments, χ²(2, N = 12) = 20.58, p < .001, W = .86. The Nemenyi comparisons place the difference between placebo and the combination (q = 6.21, p < .001); placebo versus ibuprofen is borderline (q = 3.32, p = .050), and ibuprofen versus the combination is not significant (q = 2.89, p = .102).

Post Hoc Tests: Nemenyi or Conover

A significant Friedman test does not say which conditions differ. The calculator gives two standard follow-ups. Nemenyi is the rank-based analogue of Tukey's HSD: it divides each rank-sum difference by √(n k (k + 1) / 12) and refers the result to the studentized range distribution, so its p-values already account for making all the comparisons. Conover uses a t distribution on (n − 1)(k − 1) degrees of freedom with a standard error built from the sum of squared ranks; it is more powerful but its raw p-values are not family-wise, so the calculator also shows Holm-adjusted values. In the example above the two disagree about placebo versus ibuprofen — Nemenyi is borderline while Conover is decisive — so choose one before you see the data, and say which.

Friedman Test or Another Test?

SituationBetter choice
Same subjects under 3 or more conditions, roughly normal scoresRepeated measures ANOVA, which compares means
Same subjects under 3 or more conditions, ordinal or skewed scoresFriedman test
Same subjects, only two conditionsWilcoxon signed-rank test (or the sign test)
Same subjects, a yes/no outcome in 3 or more conditionsCochran's Q test
Different subjects in each groupKruskal-Wallis test

Frequently Asked Questions

What is the Friedman test used for?
It tests whether three or more related measurements — the same people at different times, or the same people under different conditions — differ in their typical rank. It is the nonparametric counterpart of the one-way repeated-measures ANOVA and suits ordinal ratings, skewed scores, and small samples where normality is doubtful.
How do I report a Friedman test in APA style?
Report the statistic as χ²(df, N = n) = value, p = value, plus an effect size: χ²(2, N = 12) = 20.58, p < .001, W = .86. Italicise N, p, and W, leave the Greek χ² upright, and drop the leading zero from p and W. Add each condition's median and the post hoc results.
What is Kendall's W and how do I read it?
Kendall's W is the Friedman statistic rescaled to run from 0 to 1: W = χ²F / (n (k − 1)). A value near 0 means subjects disagree about which condition scores highest; a value near 1 means they rank the conditions almost identically.
What post hoc test follows a significant Friedman test?
Nemenyi's test and Conover's test are the usual choices. Nemenyi is conservative and controls the family-wise error rate by itself; Conover is more powerful and is normally paired with a Holm or Bonferroni adjustment. Pick one before you look at the results, and say which in your write-up.
How do ties affect the Friedman test?
Tied scores within a subject share their average rank, which lowers the variability of the ranks. The calculator divides χ² by a tie correction so the statistic keeps the right scale, as R and SciPy do. A few ties barely move the result; many ties, such as ratings on a five-point scale, make the correction matter.
How many subjects do I need?
The chi-square p-value is a good approximation from roughly ten subjects upward; the calculator warns you below that. With fewer, use exact critical values for Friedman's test.
Can I use the Friedman test with missing data?
Not directly. It needs a score for every subject in every condition, because ranks are computed within each subject. A subject with a missing value has to be dropped, or analysed with a mixed-effects model.

Related Tools

More in Statistics Calculators

See all Statistics Calculators