Paste a comma-separated list of numbers to get the arithmetic mean, median, mode, range, and geometric mean, plus the largest and smallest values, the sum, the count, and the sorted data set.
Formula
The mean is the sum of the n values divided by n:
mean = (x1 + x2 + … + xn) / n
Sort the list in ascending order to find the median. For an odd count the median is the middle value; for an even count it is the average of the two middle values.
range = largest − smallest
The mode is the value (or values) with the highest frequency. Geometric mean is the n-th root of the product:
gmean = (x1 × x2 × … × xn)^(1/n)
If any xi is zero or negative, geometric mean is reported as 0.
Mean, median, mode, and range each describe a different aspect of the same list. An outlier pulls the mean and the range far more than the median, so looking at all four together is more informative than any one figure alone.
Examples
Default list 10, 2, 38, 23, 38, 23, 21
The sum is 155 and n is 7, so the mean is 22.142857142857. Sorted, the middle value is 23 (the median). Largest 38 minus smallest 2 is a range of 36. Both 38 and 23 appear twice, so the mode is 38, 23, each appeared 2 times (first-appearance order). The geometric mean is 16.412764443111.
All unique values 1, 2, 3, 4
The mean and median are both 2.5, the range is 3, and the mode is All values appeared just once. The geometric mean is 2.2133638394006.
Negatives and zeros
For -2, 10, 0, 10, -2 the mean is 3.2, the median is 0, and the range
is 12. The mode is -2, 10, each appeared 2 times. Because the list
includes zero and negatives, the geometric mean is 0.