Skip to content

Mean, Median, Mode & Range Calculator

Enter up to 50,000 numbers and calculate mean, median, tied modes, range, sum, count, minimum, maximum, distinct values, and exact-value frequencies. Compare mean and median visually, inspect the frequency table, copy the summary, or export all frequencies as CSV.

Separate values with commas, spaces, semicolons, tabs, or line breaks.

Commas separate observations, so enter 1234 rather than 1,234 when you mean one value.

Up to 50,000 values.
Additional

Changes visible rounding only. Parsed observations and calculations are unchanged.

Exact-value frequency counting happens before display rounding, so two values that look identical at low precision can still remain separate observations.

How to use the Mean, Median, Mode & Range Calculator

Enter or paste a list of numbers. Separate observations with commas, spaces, semicolons, tabs, or line breaks.

The calculator updates automatically and reports the mean, median, mode, range, count, sum, minimum, and maximum.

The default example 2, 3, 4, 5, 100 deliberately contains an extreme value so the difference between mean and median is immediately visible.

Open Dataset details & frequency to inspect distinct values, repeated observations, exact-value frequencies, copy the summary, or download the full frequency table as CSV.

Accepted and rejected input formats
InputAcceptedHow it is interpreted
1, 2, 2, 3, 5YesComma-separated observations
1 2 2 3 5YesSpace-separated observations
1; 2; 2; 3; 5YesSemicolon-separated observations
1 2 2 3 5YesOne observation per line
−4, .5, 2.75, 1e3YesNegative values, leading decimals, and scientific notation
1,234As two valuesCommas separate observations, so this becomes 1 and 234
12 kgNoUnits and labels must be removed
45%NoEnter 45 or 0.45 according to the intended dataset definition
0x10NoHexadecimal, binary, and octal literals are rejected
NaN or InfinityNoEvery observation must be a finite decimal number

Mean, median, mode, and range answer different questions

Mean, median, and mode are measures of location or central tendency, but they define centre in different ways.

The mean uses the numerical size of every observation. The median uses sorted position. The mode uses repetition.

Range is different: it is a measure of spread based only on the minimum and maximum.

Looking at all four together can reveal features that one summary value alone would hide.

Mean, median, mode, and range compared
MeasureCalculationData usedOften useful forMain limitation
MeanSum ÷ countEvery entered valueNumerical data where the arithmetic balance point is usefulUnusually high or low values can move it substantially
MedianMiddle sorted valuePosition after sortingSkewed data or datasets with influential extremesDoes not describe how far observations lie from the centre
ModeMost frequent exact value or valuesExact-value frequenciesRepeated scores, sizes, choices, or other recurring valuesA dataset can have no mode or several tied modes
RangeMaximum − minimumOnly the two endpointsA quick statement of the complete observed spanIgnores every observation between the minimum and maximum

Worked example: 2, 3, 4, 5, 100

This dataset shows why the mean and median should not automatically be treated as interchangeable versions of the same idea.

The first four observations lie between 2 and 5, but the value 100 raises the arithmetic mean to 22.8.

The median remains 4 because it depends on the middle sorted position rather than the numerical distance from the centre.

Every observation occurs once, so there is no mode. The observed range is 98.

Worked calculation for 2, 3, 4, 5, 100The extreme value raises the mean far above the median.
StepOperationResult
Original datasetValues as entered2, 3, 4, 5, 100
CountNumber of observations5
Sum2 + 3 + 4 + 5 + 100114
Mean114 ÷ 522.8
Sorted valuesArrange from lowest to highest2, 3, 4, 5, 100
MedianThird value in the five-value sorted dataset4
ModeCheck exact-value frequenciesNo mode; every value occurs once
Range100 − 298

How the arithmetic mean is calculated

The arithmetic mean is the sum of all observations divided by the number of observations.

For 4, 7, and 10, the sum is 21 and the count is 3, so the mean is 7.

Every observation affects the mean. Increasing one value by 30 increases the total by 30 and therefore increases the mean by 30 divided by the observation count.

Because every numerical value contributes to the total, unusually large or small observations can have substantial influence.

How the median is calculated

The median is determined after arranging the observations from lowest to highest.

With an odd number of observations, it is the single middle value. For 2, 4, 9, the median is 4.

With an even number of observations, it is the arithmetic average of the two middle values. For 1, 4, 7, 10, the median is 5.5.

Because it depends on position rather than the numerical distance of every observation, the median is often less influenced by a small number of extreme values than the mean.

