Degrees of freedom
The degrees of freedom associated with each explained sum of squares is equal to the number of parameters in the term that is being added (excluding the baseline parameter that is constrained to be zero). Adding any factor with g levels therefore results in an explained sum of squares with (g - 1) degrees of freedom.
The residual sum of squares has degrees of freedom equal to the number of observations minus the total number of parameters in the constant and factor terms. Adding a factor with g levels therefore also reduces the residual degrees of freedom by (g - 1).
Sums of squares table
As explained in the previous page, if the two factors are orthogonal,
The explained sum of squares for X does not depend on whether Z is already in the model.
Similarly, the explained sum of squares for Z does not depend on whether X is already in the model.
As a result, we can show all explained sums of squares (and their degrees of freedom) in a single table along with the residual sum of squares from the model with both factors. The sum of these three sums of squares (and their degrees of freedom) is the total sum of squares and its degrees of freedom.
Example
The diagram below shows data from an orthogonal design with two factors.
Drag the factors to reorder them and observe that the explained sums of squares do not change.
For orthogonal experiments, there is only a single sum of squares table and the explained sums of squares can be labeled with the names of the variables without mentioning the fitting order.