Degrees of freedom refers to the maximum number of values that have the freedom to vary in a data sample.
It is used in many contexts throughout statistics including hypothesis tests, probability distributions, and regression analysis.
Formula to calculate degrees of freedom.

N is the number of values in a data set.
Example:
Calculate the degrees of freedom of the following data set.
19, 17, 16, 14, 12.

Therefore, four numbers has the freedom to vary as long as the mean remains the same.