How the mode is calculated

Mode is based on exact numerical frequency.

In 1, 2, 2, 3, the mode is 2 because it occurs twice while every other value occurs once.

In 1, 1, 2, 2, 3, both 1 and 2 are modes because they share the highest repeated frequency.

When every distinct value occurs exactly once, this calculator reports No mode.

Exact values, equivalent notation, and tied modes

Frequency counting happens after each valid input token has been converted to its numerical value.

The inputs 1, 1.0, and 1e0 therefore all become the number 1 and share one frequency count.

Negative zero is normalized to zero.

Nearby but unequal numbers remain distinct. For example, 1.2 and 1.2001 remain separate frequencies even if low display precision makes both appear as 1.2.

How range is calculated

Range equals the maximum observation minus the minimum observation.

For 3, 5, 8, and 11, the range is 11 − 3 = 8.

Range remains in the same measurement unit as the entered observations.

It is easy to interpret but uses only two observations. It says nothing about how the remaining values are distributed between the endpoints.

Why the calculator shows mean and median on the same range

The result visualization places the mean and median between the observed minimum and maximum.

When the two measures are close, they appear close together. When an extreme value moves the mean away from the central observations, their positions can separate substantially.

The line is not a histogram, box plot, density estimate, or distribution model.

It shows positions only; it does not tell you how many observations lie between those points.

Mean versus median when extreme values are present

Mean and median may be similar in balanced data and very different in skewed or long-tailed data.

In 2, 3, 4, 5, 100, the mean is 22.8 while the median is 4.

Neither statistic is mathematically wrong. The mean represents the arithmetic balance point, while the median identifies the middle sorted position.

For salaries, property prices, response times, and other datasets where a few observations may be much larger than most, reporting both can provide useful context.

How different datasets change the four measures

Different distributions can produce very different relationships among mean, median, mode, and range.

Repeated observations can produce one mode or several tied modes. Extreme observations can move the mean while leaving the median much less affected.

Two datasets may even share the same range while having very different centres and frequency patterns.

The examples below show how symmetry, extreme observations, repetition, tied modes, identical values, and negative values change the summary.

How data shape changes the four measures
DatasetMeanMedianModeRangeWhat it shows
2, 4, 6, 8, 1066No mode8Balanced values with mean and median at the same centre
2, 3, 4, 5, 10022.84No mode98The value 100 pulls the mean upward while the median remains near the main group
1, 2, 2, 2, 83227The repeated value 2 is both the median and the mode
1, 1, 2, 2, 9321 and 28Two values share the highest repeated frequency
5, 5, 5, 55550Every observation is identical
−8, −3, −3, 2, 7−1−3−315Negative values are handled like other finite numerical observations

Count, sum, minimum, maximum, and distinct values

Count is the total number of observations included in the calculation.

Sum is their numerical total and is used in the arithmetic mean.

Minimum and maximum are the smallest and largest observations after numerical parsing.

Distinct count records how many different numerical values appear. Repeated observations counts entries beyond the first occurrence of each distinct value.

How the exact-value frequency table works

The frequency table records each distinct numerical value, how many times it occurs, and its percentage of the full dataset.

For example, if the value 4 appears three times in a dataset of 12 observations, its count is 3 and its relative frequency is 25%.

The on-page table previews the first 50 distinct values in numerical order when the dataset contains more than 50 distinct values.

Frequency CSV exports the complete table, including rows that are not displayed in the preview.

Display decimal places do not change the data

The Additional control changes the maximum number of decimal places shown in the interface.

It does not round the entered observations before the mean, median, mode, range, or frequency calculations are performed.

This means two distinct values can look identical at low display precision while still remaining separate in the underlying frequency table.

Choose a display precision appropriate for the source measurements rather than displaying more digits than the data justify.

Accepted input and the comma rule

The calculator accepts ordinary decimal notation, negative values, leading decimals such as .5, and scientific notation such as 1e3.

Whitespace, commas, semicolons, tabs, and line breaks can separate observations.

Because a comma always separates observations, 1,234 is interpreted as two values: 1 and 234.

Enter 1234 without the grouping comma when one thousand two hundred thirty-four is intended as a single observation.

Scientific notation and negative values

Scientific notation is useful for entering very large or very small values. For example, 1e3 is parsed as 1,000 and 2.5e-4 as 0.00025.

