Statistics Formulas

Look up descriptive statistics formulas for mean, median, mode, variance, standard deviation, and quartiles. Check them against a dataset.

Result
—

How to calculate

Enter your dataset to calculate the summary measures below. Compare the sample and population settings to see how the variance divisor changes.

Worked example

Use Dataset values separated by spaces or commas 2, 4, 4, 6 · Variance and standard deviation type Sample. The result is 4.

Input and result notes

Enter up to 100 numbers. Separate values with commas, spaces, or line breaks. Omit thousands separators.

Mean, geometric mean, and harmonic mean

For the arithmetic mean, divide the sum of all values by the count. For the geometric mean, take the nth root of the product of n nonnegative values. For the harmonic mean of positive values, divide n by the sum of their reciprocals.

Median, mode, and range

Sort the values. The median is the middle value, or the mean of the middle pair for an even count. The mode is any value tied for the highest frequency when at least one value repeats. Subtract the minimum from the maximum for the range. Average those extremes for the midrange.

Variance and standard deviation

Subtract the arithmetic mean from each observation, square the differences, and sum them. Divide by n for a population variance or n − 1 for a sample variance. Take the square root for standard deviation. The standard error of the mean for independent observations is the standard deviation divided by the square root of n.

Quartiles and outlier fences

Locate Q1 and Q3 at 25% and 75% of the way from the first rank to the last rank, with linear interpolation between values. Subtract Q1 from Q3 for the IQR. Common inner fences are Q1 − 1.5 × IQR and Q3 + 1.5 × IQR.

Root mean square and absolute deviations

Average the squared observations and take the square root for RMS. For the mean absolute deviation, average the absolute differences from the mean. For the median absolute deviation, take the median of absolute differences from the median.

Skewness and excess kurtosis

Population skewness divides the third central moment by standard deviation cubed. Excess kurtosis divides the fourth central moment by standard deviation to the fourth power and subtracts three. The linked Skewness Calculator also provides sample corrections.

NIST Engineering Statistics Handbook on measures of scale

Related calculators