Starting from a semiclassical quantization condition based on the trace for
mula, we derive a periodic-orbit formula for the distribution of spacings o
f eigenvalues with k intermediate levels. Numerical tests verify the validi
ty of this representation for the nearest-neighbor level spacing (k = 0). I
n a second part, we present an asymptotic evaluation for large spacings, wh
ere consistency with random matrix theory is achieved for large k. We also
discuss the relation with the method of Bogomolny and Keating [Phys. Rev. L
ett. 77, 1472 (1996)] for two-point correlations.