The range is maximum minus minimum. Mean deviation about the mean averages \(\lvert x-\bar x\rvert\). Both are in the original units.
For a population of \(N\) values, \(\sigma^2=\sum(x-\bar x)^2/N=\sum x^2/N-\bar x^2\). The standard deviation \(\sigma\) is the nonnegative square root.
Use weights \(f_i\) and class midpoints \(x_i\) for grouped estimates. If \(u_i=(x_i-A)/h\) with step \(h\), then \(\sigma_x=h\sigma_u\) for \(h>0\).