The degrees of freedom is calculated as df = 1/A - (3/16) * A + (3/64) * A2 + 0.25. A is defined as follows:
where
d2(n) is the expected value of the range of n independent normally distributed variables with unit standard deviation
d3(n) is the standard deviation of the range of n independent normally distributed variables with unit standard deviation
For more information, see David (1951).