We bound the variance and other moments of a random vector based on the range of its realizations, thus generalizing inequalities of Popoviciu and of Bhatia and Davis concerning measures on the line to several dimensions. This is done using convex duality and (infinite-dimensional) linear programming. The following consequence of our bounds exhibits symmetry breaking, provides a new proof of Jung’s theorem, and turns out to have applications to the aggregation dynamics modelling attractive–repulsive interactions: among probability measures on [Formula: see text] whose support has diameter at most [Formula: see text], we show that the variance around the mean is maximized precisely by those measures that assign mass [Formula: see text] to each vertex of a standard simplex. For [Formula: see text], the [Formula: see text] th moment—optimally centered—is maximized by the same measures among those satisfying the diameter constraint.