The variance is the second central moment of a continuous probability distribution. The variance of a continuous uniform distribution on the interval [a, b] is (1/12)*(b - a)^2.
The variance can be derived from the moment generating function, or by integrating the quantity (1/(b-a))*(x - mu) dx over the range x = a to b, where mu is the distribution mean. For the uniform distribution, central moments are calculated analytically from the formula ( (a - b)^n + (b - a)^n )/( 2^(n+1)*(n+1) ). Set n = 2 to calculate the variance. The mean, the first central moment, is calculated by setting n = 1.