In ANOVA, the sum of squares is used to determine whether or not there is a statistically significant difference between the group means.
In analysis of variance (ANOVA), the total sum of squares helps express the total variation that can be attributed to various factors.
Sum of Squares(Between The Groups)=((Group mean-mean of all the combined groups’ data)^2) x the number of values in each group), do that for all the group means you have and add them up. Sum of Squares(Within The Groups)=Subtract the mean of each group from each individual value within that group, then square each. Add up all the individual results obtained from each group altogether.