Statistics Calculators
Mean, Median, Mode Calculator


Mean, Median, Mode Calculator

Quickly calculate the mean, median, mode, and range of any data set. Use our free statistics calculator to find the average and central tendency instantly.

Result
Mean x̄ 16.75 Outliers 6, 33, 35
Median x̃ 15 Quartile Q1 12.5
Mode 15 appeared 3 times Quartile Q2 15
Range 29 Quartile Q3 16
Minimum 6 Interquartile Range IQR 3.5
Maximum 35
Sum 201
Count n 12

There was an error with your calculation.

Last updated: June 26, 2026

Table of Contents

  1. Measures of Central Tendency
  2. Mean Calculator
  3. Average for the sample and the population
  4. Example of calculating the mean
  5. Median Calculator
  6. Example of calculating the median
  7. The Difference Between the Mean and the Median
  8. Mode Calculator
  9. Example of mode calculation
  10. Measures of dispersion
  11. Range Calculator
  12. Example of Calculating Range
  13. Quartile Calculator
    1. Calculation of quartiles
  14. A quartile calculation example
  15. Inter-quartile range calculator
  16. IQR Calculation Example
  17. Results

Mean, Median, Mode Calculator

Measures of Central Tendency

Raw statistical data in tables and graphs can often be difficult to interpret at a glance. To extract meaningful insights, we need to summarize data sets and identify their key characteristics.

In statistics, various metrics are used to summarize and describe data. Some metrics identify the center of the data set, known as measures of central tendency. Other metrics, called measures of dispersion, tell us how scattered or spread out the data values are. Additionally, measures of position reveal the proportion of data that falls below a specific value.

The primary purpose of this statistics calculator is to compute measures of central tendency—specifically the mean and median—which represent the typical or central value within a dataset. The secondary purpose of this tool is to determine the degree of variation in your data by calculating the range, quartiles, and interquartile range (IQR).

Mean Calculator

The mean is the arithmetic average, calculated by adding all the values together and dividing by the total number of values. It is the most commonly used metric for finding the average and is calculated using the following formula for a sample:

$$\bar{x}=\frac{x₁+x₂+x₃+\ldots+x_n}{n}=\frac{\sum_{}^{}x}{n}$$

The formula for calculating the mean of a complete population is:

$$\mu=\frac{x₁+x₂+x₃+\ldots+x_n}{N}=\frac{\sum_{}^{}x}{N}$$

In these equations, the numerator represents the sum of all values in the data set, while the denominator represents the total count of those values.

The key advantage of using the arithmetic mean is that it incorporates every single data point in your dataset.

However, its primary limitation is its sensitivity to extreme values. Exceptionally high or low numbers, known as outliers, can significantly skew the average.

It is also important to note that the mean is not always the "typical" value of the data. In fact, the calculated mean might be a number that does not even exist within the dataset itself.

Average for the sample and the population

A population encompasses the entire set of values you are studying. A sample is a smaller, representative group drawn from that population.

The mathematical method for calculating the mean is identical for both samples and populations. The only difference lies in the statistical notation.

If x₁, x₂,..., xₙ represents a sample, the calculated average is called the sample mean, denoted by the symbol x̄. If you are calculating the mean of an entire population, it is denoted by the Greek letter 𝜇 (mu).

In statistics, we use the lowercase letter n to denote the sample size and the uppercase letter N to denote the population size.

Example of calculating the mean

Let's look at a practical example: Luigi is a master chef and pizza enthusiast who wants to open a new pizzeria in Bali. To secure an investor, Luigi is writing a business plan and needs to determine the average cost of a pizza across different restaurants on the island to forecast his future financial performance.

He researched the price of a Margherita pizza at various local restaurants and compiled a dataset. To simplify the math, let's drop the last three zeros and use the price in thousands. For instance, a value of 60 in our calculations represents 60,000 Indonesian Rupiah (IDR).

60, 60, 84, 45, 59, 70, 42, 59, 53, 70, 69, 70, 120, 160, 95, 50, 75, 55, 72, 70

Luigi couldn't visit every single pizzeria on the island, so he randomly selected 20 restaurants. Therefore, we are working with a sample.

Let's calculate the average value for this data set using the sample mean formula:

$$\bar{x}=\frac{x₁+x₂+x₃+\ldots+x_n}{n}=\frac{\sum_{}^{}x}{n}$$

The resulting mean is x̄ = 71.9.

Luigi's research indicates that 71,900 IDR is the average price of a Margherita pizza in Bali. He can now use this baseline figure for his financial projections.

Median Calculator

The median is a positional measure that represents the exact middle value of a data set when it is arranged in ascending or descending order.

When calculating the median, we are looking for the number that splits the data perfectly in half. Exactly 50% of the data values will be less than the median, and 50% will be greater. This is why determining the median manually—without the help of a median calculator—requires you to sort the numbers first.

The calculation method differs slightly depending on whether the total number of values in your dataset is odd or even.

