Paste a data set and get the mean, the median, every mode and the range — with the sorted list, the running total and the frequency table that produce each.
Separate the values with commas, spaces or line breaks — a spreadsheet column pastes straight in. Write 7:3 for seven, three times.
Mean (average)
28.75
Sum 230 ÷ 8 values
Median
26
Halfway between 25 and 27
Mode
22, 27
2 values tie at 2 appearances each
Range
40
58 − 18
How the values are spread
8 values from 18 to 58 in 5 bins; the tallest holds 4. The mean falls at 28.75 and the median at 26.
Values in this bin
184263340420501
Mean 28.75 Median 26
Value
Tap or hover a bar to see its range.
Equal-width bins across the full range, so the two rules land where the mean and the median actually fall.
The mean (28.75) sits above the median (26): the high values stretch further than the low ones and pull the average up. 6 of the 8 values are below the mean; 4 are below the median. If you want the figure a typical member of this set is near, report the median.
The mean (28.75) sits below the median (26): the low values stretch further than the high ones and pull the average down. 6 of the 8 values are below the mean; 4 are below the median. If you want the figure a typical member of this set is near, report the median.
The mean and the median agree at 28.75: the set is balanced around its centre, so either figure describes it.
Every value in this set is 18. The mean, the median and the mode are all 18, and the range is 0.
With a single value the mean and the median are both 28.75 and the range is 0. Nothing repeats, so there is no mode — and a sample standard deviation needs at least two values.
Every one of the 6 distinct values appears 2 times. This page lists all 6 as modes; Statistics Canada and many textbooks call a set with no more frequent value no mode instead.
The same three figures in Excel or Google Sheets: AVERAGE, MEDIAN and MODE.MULT. MODE.SNGL returns only the first mode, and both return #N/A when nothing repeats.
These entries are not numbers and were left out:
Only the first 10,000 entries were used; the rest were dropped.
Type or paste at least one number to see the mean, the median and the mode.
Every figure from this data set
Values (n)
8
Sum
230
Minimum
18
Maximum
58
Midrange
38
Halfway between the smallest and the largest value — it ignores everything in between.
Distinct values
6
Sample standard deviation (s)
12.4642
Step by step: sorting for the median, adding for the mean
Position
Value (sorted)
Running total
1
18
18
2
22
40
3
22
62
4
25
87
5
27
114
6
27
141
7
31
172
8
58
230
Total
230
Σx = 230, and 230 ÷ 8 = 28.75. n = 8 is even, so the median is halfway between positions 4 and 5: (25 + 27) ÷ 2 = 26.
Frequency table: where the mode comes from
Value
Times it appears
Share of the set
18
1
12.5%
22
2
25%
25
1
12.5%
27
2
25%
31
1
12.5%
58
1
12.5%
The highest count is 2, shared by 2 values (22, 27) — the set is bimodal.
Mean, median, mode and range calculator. Four figures from one pasted data set.
A mean, median and mode calculator returns the three measures of central tendency for a list of numbers, plus the range that shows how far apart they sit. This one lists every value tied for the highest count rather than the first it finds, and shows the sorted list and the frequency table each answer comes from.
What the Mean, the Median and the Mode Each Tell You
The mean is the sum of a data set divided by how many values it holds. The median is the middle value once the data is sorted, or the average of the two middle values when the count is even. The mode is the value that appears most often, and a set can have one, several, or none. The range is the largest value minus the smallest, and it describes how far apart the values sit.
The page opens on eight values, so the shape of an answer is on screen before you type: 18, 22, 22, 25, 27, 27, 31, 58. They add to 230, and 230 ÷ 8 = 28.75, the mean. Sorted, the fourth and fifth values are 25 and 27, so the median is (25 + 27) ÷ 2 = 26. Two values appear twice, 22 and 27, so the mode card carries both and the set is bimodal. The range is 58 − 18 = 40.
Those two centers disagree because one value, 58, sits far above the rest. The mean is pulled up to 28.75 while the median stays at 26, and the line under the chart puts a number on the gap: 6 of the 8 values are below the mean, and only 4 are below the median. Laerd Statistics describes the general case — “as the data becomes skewed the mean loses its ability to provide the best central location for the data,” while “the median best retains this position.” Across these eight values, 26 describes a typical one better than 28.75 does.
The mode is the one of the four that sources answer differently, and this page names the disagreement on screen. Statistics Canada's rule is short: “There is no mode when all observed values appear the same number of times in a data set.” Read as written, that makes 1, 1, 2, 2, 3, 3 a set with no mode, because each of the three values appears twice. The Math Doctors records teachers accepting the opposite reading on the same kind of set: since no value occurs more often than the others, every one of them counts as a mode. The mode card here lists all three, and a line beneath names the convention it is departing from, so you can hand in whichever answer your course expects and know what the other one rests on.
How to Find the Mean, Median, Mode and Range by Hand
Four passes over the same list produce the four figures. Worked below on the eight values the page loads with: 18, 22, 22, 25, 27, 27, 31, 58.
1. Add every value, then divide by the count. 18 + 22 + 22 + 25 + 27 + 27 + 31 + 58 = 230, and 230 ÷ 8 = 28.75. That is the mean. The Running total column of the first table lets you check the addition one row at a time: 18, 40, 62, 87, 114, 141, 172, 230.
2. Sort the values, then find the middle. Sorting first is what makes a middle position mean anything; on an unsorted list you get whichever number happens to sit in the middle of your typing. With n = 8 there is no single middle, so take positions 4 and 5 — the values 25 and 27 — and average them: (25 + 27) ÷ 2 = 26. With an odd count the median is the value at position (n + 1) ÷ 2, and no averaging is needed.
3. Count how often each value appears. 18 once, 22 twice, 25 once, 27 twice, 31 once, 58 once. The highest count is 2, and two values reach it, so the modes are 22 and 27. Two modes make the set bimodal, three trimodal, four or more multimodal.
4. Subtract the smallest value from the largest. 58 − 18 = 40, the range.
The two tables under the results are steps 1 to 3 laid out in full. “Step by step: sorting for the median, adding for the mean” numbers the sorted positions, carries the running total to 230 and highlights the two middle rows. “Frequency table: where the mode comes from” holds one row per distinct value with its count and its share of the set, and marks the modal rows — 22 and 27 at 25% each here.
Mean, Median, Mode and Range Formulas
xˉ=n∑i=1nxi
xˉ = The mean — every value added together, divided by how many there are
x~ = The median — the middle value once the data has been sorted
xi = The i-th value in the data set
n = How many values the data set holds, shown as Values (n) in the figures block
R = The range — the largest value minus the smallest
∑ = Add up what follows, once for every value in the set
The median has two forms, and the count decides which one applies. With an odd n it is a single sorted value:
x~=x(2n+1)
With an even n it is the average of the two that straddle the middle:
x~=2x(2n)+x(2n+1)
Both subscripts count positions in the sorted list, not in the order you typed. On the eight loaded values that is positions 4 and 5, holding 25 and 27, giving 26.
The range is a subtraction:
R=xmax−xmin
Midrange halves the same two numbers instead of subtracting them, (58 + 18) ÷ 2 = 38 here. It sits in the figures block as the fourth center textbooks list, and 38 against a mean of 28.75 and a median of 26 is the clearest argument against reporting it: it ignores the six values in between.
The mode has no algebraic formula for a plain list of numbers. It is the value, or values, whose count equals the highest count in the set. NIST/SEMATECH defines it as “the value of the random sample that occurs with the greatest frequency,” and adds that it “is not necessarily unique.” That second clause is why the card here prints a list rather than a single number, and why the frequency table sits underneath it.
Every Mode State, and What This Page Prints
Data set
Highest count
What the mode card shows
The name for it
18, 22, 22, 25, 27, 27, 31, 58
2, reached by two values
22, 27
Bimodal
9, 4, 9, 2, 9
3, reached by one value
9
Unimodal
1, 5, 9
1, every value ties
No mode
Nothing repeats, so no value is more frequent
1, 1, 2, 2, 3, 3
2, reached by all three values
1, 2, 3
Trimodal here; no mode under the Statistics Canada rule
5, 5, 5
3, and only one distinct value exists
5
Unimodal, with a range of 0
42
1, on a set of one
No mode
A lone value repeats nothing
Worked Examples
The Eight Values in the Box: Two Modes and a Mean Above the Median
18, 22, 22, 25, 27, 27, 31, 58 returns a mean of 28.75 with the subtitle Sum 230 ÷ 8 values, a median of 26 subtitled Halfway between 25 and 27, a mode card reading 22, 27 with 2 values tie at 2 appearances each, and a range of 40. The figures block adds the rest: 8 values, sum 230, minimum 18, maximum 58, midrange 38, 6 distinct values and a sample standard deviation of 12.4642. The chart splits the span into five equal bins eight units wide and puts four values in the first, three in the second and the lone 58 in the last, with two labeled rules where the mean and the median fall. Underneath, the shape line gives the verdict: the mean sits above the median, 6 of the 8 values are below the mean and 4 are below the median, so the median is the figure a typical member of this set is near.
Seven Values Typed in the Order They Were Collected
Paste 10, 2, 38, 23, 38, 23, 21 exactly as written and nothing needs reordering first. The sum is 155 and the mean 22.1429; sorted, the list reads 2, 10, 21, 23, 23, 38, 38, so with an odd n = 7 the median is the value at position 4, which is 23. Two values appear twice, 23 and 38, so the mode card carries both. The range is 36 and the midrange 20. Here 3 of the 7 values are below the mean and 3 are below the median, which is what a set without a single dominant outlier looks like. Press Sort ascending and the box is rewritten as 2, 10, 21, 23, 23, 38, 38 so the working can be copied onto a worksheet in the order a marker expects — none of the four answers moves, because none of them depends on input order.
A Set Where Nothing Repeats
1, 5, 9 gives a mean of 5, a median of 5 and a range of 8. The mode card reads No mode, subtitled Every value appears once, and the frequency table's caption spells out the reason: every value appears once, so no value is more frequent than the rest. Negative numbers behave the same way. Paste -5, -3, -1, 0, 2 and the mean is -1.4 against a median of -1, the range is 7 and the midrange -1.5, still with no mode. That mean below its median is the mirror of the loaded data: 2 of the 5 values sit below the mean and 2 below the median, and the low tail is what drags the average down.
The Set Where the Sources Disagree
1, 1, 2, 2, 3, 3 has a mean of 2, a median of 2 and a range of 2, and then the mode splits the sources. Each of the three distinct values appears twice, so the highest count is 2 and all three reach it. This page lists 1, 2, 3 on the mode card and adds a line saying that Statistics Canada and many textbooks would call the same set no mode, since no value is more frequent than any other. The Math Doctors records the same split from the other side: “all values are modes, since there is no value that occurs more often,” against “some references say that if all elements in a data set have the same frequency, then the data is said to be of no mode.” Both answers are defensible, so the page prints one and names the other.
Twenty Test Scores Entered as a Frequency Table
Typing out twenty scores is what the value:count shorthand exists to avoid. Enter 6:2 7:5 8:8 9:4 10:1 and the page expands it to twenty values: two 6s, five 7s, eight 8s, four 9s and one 10. The sum is 157, so the mean is 7.85; the tenth and eleventh sorted values are both 8, so the median is 8; the mode is 8, the only value reaching a count of 8, at 40% of the set; and the range is 4. Because the mean sits below the median, the line under the chart reports 7 of the 20 values below the mean and 7 below the median, and points at the median. A colon, a lowercase x or a × all work as the separator, and a count that is zero, negative or fractional gets the whole token discarded and named on screen, never guessed at.
Which of the Three Should You Report?
Report the mean when the values cluster around one center and nothing extreme pulls at it, because the mean uses every number in the set. Report the median when one or two values sit far from the rest, because the median only cares about position and an outlier cannot move it more than one place. Report the mode when the question is which value comes up most, which is where shoe sizes, survey answers, dice results and anything you can count rather than measure belong.
On this page the decision has an exact test rather than a rule of thumb. The line under the chart compares the mean against the median as they are printed on the cards and then counts your data both ways. On the eight loaded values that reads: 6 of the 8 values are below the mean, 4 are below the median. A mean that leaves three quarters of the data underneath it is describing a tail, not a typical value. OpenStax puts the same asymmetry generally — in a right-skewed set “the mode is often less than the median, which is less than the mean,” and “the mean and the median both reflect the skewing, but the mean reflects it more so.”
When the two agree, the page says so instead of inventing a difference: the mean and the median agree, the set is balanced around its center, and either figure describes it. There is no skewness coefficient anywhere here, on purpose. The published threshold bands belong to a different statistic from the one a mean-minus-median gap produces, and a count of your own values needs no threshold at all.
None of the three describes how scattered the data is. The figures block carries a sample standard deviation for that, 12.4642 on the loaded data, and the standard deviation calculator is where the sample-versus-population choice, the squared deviations and the matching spreadsheet function live.
Pasting Your Data: Separators, the Decimal Mark and the 7:3 Shorthand
The data field is one box that takes a whole column at once, up to 5,000 characters. Line breaks count as separators, so a column copied out of Excel, Sheets, Numbers or a CSV goes straight in without reformatting, and the answers recompute as you type, with no Calculate button to press.
Under the field sits a segmented control labeled Decimal mark, with the two options written as notation instead of words: 1.5 and 1,5. It changes what a comma means.
1. On 1.5, commas, spaces and line breaks all separate values. Thousands grouping is not recognized in this mode, so 1,234.5 becomes two entries, 1 and 234.5 — and because the mode card counts occurrences, a split number can manufacture a tie that was never in your data. Glance at Values (n) and Distinct values after any paste to catch it.
2. On 1,5, the comma becomes a decimal point and stops separating. Semicolons, spaces and line breaks split the list instead, and a period is read as a thousands group, so 1.234,5 is the single value 1234.5.
Two chips finish the form. Clear empties the box. Sort ascending rewrites what you typed as the same values in order, joined by commas in point mode and semicolons in comma mode — useful for showing your working, and lossless, since sorting changes none of the four answers.
The value:count shorthand turns a frequency table into a data set. Write 7:3 for three 7s; the separator can be a colon, a lowercase x or a ×, none of which is a decimal mark or a value separator in either mode, so 2,5:3 in comma mode is 2.5 three times. Counts run up to four digits, and the expansion stops at 10,000 values with a line saying so.
Nothing is altered behind your back. Entries that are not numbers are set aside and listed by name under the results, so a stray header row or an n/a cell shows up as a line of text on screen instead of moving the mean. Tokens like 7:0, 7:-3 or 7:2.5 are discarded whole and named the same way.
Where the Four Figures Go Wrong
Taking the middle of an unsorted list — 10, 2, 38, 23, 38, 23, 21 has 23 sitting in the middle of the typing and 23 as its median, which is a coincidence rather than a method. Sort first: the median is a position in the sorted list, and the highlighted rows in the step-by-step table are there so the position can be checked.
Reporting one mode when two values tie — 22 and 27 both appear twice in the loaded data, so both are modes. Excel's MODE.SNGL hands back only one of them, which is where the habit comes from; MODE.MULT returns the whole set, and so does the card here.
Writing the range as an interval — a set running from 18 to 58 has a range of 40, one number. The Math Doctors traces both usages and quotes Merriam-Webster for the statistical one: “the difference between the least and greatest values of an attribute or of the variable of a frequency distribution.” Handing in “18 to 58” answers a different question.
Averaging two middle values when n is odd — the halving step belongs to an even count only. With seven values the median is the fourth one outright, and the table's caption states which position it took.
Pasting thousands-grouped numbers with the decimal mark on 1.5 — 1,234.5 splits into 1 and 234.5, so n climbs, the mean collapses toward the small half, and the mode card can pick up a phantom tie between two split fragments that happen to match. Check Distinct values and the frequency table before trusting a mode, or switch the decimal mark and let the period do the grouping.
Rounding the mean before comparing it with the median — a mean of 25.6 rounded to 26 next to a median of 26 looks balanced when it is not. The comparison on this page runs on the figures as printed at six significant figures, which is why the verdict never contradicts the two cards above it.
Getting an Answer You Can Hand In
Check Values (n) and Distinct values before anything else — together they are the fastest test that the paste landed the way you meant. A value count higher than your row count means a comma split something you meant as a decimal; a distinct count lower than you expected means the mode card is about to name a tie you didn't intend. The line naming the discarded entries covers what neither figure explains.
Quote a mode with its count, never on its own — “22 and 27, twice each out of eight values” is an answer; “22 and 27” is a claim the reader has to take on trust. The frequency table hands you both numbers and the 25% share alongside.
Use the median when the two centers disagree, and say why — the count under the chart is the sentence to borrow: 6 of the 8 values are below the mean, 4 are below the median. That is a statement about your own numbers, and a marker can check it against the table above it.
Press Sort ascending before copying your working — the box is rewritten in order, so the sorted list you paste into an answer sheet matches the positions the median argument refers to. None of the four figures moves.
Say which convention you used when every value ties — for 1, 1, 2, 2, 3, 3 write either “trimodal” or “no mode”, then add the reason in half a line. A marker who expected the other answer can follow you; one who gets a bare number cannot.
Treat the midrange as a warning sign — 38 on the loaded data against a mean of 28.75 and a median of 26. It uses two values and throws the other six away, so a midrange far from the other centers is telling you an extreme value is present.
Take two sets with the same mean to a spread measure — identical means say nothing about how tightly the values sit around them. The sample standard deviation in the figures block starts that comparison, and the variance calculator carries it into squared units when the next step needs them.
Key Terms
Central tendency
The single-figure answer to “where is the middle of this data?”. The mean, the median and the mode are the three standard ones, and the midrange is a fourth that textbooks list beside them.
Frequency
How many times a value appears in the data set. The frequency table on this page has one row per distinct value with its count and its share, and the mode is whichever rows hold the highest count.
Unimodal
One value reaches the highest count on its own. 9, 4, 9, 2, 9 is unimodal: 9 appears three times and nothing else appears more than once.
Bimodal and multimodal
Two values tie for the highest count, or more than two. The loaded data is bimodal at 22 and 27; three tied values are trimodal, and four or more are multimodal. Statistics Canada's wording for the general case: “There is more than one mode when the highest frequency was observed for more than one value in a data set.”
No mode
The answer this page prints when no value appears more than once. Statistics Canada's rule extends it further: a set where every value appears equally often — however many times that is — also has no mode, which covers a set like 1, 1, 2, 2, 3, 3 that this page reports as trimodal instead, with a note saying so.
Range
The largest value minus the smallest, 58 − 18 = 40 on the loaded data. It measures spread, not center, and one extreme value is enough to set it.
Midrange
Halfway between the smallest and the largest value, (58 + 18) ÷ 2 = 38 here. It ignores everything in between, which is why it moves with outliers more than the mean does.
Distinct values
How many different numbers the set contains, as opposed to how many values it holds. The loaded data has 8 values and 6 distinct ones, because 22 and 27 each occur twice, and that figure is the row count of the frequency table.
Skewed data
A set whose values stretch further on one side of the center than the other, which is what pushes the mean away from the median. On the loaded data the single 58 stretches the high side, so the mean lands above the median.
Frequently Asked Questions About Mean, Median and Mode
What is the mode if no number repeats?
There is no mode. Statistics Canada's rule is that a set where every value appears equally often has no mode. The card shows No mode with the subtitle Every value appears once, and the frequency table's caption gives the reason.
Can a data set have two modes?
Yes. Two values tied at the highest count make the set bimodal, and both are modes. The loaded data is the example: 22 and 27 each appear twice while every other value appears once, so the card carries both.
What is the mode when every value appears exactly twice?
That is the one case sources disagree on, and this page reports both readings. For 1, 1, 2, 2, 3, 3 the mode card lists 1, 2 and 3, and a line underneath says that Statistics Canada and many textbooks call a set with no more frequent value no mode instead. The Math Doctors documents the same split among teachers, noting that either answer is accepted in practice. Check what your course uses, then state which convention you followed — the arithmetic is identical either way, only the label changes.
How do I find the median when there is an even number of values?
Sort the values, take the two in the middle, and average them. With eight values those are positions 4 and 5: on the loaded data 25 and 27, so the median is (25 + 27) ÷ 2 = 26. The step-by-step table highlights both middle rows and its caption prints that division in full, so the branch it took is visible rather than assumed. With an odd count there is a single middle value and no averaging step at all.
Should I report the mean or the median?
Use the mean when the values sit around one center with nothing extreme pulling at them, and the median when one or two values are far from the rest. This page settles it on your own numbers: it prints how many of your values fall below the mean and how many fall below the median. Six of the eight loaded values are below the mean and four are below the median, so the median describes a typical value in the set and the mean describes a tail. Laerd Statistics puts the same point generally, that a skewed set drags the mean away from the typical value while the median holds its position.
Is the range 40, or is it 18 to 58?
As a statistic the range is 40, a single number: the largest value minus the smallest. “18 to 58” is the everyday phrasing for the same span and is not what a marker means by range. The Math Doctors traces both usages and quotes Merriam-Webster for the statistical one: “the difference between the least and greatest values.”
What is the difference between the range and the midrange?
The range subtracts the two extremes and measures spread; the midrange averages them and estimates the center. On the loaded data that is 58 − 18 = 40 against (58 + 18) ÷ 2 = 38. Both use only two values, which is why one outlier moves either one.
Why does Excel show #N/A instead of a mode?
Because nothing in the range repeats. Microsoft documents it for both functions: “If the data set contains no duplicate data points, MODE.MULT returns the #N/A error value,” and the MODE.SNGL page carries the same sentence for its own function. This calculator prints No mode there, which is the same answer without the error styling. Two other differences matter when reconciling a sheet: MODE.MULT “returns an array of values” and Microsoft says it “must be entered as an array formula,” and text, logical values and empty cells inside a referenced range “are ignored” with nothing on screen to say so, while this page lists the entries it could not read, naming the first five on screen.
Can I enter a frequency table instead of a list of numbers?
Yes, with the value:count shorthand. Write 8:5 for five 8s, and a whole tally sheet becomes one short line: 6:2 7:5 8:8 9:4 10:1 expands to twenty scores with a mean of 7.85, a median of 8 and a mode of 8. The separator can be a colon, a lowercase x or a ×, and counts run to four digits, with the total expansion capped at 10,000 values.
Do I have to sort my numbers before pasting them?
No. The sorting happens for you, and the sorted list is one of the two tables on the page. The Sort ascending chip is there for a different reason: it rewrites the box in order so the working you copy out matches the positions the median argument refers to. None of the four answers depends on the order you typed.
Why is my mean higher than my median?
One or more values sit well above the rest and pull the average up while leaving the middle position where it was. On the loaded data the single 58 does it: the mean lands at 28.75 and the median at 26. OpenStax describes the pattern for right-skewed data, where “the mode is often less than the median, which is less than the mean,” and notes that the mean reflects the skew more strongly than the median does.
What comes after bimodal and trimodal?
Multimodal. Two tied values are bimodal, three are trimodal, and four or more are multimodal, which is the word the frequency table's caption uses from four upwards. The card lists the five lowest modes and adds a count of the rest when a set has more than five.
Does this calculator cost anything, and does my data go anywhere?
It is free with nothing to install. The arithmetic runs in your browser as you type — nothing you paste leaves it, since there is no upload and no request carrying your numbers anywhere.
How many values can this handle at once?
The box holds 5,000 characters, and the value:count shorthand expands to at most 10,000 values, with a line stating it if that cap is reached. Every value counts toward the mean, the median, the mode and the range. The sorted table lists the first 50 rows and the frequency table the first 30 distinct values, each saying how many it left out, while the totals and the answers cover the whole set.