acalculator

What are the mean, median, mode?

Type or paste your numbers to get the mean, median, and mode as you type.

Your numbers

Read as: 1; 2; 3; 4; 5; 5; 6; 6; 6; 6; 7; 8; 9
Mean
5.230769

For 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 9, the mean is 5.230769 and the median is 6 (mode: 6).

Median
6
Mode
6
Times the mode occurs
4
Count
13
Sum
68
Smallest
1
Largest
9
Range
8

Mean: 5.230769. For 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 9, the mean is 5.230769 and the median is 6 (mode: 6).

Where do your numbers fall?

How to calculate

Computes the mean, median, and mode of a list of numbers, with the count, sum, smallest and largest value, and range.

Example with the default inputs (Your numbers [1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 9]): For 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 9, the mean is 5.230769 and the median is 6 (mode: 6).

Method: mean = sum ÷ count; median = the middle sorted value (the average of the two middle values for an even count); mode = the most frequent value or values.

  • Every number in the list counts once. The order of the list does not change any result.
  • When no value occurs more than once there is no mode. When several values tie for most often, all of them are modes.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Your numbers 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 9 gives Mean 5.230769, Median 6, Mode 6, Times the mode occurs 4, Count 13, Sum 68, Smallest 1, Largest 9, Range 8.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1 Measures of Location (mean, median, mode). https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm
  2. Your numbers 1, 2, 2, 3, 4 gives Mean 2.4, Median 2, Mode 2, Times the mode occurs 2.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1 Measures of Location (mean, median, mode). https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm
  3. Your numbers 1, 2, 3, 4 gives Mean 2.5, Median 2.5, Mode No mode, Range 3.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1 Measures of Location (mean, median, mode). https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm
  4. Your numbers 1, 1, 2, 2, 3 gives Mean 1.8, Median 2, Mode 1, 2, Times the mode occurs 2.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1 Measures of Location (mean, median, mode). https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm

How it works

For a list of n numbers x₁, x₂, …, xₙ:

  • Mean = (x₁ + x₂ + … + xₙ) ÷ n.
  • Median: sort the list. When n is odd, the median is the middle value, the ((n + 1) ÷ 2)th. When n is even, it is the average of the (n ÷ 2)th and the (n ÷ 2 + 1)th values.
  • Mode: count how often each distinct value occurs. The modes are every value with the highest count, listed from smallest to largest and separated by a comma and a space. When the highest count is 1 (no value repeats), there is no mode, and the page shows "No mode".
  • Times the mode occurs is that highest count. It is shown only when there is a mode.
  • Count is n, sum is x₁ + … + xₙ, smallest and largest are the minimum and maximum, and range = largest − smallest.

Assumptions

  • Values count as equal only when they are exactly equal (2 and 2.0 are the same number).
  • Each mode is written the way the page writes numbers: rounded to at most 6 decimal places (6 significant figures for sizes below 0.0001), with no thousands separators (1000), so the comma only separates modes.
  • The list needs at least one number.

Worked examples by hand

1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 9 (the default list, 13 numbers). The sum is 68, so the mean is 68 ÷ 13 = 5.2308 (5.230769…). The list is already sorted; the middle value is the 7th, which is 6. The value 6 occurs 4 times, more than any other, so the mode is 6. The range is 9 − 1 = 8.

1, 2, 2, 3, 4. Mean = 12 ÷ 5 = 2.4. The middle (3rd) value is 2. 2 occurs twice, so the mode is 2.

1, 2, 3, 4. Mean = 10 ÷ 4 = 2.5. The count is even, so the median is (2 + 3) ÷ 2 = 2.5. Every value occurs once, so there is no mode.

1, 1, 2, 2, 3. Mean = 9 ÷ 5 = 1.8. The median is the 3rd value, 2. 1 and 2 both occur twice, so the modes are 1, 2.

Other questions people ask

What is the difference between mean, median, and mode?

The mean is the average of all numbers (sum divided by count). The median is the middle value when numbers are arranged in order. The mode is the number that appears most frequently. For example, in the set [1, 2, 2, 3, 4]: Mean = 2.4, Median = 2, Mode = 2.

How do I enter numbers in the calculator?

You can separate numbers with commas (1,2,3,4), spaces (1 2 3 4), semicolons (1;2;3;4), new lines, or a mix of these.

What happens if I enter invalid numbers?

The calculator names the first entry that is not a number, for example "a" is not a number, and shows no result until you fix it. It does not skip entries silently.

Can I have multiple modes?

Yes! If multiple numbers appear the same number of times (and more frequently than any other number), they are all considered modes. For example, in [1, 1, 2, 2, 3], both 1 and 2 are modes.

What if there is no mode?

If no number appears more than once, there is no mode. The calculator will display 'No mode' in this case.

How is the median calculated for an even number of values?

For an even number of values, the median is the average of the two middle numbers. For example, in [1, 2, 3, 4], the median is (2 + 3) ÷ 2 = 2.5.

Which measure of central tendency should I use?

Use the mean for normally distributed data, the median when there are outliers that could skew the mean, and the mode for categorical data or when you want to know the most common value.

Can I use decimal numbers?

Yes! The calculator supports both whole numbers and decimal numbers. Examples: 1.5, 2.75, 3.14159, etc.

What additional statistics does the calculator show?

Besides mean, median, and mode, the calculator also shows: count (number of values), sum, minimum value, maximum value, and range (max - min).

Is there a limit to how many numbers I can enter?

There's no strict limit, but for best performance, we recommend entering up to 10,000 numbers. The calculator can handle large datasets efficiently.