The two-point correlation function of energy levels for free motion on the modular domain, both with periodic and Dirichlet boundary conditions, are explicitly computed using a generalization of the Hardy-Littlewood method. It is shown that ion the limit of small separations they show an uncorrelated behaviour and agree with the Poisson distribution but they have prominent number-theoretical oscillations at larger scale. The results agree well with numerical simulations.