Consider the order statistics fromNi.i.d. random variables uniformly distributed on the interval (0,1]. We present a general method for computing probabilities involving differences of the order statistics or linear combinations of the spacings between the order statistics. This method is based on repeated use of a basic recursion to break up the joint distribution of linear combinations of spacings into simpler components which are easily evaluated. LetS w denote the (continuous conditional) scan statistic with window length w. Let Cwdenote the number of m: w clumps among theNrandom points, where an m: w clump is defined as m points falling within an interval of length w. We apply our general method to compute the distribution ofS w (for smallN)and the lower-order moments of Cw. The final answers produced by our approach are piecewise polynomials (in w) whose coefficients are computed exactly. These expressions can be stored and later used to rapidly compute numerical answers which are accurate to any required degree of precision.