How to Compute ANOVA by Hand
One-way analysis of variance partitions the total variation in a single response variable into a between-groups component and a within-groups component. The F statistic compares the two. This page walks through the partition step by step using a small numeric example so you can verify any automated output by hand.
Sums of squares from scratch
Compute the grand mean of all observations, then the deviation of each observation from the grand mean. Square each deviation and sum them: this is the total sum of squares (SST). The between-group sum of squares (SSB, also called the treatment SS) is the sum over groups of the squared deviation of each group mean from the grand mean, weighted by the group size. The within-group sum of squares (SSW, also called the error SS) is the sum within each group of the squared deviation of each observation from its own group mean. Algebraically SST equals SSB plus SSW. The classical references for this partition are Fisher's 1925 Statistical Methods for Research Workers and Snedecor and Cochran's Statistical Methods.
Mean squares and the F ratio
Each sum of squares is divided by its degrees of freedom to give a mean square. The treatment df is the number of groups minus one. The error df is the total sample size minus the number of groups. MS_treat equals SSB divided by treatment df. MS_error equals SSW divided by error df. The F statistic is MS_treat divided by MS_error. Under the null hypothesis that all group means are equal, this ratio follows the F distribution with (treatment df, error df) degrees of freedom. A large F is evidence against the null.
Looking up the critical F
Compare the computed F to the critical value at your chosen alpha level (commonly 0.05) and the appropriate degrees of freedom. If the computed F exceeds the critical value, reject the null. Modern practice reports the exact p-value rather than the binary reject or fail-to-reject decision: p is the area to the right of the computed F under the F distribution. The two procedures, comparing F to the critical value and comparing p to alpha, give the same decision; the p-value just carries more information.