The dependence of ecosystem stability on biodiversity across spatial scales is governed by the spatial decay of correlations within and between species. Our work provides a point of reference for mechanistic models and data analyses. More generally, it illustrates the relevance of macroecology for ecosystem functioning and stability.