Negative observations are handled normally when sorting, summing, finding the mean and median, counting frequencies, and calculating the range.

The range itself cannot be negative because it is defined as maximum minus minimum.

Numerical stability and the 50,000-value limit

The calculator uses finite double-precision floating-point arithmetic.

Compensated summation reduces avoidable accumulation and cancellation error, and scaled fallback arithmetic helps avoid some intermediate-overflow cases when calculating the sum.

The mean is calculated in a way that can remain finite even when a direct raw total would overflow, and the even-count median avoids adding two enormous middle observations before dividing by two.

These techniques improve robustness but do not provide arbitrary-precision decimal mathematics. Values or results outside the supported finite numerical range are rejected.

The 50,000-observation limit bounds local parsing, sorting, frequency counting, memory usage, rendering, and CSV generation.

Check the dataset before interpreting the result

Confirm that all observations represent the same quantity and compatible units. Do not combine metres with centimetres, monthly figures with annual figures, or scores from different scales without first converting them appropriately.

Check pasted data for headings, units, placeholders, duplicated records, missing periods, impossible measurements, and decimal-format mistakes.

A missing observation is not automatically zero.

Investigate apparent outliers before removing them. An extreme value may be an error, but it may also be a genuine and important observation.

Common uses for descriptive statistics

Mean, median, mode, range, and frequency counts are useful for compactly summarizing test scores, prices, salaries, measurements, response times, delivery times, survey results, sales figures, and experimental observations.

The most useful measure depends on the type of data and the question being asked.

A calculation can be mathematically correct while still being misleading when observations use inconsistent units, periods, definitions, or collection methods.

Using descriptive statistics in practical datasets
DatasetUseful measuresQuestion they can help answerCheck before interpreting
Test scoresMean, median, mode, rangeWhat was the average, middle score, most common score, and observed span?Confirm that every score uses the same scale and maximum
Salaries or pricesMedian and meanIs the typical value being influenced by a small number of very large observations?Use consistent currency, period, and inclusion rules
Response or delivery timesMedian, mean, rangeWhat is the typical duration and how large is the observed span?A mean can be strongly affected by long-tail delays
Product sizes or survey choicesMode and frequencyWhich exact value appears most often?Mode uses exact values rather than nearby groups
Laboratory measurementsMean, median, rangeWhere is the observed centre and what span was recorded?Keep units, precision, and measurement conditions consistent
Sales or website activityMean and medianWhat is the average period and is it distorted by unusually active days?Check missing periods and duplicated records before calculating

When mean, median, mode, and range are not enough

These statistics provide a compact descriptive summary but do not reveal the complete distribution.

Use variance or standard deviation when spread across all numerical observations matters.

Use quartiles, percentiles, or interquartile range when positional summaries or robust spread are important.

Use an appropriate chart when clusters, gaps, skewness, several peaks, or other distributional features need to be seen.

Use inferential statistical methods when the goal is to draw conclusions beyond the entered observations.

Mean, median, mode, range, and frequency formulas

Let the observations be x₁ through xₙ and the sorted observations be x₍₁₎ ≤ … ≤ x₍ₙ₎. Mode uses exact parsed numerical frequencies.

Count
Sum
Arithmetic mean
Median for an odd count
Median for an even count
Mode set
Range
Relative frequency percentage
Each entered observation
Observation in sorted position i
Number of observations
Sum of all observations
Arithmetic mean
Exact frequency of numerical value v
Percentage of observations equal to value v
Range

Examples

Find mean, median, mode, and range

1, 2, 2, 3, 5

Count 5; sum 13; mean 2.6; median 2; mode 2; minimum 1; maximum 5; range 4.

Calculate an even-count median

1, 4, 7, 10

Mean 5.5; median 5.5; no mode; range 9.

The median is the average of the two central sorted values, 4 and 7.

Find two tied modes

1, 1, 2, 2, 3

Mean 1.8; median 2; modes 1 and 2; range 2.

Dataset with no mode

3, 6, 9, 12

Mean 7.5; median 7.5; no mode; range 9.

Compare mean and median with an extreme value

2, 3, 4, 5, 100

Mean 22.8; median 4; no mode; range 98.

The extreme observation moves the mean substantially while the median remains the middle sorted value.

Calculate negative values

−8, −3, −3, 2, 7

Sum −5; mean −1; median −3; mode −3; range 15.

Calculate decimal observations

0.5, 1.25, 1.25, 2

