Deterministic and stochastic factors shape ecological communities. However, a quantitative synthesis of the factors underlying the balance among different assembly processes is lacking. Here, we synthesized data from 149 datasets covering major biotic groups and ecosystem types globally. We used a null model approach based on Raup-Crick dissimilarities and Bayesian meta-regression to analyze the data. We found that communities were more under homogeneous selection than heterogeneous selection across biotic taxa and ecosystems. Environment selected species homogeneously more often at small scales while heterogeneously more often at large scales. Stochasticity also showed scale-dependence as stochastic community assembly increased with study scale. Homogeneous and heterogeneous selection were strongest at high latitudes while stochastic factors were strongest in tropics. Marine systems had the highest degree of homogeneous selection and the lowest stochasticity. We provide the first analysis of community assembly across taxa and ecosystems which should be important for a better understanding of how communities respond to environmental change.