Mean, Median and Mode Calculator

Enter a list of numbers to get the mean, median, mode, range and standard deviation.

Enter the values to see the result here.

Formula

For nn values x1,…,xnx_1, \dots, x_n:

xˉ=1n∑i=1nxi,σ=1n∑(xi−xˉ)2,s=1n−1∑(xi−xˉ)2\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i,\qquad \sigma = \sqrt{\frac{1}{n}\sum (x_i - \bar{x})^2},\qquad s = \sqrt{\frac{1}{n-1}\sum (x_i - \bar{x})^2}

The median is the middle value of the sorted list, or the mean of the two middle values when nn is even. The mode is the value that occurs most often. The range is the maximum minus the minimum.

Worked example

Test scores: 12, 15, 15, 18, 22, 30.

  • Sum: 112, count 6, so the mean is 112/6=18.67112 / 6 = 18.67.
  • Sorted middle values 15 and 18 give a median of 16.516.5.
  • 15 appears twice, so the mode is 15.
  • Range: 30−12=1830 - 12 = 18.
  • Population SD: deviations squared sum to 211.33, so σ=211.33/6=5.93\sigma = \sqrt{211.33 / 6} = 5.93.

The mean sits above the median because the 30 pulls it upward.

Common mistakes

  • Using the mean for data with outliers such as house prices or salaries.
  • Forgetting to sort before finding the median.
  • Reporting “no mode” as zero.
  • Using the population standard deviation on a small sample, which understates variability.

Frequently asked questions

When is the median better than the mean?

When a few extreme values would drag the mean away from the typical case. In salaries of 10, 11, 12, 12 and 90, the mean is 27 but the median is 12, which describes most people better.

What if there is no mode?

If every value appears once there is no mode, and the tool says so. If several values tie for most frequent, they are all listed.

Population or sample standard deviation?

Use the population figure when your list is the entire group, such as all students in a class. Use the sample figure when the list is a sample of a larger group; it divides by n − 1 to correct for the sample's tendency to understate spread.

Can I paste numbers from a spreadsheet?

Yes. Commas, spaces, semicolons and new lines all separate values, and Arabic-Indic digits are understood. Anything that is not a number is listed as ignored.

Related calculators