Sum 5; mean 1.25; median 1.25; mode 1.25; range 1.5.

Use scientific notation

1e3, 2.5e2, −5e1

The observations are parsed as 1,000, 250, and −50. Sum 1,200; mean 400; median 250; range 1,050.

Summarize one observation

7

Mean 7; median 7; no mode; minimum 7; maximum 7; range 0.

All observations are identical

5, 5, 5, 5

Mean 5; median 5; mode 5; range 0.

Equivalent numerical notation

1, 1.0, 1e0, −0, 0

The three representations of 1 share one frequency row. Negative zero is normalized and counted with zero.

Frequently Asked Questions

How do I calculate the mean?

Add every observation and divide the sum by the number of observations.

How do I find the median?

Sort the observations. Use the middle value for an odd count or average the two middle values for an even count.

How do I find the mode?

Count how often each exact numerical value appears. The value or tied values with the highest repeated frequency are the mode.

How do I calculate the range?

Subtract the minimum observation from the maximum observation.

What is the difference between mean and average?

Average can refer to several statistics, but in ordinary numerical use it commonly means the arithmetic mean: sum divided by count.

What is the difference between mean and median?

The mean uses the numerical size of every observation. The median uses the middle sorted position and is generally less influenced by a small number of extreme observations.

Which is better, mean or median?

Neither is universally better. Mean describes the arithmetic balance point, while median describes the middle sorted position. Which is more informative depends on the dataset and the question.

Can a dataset have more than one mode?

Yes. If several exact numerical values share the highest repeated frequency, the calculator reports every tied mode.

What happens when there is no mode?

When every distinct value occurs exactly once, the calculator reports No mode.

What if every value occurs the same number of times?

If the shared frequency is greater than one, every tied value is reported as a mode. If every value occurs only once, the calculator reports no mode.

Can the mean be a number that does not appear in the dataset?

Yes. The mean is calculated from the total and observation count and does not have to equal one of the entered values.

Can the median be a number that does not appear in the dataset?

Yes. With an even number of observations, the median is the average of the two middle sorted values and may not appear in the original dataset.

Can range be zero?

Yes. Range is zero when the minimum and maximum are equal, which means every observation has the same numerical value.

Can range be negative?

No. Maximum minus minimum is always zero or positive.

Can I enter negative numbers and decimals?

Yes. Ordinary negative values, decimals, leading decimals such as .5, and scientific notation such as 1e3 are supported.

Can I paste numbers from a spreadsheet?

Yes, as long as the pasted cells contain numerical values separated by whitespace, commas, semicolons, tabs, or line breaks and do not include headings or units.

Can I use commas as thousands separators?

No. Commas separate observations. Enter 1234 rather than 1,234 when the intended dataset contains one value.

Does 1.0 count as the same value as 1?

Yes. Both are parsed as the same numerical value and therefore share one exact-value frequency count.

Does 1e0 count as the same value as 1?

Yes. Scientific notation is converted to its numerical value before frequency counting.

Why can two different values look identical in the result?

Low display precision can make distinct observations appear the same after formatting. Frequency counting and CSV export still use their underlying parsed numerical values.

Does changing decimal places change the calculation?

No. The setting affects visible formatting only and does not alter the observations, calculations, or frequency counts.

What does the frequency percentage mean?

It is the number of times a value appears divided by the total observation count, multiplied by 100.

Why does the page show only 50 frequency rows?

For datasets with many distinct values, the on-page preview is limited to the first 50 rows to keep the result usable. The CSV export still contains the complete frequency table.

Does the CSV contain every frequency?

Yes. It contains every distinct parsed numerical value, its count, and its unrounded percentage value.

Why is the dataset limited to 50,000 values?

Parsing, sorting, frequency counting, calculation, rendering, and CSV generation all use local browser resources. The limit prevents unusually large pastes from monopolizing the page.

Does this calculator remove outliers?

No. Every valid entered observation remains in the calculation. Investigate suspected errors before deciding whether a value should be removed.

Is the mean and median line a histogram?

No. It only shows where the mean and median lie between the observed minimum and maximum. It does not display frequencies or the shape of the distribution.

Does this calculate population or sample statistics?

Mean, median, mode, range, and exact frequencies summarize the entered observations the same way. Whether those observations constitute a sample or a complete population depends on how the data were collected and how the result will be used.

Does this calculate standard deviation or variance?

No. Use the related Standard Deviation Calculator when you need variance or standard deviation.

References