Define the function $D: \mathbb{R}_+^n \to \mathbb{R}$ by $$D(x_1, \dots, x_n) = \frac{1}{n} \sum_{i=1}^n x_i - \left( \prod_{i=1}^n x_i \right)^{1/n},$$ the difference between the arithmetic mean and geometric mean.
By the arithmetic-mean geometric-mean (AMGM) inequality, we know that $$0 \le D(x_1, \dots, x_n)$$ for all choices of points $x_1, \dots, x_n \ge 0$. We further know that $D(x_1, \dots, x_n) = 0$ if and only if $x_1 = \dots = x_n$, so that there is an upper bound $D(x_1, \dots, x_n) \le 0$ if and only if $x_1 = \dots = x_n$.
This leads me to wonder whether there is a (nontrivial) upper bound, say $B(x_1, \dots, x_n)$, for $D(x_1, \dots, x_n)$ in general which, for instance, satisfies that $B(x_1, \dots, x_n) = 0$ if and only if $x_1 = \dots = x_n$. Is there?
Note, I'm particularly interested in being able to quantify statements such as: if the points $x_1, \dots, x_n$ are "nearly equal", then the arithmetic mean and geometric mean will be "nearly equal".