Each row is a subject (block). Each column is a treatment or condition being compared.
📋 Paste data from spreadsheet / CSV
Supports comma, tab, semicolon, or space separators. One subject per line.
Mean Ranks per Treatment
Use the +/− buttons to set the number of subjects (rows) and treatments/conditions (columns). Minimum: 2 treatments, 3 subjects.
Type values directly into the table. Each row is one subject measured under all treatments. Or use the paste area to load data from Excel/CSV.
Click "Run Friedman Test". Results include the χ² statistic, degrees of freedom, p-value, and mean ranks for each treatment.
If p < 0.05, at least one treatment differs significantly. Inspect the mean ranks to see which conditions rank higher or lower on average.
The Friedman test is a nonparametric statistical test developed by the economist Milton Friedman in 1937. It detects differences across multiple repeated measurements of the same subjects (or matched blocks) — the nonparametric equivalent of one-way repeated-measures ANOVA.
When to Use the Friedman Test
- The data is ordinal or continuous but not normally distributed
- Assumptions of repeated-measures ANOVA are violated
- Sample sizes are small and normality cannot be established
Assumptions
- Related samples / complete blocks: Each subject is measured under all conditions.
- Ordinal or continuous scale: The dependent variable must be at least ordinal.
- No specific distribution required: Unlike ANOVA, normality is not assumed.
Frequently Asked Questions
Q1: How is the Friedman statistic calculated?
Within each row the values are ranked 1 to k. The column rank sums Rj are then used in:
\[\chi^2_F = \frac{12}{nk(k+1)} \sum_{j=1}^{k} R_j^2 \;-\; 3n(k+1)\]For large samples, χ²F follows a chi-squared distribution with k−1 degrees of freedom.
Q2: How are ties handled?
Tied values within the same row receive the average of the ranks they would occupy. A tie-correction factor is applied automatically.
Q3: What should I do after a significant result?
Follow up with pairwise post-hoc comparisons using the Wilcoxon signed-rank test with Bonferroni or Holm correction, or Dunn's test.
Q4: How does the Friedman test differ from Kruskal-Wallis?
Kruskal-Wallis is for independent groups; Friedman is for related/repeated groups and accounts for within-subject correlation.
How to Do This in Statistical Software
This calculator works directly with a subjects × treatments table. Here's how to reproduce the same test elsewhere, using the default 5-subject, 3-treatment example above.
How to Do This in R
R's built-in friedman.test() expects a matrix with subjects as rows and treatments as columns:
data <- matrix(c(85,90,78, 72,88,69, 91,95,87, 68,74,65, 79,83,71),
nrow = 5, byrow = TRUE)
friedman.test(data)
How to Do This in SPSS
Analyze → Nonparametric Tests → Legacy Dialogs → K Related Samples. Move all your treatment/condition variables into the Test Variables box (each subject's measurements should be in separate columns, one row per subject), and make sure Friedman is checked under Test Type.
How to Do This in JASP
ANOVA → Repeated Measures ANOVA → Friedman. Move each treatment's column into the Measures box. JASP outputs the χ² statistic, df, p-value, and Kendall's W (a normalized effect size), and offers pairwise Durbin-Conover post-hoc comparisons directly.