Britannica Sources used in this answer

How are the mean median and mode calculated from a set of data?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In mathematics, the mean, median, and mode are the three primary measures used to designate the average value of a dataset. Their calculations for ungrouped data are as follows:1

  • Mean: The arithmetic mean is calculated by finding the sum of all numbers in a set and dividing that total by the count of the numbers in the list.12
  • Median: The median is the middle value of a dataset when the numbers are arranged in order from smallest to largest. If there is an even number of observations, the median is typically the mean of the two central values.13
  • Mode: The mode is defined as the value that occurs most frequently within the list.1

It is important to note that for grouped data—where values are organized into intervals—the methods for calculating these values differ from those used for ungrouped data. Additionally, while the arithmetic mean is the most common average, other types of means, such as the geometric or quadratic mean, may be used depending on the specific features of the data being analyzed.12