If the total number of elements is odd (meaning n or N is an odd number), you use the following formula:

$$Median=(\frac{n+1}{2})-th \ element$$

However, if the number of elements is even, the following formula applies:

$$Median=\frac{\left[(\frac{n}{2})-th \ element+(\frac{n}{2}+1)-th \ element\right]}{2}$$

The greatest advantage of using the median is its resistance to outliers. Unlike the mean, the median is minimally affected by extremely high or extremely low values.

Example of calculating the median

Using Luigi's sample of twenty pizza prices:

60, 60, 84, 45, 59, 70, 42, 59, 53, 70, 69, 70, 120, 160, 95, 50, 75, 55, 72, 70

We can calculate the median step-by-step:

  1. Sort the data set in ascending or descending order. Arranged sequentially, the data looks like this:

42, 45, 50, 53, 55, 59, 59, 60, 60, 69, 70, 70, 70, 70, 72, 75, 84, 95, 120, 160

  1. Determine the number of values in the dataset. Here, n = 20.

  2. If n is odd, the median is the central value. If n is even, the median is the arithmetic mean of the two central numbers (add them together and divide by 2).

Since 20 is an even number, we find the two middle values.

The central values in our sorted sample are 69 and 70. We calculate the median as follows:

$$Median = \frac{69 + 70}{2} = 69.5$$

If Luigi had collected an odd set of 21 values, for example:

60, 60, 84, 45, 59, 70, 42, 59, 53, 70, 69, 70, 120, 160, 95, 50, 75, 90, 55, 72, 70

He would sort the values:

42, 45, 50, 53, 55, 59, 59, 60, 60, 69, 70, 70, 70, 70, 72, 75, 84, 90, 95, 120, 160

And simply select the exact middle value at the 11th position, which is 70.

The Difference Between the Mean and the Median

While both the mean and median serve as measures of central tendency, it is crucial to understand how they differ in statistical analysis.

The fundamental distinction is that the mean incorporates every single value in the dataset, whereas the median is determined only by the central number (or the two central numbers).

This difference is especially critical when dealing with datasets that contain unusually large or small numbers, known as outliers. Outliers will heavily distort the mean, but they will have little to no impact on the median.

In statistics, a measure is considered "resistant" if extreme values do not heavily influence it. Therefore, the median is a highly resistant measure, while the mean is not resistant.

These two metrics measure the "center" in distinct ways. The mean acts as the balancing point of the data's weight. The median is the midpoint that separates the bottom 50% of the data from the top 50%. In a perfectly symmetric dataset, the mean and median will be identical.

However, in real-world data, they rarely match exactly.

When the mean and median differ, the data set is said to be skewed.

If the mean is significantly lower than the median, the dataset is skewed to the left (negatively skewed). If the mean is significantly higher than the median, the dataset is skewed to the right (positively skewed).

Neither the mean nor the median is universally "better." They just serve different purposes. Data analysts often prefer the median when a dataset is highly skewed or contains massive outliers, as the median provides a more accurate representation of a "typical" value.

Mode Calculator

The mode is the value that appears most frequently in a dataset.

If a dataset has one clear value that occurs more often than any other, it is described as unimodal.

If two different values tie for the highest frequency, both are considered modes, making the dataset bimodal.

If three or more values share the highest frequency, each is a mode, and the dataset is classified as multimodal.

If every value in a dataset appears exactly once, the dataset has no mode. Note that "no mode" is not the same as a mode of zero. Zero can be a valid mode if it is the most frequently occurring number in the dataset (for instance, in winter temperature readings).

The main advantage of the mode is that it is easy to find and completely unaffected by extreme outliers. The primary drawback is that some datasets may simply not have a mode at all.

Example of mode calculation

Using our previous dataset of twenty pizza prices:

60, 60, 84, 45, 59, 70, 42, 59, 53, 70, 69, 70, 120, 160, 95, 50, 75, 55, 72, 70

We can find the mode with these steps:

First, arrange the dataset in order:

42, 45, 50, 53, 55, 59, 59, 60, 60, 69, 70, 70, 70, 70, 72, 75, 84, 95, 120, 160

Next, identify the number that repeats the most times. In this list, 70 appears four times, which is more than any other number. Therefore, the modal value is 70.

While the mode is a measure of central tendency, it does not always represent the actual center of the data, especially in heavily skewed distributions. The mode could technically be the highest value, the lowest value, or anywhere in between. For example, consider this dataset:

42, 45, 50, 53, 55, 57, 59, 60, 63, 69, 70, 72, 79, 82, 83, 95, 96, 120, 120, 120

Here, the mode is 120. However, 120 clearly does not reflect the central tendency of the group.

Interestingly, while the mean and median can only be calculated for quantitative (numerical) data, the mode can be used for both quantitative and qualitative (categorical) data.

