We study in Ising spin glasses the finite-size effects near the spin-glass transition in zero field and at the de Almeida–Thouless transition in a field by Monte Carlo methods and by analytical approximations. In zero field, the finite-size scaling function associated with the spin-glass susceptibility of the Sherrington-Kirkpatrick mean-field spin-glass model is of the same form as that of one-dimensional spin-glass models with power-law long-range interactions in the regime where they can be a proxy for the Edwards-Anderson short-range spin-glass model above the upper critical dimension. We also calculate a simple analytical approximation for the spin-glass susceptibility crossover function. The behavior of the spin-glass susceptibility near the de Almeida–Thouless transition line has also been studied, but here we have only been able to obtain analytically its behavior in the asymptotic limit above and below the transition. We have also simulated the one-dimensional system in a field in the non-mean-field regime to illustrate that when the Imry-Ma droplet length scale exceeds the system size one can then be erroneously lead to conclude that there is a de Almeida–Thouless transition even though it is absent.