We present exact expressions for certain integrated correlators of four superconformal primary operators in the stress tensor multiplet of N = 4 supersymmetric Yang-Mills (SYM) theory with classical gauge group, GN = SO(2N ), SO(2N + 1), U Sp(2N ). These integrated correlators are expressed as two-dimensional lattice sums by considering derivatives of the localised partition functions, generalising the expression obtained for SU (N ) in our previous works. These expressions are manifestly covariant under Goddard-Nuyts-Olive duality. The integrated correlators can also be formally written as infinite sums of non-holomorphic Eisenstein series with integer indices and rational coefficients. Furthermore, the action of the hyperbolic Laplace operator with respect to the complex coupling τ = θ/(2π)on any integrated correlator for gauge group GN relates it to a linear combination of correlators with gauge groups GN+1, GN and GN−1. These "Laplace-difference equations" determine the expressions of integrated correlators for all classical gauge groups for any value of N in terms of the correlator for the gauge group SU (2). The perturbation expansions of these integrated correlators for any finite value of N agree with properties obtained from perturbative Yang-Mills quantum field theory, together with various multi-instanton calculations which are also shown to agree with those determined by supersymmetric localisation. The coefficients of terms in the large-N expansion are sums of non-holomorphic Eisenstein series with half-integer indices, which extend recent results and make contact with low order terms in the low energy expansion of type IIB superstring theory in an AdS5 × S 5 /Z2 background.