For example, imagine Anna eats pizza 12 times per month, broken down like this:

  • 3 times a Napoletana pizza,
  • 3 times a Margherita pizza,
  • 2 times a Calzone pizza,
  • 1 Pepperoni,
  • 1 Marinara,
  • 1 Four Cheese,
  • 1 Caprese.

In this qualitative dataset, there are two modes: Napoletana and Margherita.

Measures of dispersion

Measures of dispersion, also known as measures of variability, determine the spread or scatter within a dataset. They illustrate how far the data points deviate from the central value. We can analyze this variance using three key metrics: the range, quartiles, and the interquartile range (IQR).

Range Calculator

The range is the simplest measure of dispersion. It represents the absolute difference between the highest and lowest values in a dataset. The formula is straightforward:

Range = Largest value - Smallest value

Example of Calculating Range

Looking back at our dataset of twenty pizza prices:

60, 60, 84, 45, 59, 70, 42, 59, 53, 70, 69, 70, 120, 160, 95, 50, 75, 55, 72, 70

To calculate the range, first organize the data to easily identify the extremes:

42, 45, 50, 53, 55, 59, 59, 60, 60, 69, 70, 70, 70, 70, 72, 75, 84, 95, 120, 160

The highest value is 160, and the lowest value is 42. Using the formula:

Range = largest value - smallest value = 160 - 42 = 118

The range for this dataset is 118.

Quartile Calculator

Quartiles are statistical values that divide a sorted dataset into four equal parts, or quarters, using three dividing points: the first, second, and third quartiles.

The first quartile (Q₁) is the 25th percentile. Exactly 25% of the data falls below this value, leaving 75% above it.

The second quartile (Q₂) is the 50th percentile, which is exactly the same as the median. It splits the data directly in half.

The third quartile (Q₃) is the 75th percentile. Here, 75% of the data lies below this value, and 25% lies above it.

Calculation of quartiles

To calculate the quartiles of a dataset, follow this procedure:

  1. Arrange the data points in ascending order.

  2. Determine the second quartile by calculating the median. For the first and third quartiles, proceed to the next steps using n (the total number of values in the dataset).

  3. To find the position of the first quartile, calculate L = 0.25n. To find the position of the third quartile, calculate L = 0.75n.

  4. If L is a whole integer, the quartile is the average of the value at position L and the value at position L + 1.

  5. If L is not a whole integer, round it up to the next highest whole number. The quartile is the value located at that rounded position.

A quartile calculation example

Using our set of twenty pizza prices:

60, 60, 84, 45, 59, 70, 42, 59, 53, 70, 69, 70, 120, 160, 95, 50, 75, 55, 72, 70

Let's calculate the quartiles:

  1. Sort the data set in ascending order:

42, 45, 50, 53, 55, 59, 59, 60, 60, 69, 70, 70, 70, 70, 72, 75, 84, 95, 120, 160

  1. From our earlier median calculation, we already know the second quartile:

Median = 69.5

  1. Calculate L for the first quartile: 0.25 × 20 = 5. Calculate L for the third quartile: 0.75 × 20 = 15.

  2. Because 5 is a whole integer, Q₁ is the average of the 5th and 6th values (55 and 59):

$$Q₁=\frac{55+59}{2}=57$$

  1. Because 15 is also a whole integer, Q₃ is the average of the 15th and 16th values (72 and 75):

$$Q₃=\frac{72+75}{2}=73.5$$

For this dataset, the first quartile is 57, the second (median) is 69.5, and the third quartile is 73.5.

Inter-quartile range calculator

The interquartile range (IQR) measures the spread of the middle 50% of your dataset. It is defined as the difference between the third quartile (Q₃) and the first quartile (Q₁). It is a highly robust measure of statistical dispersion, calculated with this formula:

IQR = Q₃ - Q₁

IQR Calculation Example

Since we have already calculated the first and third quartiles (57 and 73.5), calculating the interquartile range is as simple as plugging them into the formula:

IQR = Q₃ - Q₁ = 73.5 - 57 = 16.5

The interquartile range for our pizza dataset is 16.5.

Results

Thanks to his statistical analysis of Margherita pizza prices, Luigi can draw several actionable business conclusions.

First, while the mean (71.9) and the median (69.5) are not identical—indicating a slight right skew due to a few expensive restaurants—the difference is minimal. Both the mean and median serve as reliable measures of central tendency here.

If Luigi wants to set an average, competitive price for his pizzas, he could use either metric. However, unconventional prices like 71,900 IDR or 69,500 IDR might be difficult for customers to remember. Fortunately, the mode of his dataset sits perfectly between the mean and median at exactly 70,000 IDR. This makes the mode a highly practical and memorable price point for Luigi's business strategy.

Alternatively, if Luigi decides to target a more budget-conscious demographic, he could price his pizzas closer to the first quartile, aiming for roughly 57,000 IDR. Relying on the third quartile (73,500 IDR) to target high-end customers would be less effective in this scenario, as the upper quartile is slightly skewed and less representative of the luxury market's true ceiling.