Mean, Median, Mode & Range Calculator
Enter up to 50,000 numbers separated by commas, spaces, semicolons, tabs, or new lines. Calculate mean, median, tied modes, range, sum, count, minimum, maximum, and export a complete exact-value frequency table as CSV.
Separate numbers with commas, spaces, semicolons, or new lines. Maximum 50,000 values.
Enter numbers to calculate the mean, median, mode, and range.
How to Use the Calculator
Enter a list of numbers in the input box. Separate observations with commas, spaces, semicolons, tabs, or line breaks.
The calculator immediately returns the mean, median, mode, and range. It also shows the count, sum, minimum, and maximum.
Use the decimal-place selector to control visible rounding. The underlying observations and calculated results are not changed.
Use Copy to copy the summary or Frequency CSV to download the complete exact-value frequency table.
Accepted and rejected input formats
Swipe horizontally to view the full table.
What Mean, Median, Mode, and Range Measure
Mean, median, and mode are measures of location or central tendency, but they do not define the centre in the same way.
Mean uses every observation. Median uses the sorted middle position. Mode uses repetition.
Range is a measure of spread rather than centre. It reports the distance between the smallest and largest observations.
Looking at all four together gives more context than selecting one number without considering the shape of the data.
Mean, median, mode, and range compared
Swipe horizontally to view the full table.
Worked Example: 2, 3, 4, 5, 100
This dataset shows why a complete summary is more useful than one average.
The four smaller values sit between 2 and 5, but the value 100 raises the mean to 22.8.
The median remains 4 because it depends on sorted position rather than the distance to the largest observation.
Every value appears once, so the calculator reports no mode. The range is 98.
Worked calculation for 2, 3, 4, 5, 100
Swipe horizontally to view the full table.
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 value contributes to the result. Increasing one value by 30 increases the total by 30 and therefore changes the mean by 30 divided by the count.
The calculator uses compensated summation to reduce avoidable floating-point error when adding long datasets or values with very different magnitudes.
How the Median Is Calculated
The median is found after the observations are sorted from lowest to highest.
For an odd number of observations, the median is the single middle value. In 2, 4, 9, the median is 4.
For an even number of observations, the median is the arithmetic average of the two middle values. In 1, 4, 7, 10, the median is 5.5.
The median is often less affected than the mean by a small number of extremely high or low values.
How the Mode Is Calculated
The mode is the exact value or values with the highest repeated 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, the modes are 1 and 2 because both occur twice. This is a tied or multimodal result.
When every distinct value occurs once, the calculator reports No mode.
Exact Values and Tied Modes
Frequency counting happens after each token has been converted into a number.
Inputs such as 1, 1.0, and 1e0 all become the numerical value 1 and therefore share one frequency count.
Nearby values remain different. For example, 1.2 and 1.2001 are separate observations even when the selected display precision makes both appear as 1.2.
The calculator does not round values into groups before finding the mode.
How the Range Is Calculated
Range equals the maximum observation minus the minimum observation.
For 3, 5, 8, and 11, the range is 11 − 3, or 8.
Range remains in the same unit as the original observations.
It is easy to calculate but uses only two values. It does not describe how the remaining observations are distributed between the endpoints.
Mean Versus Median When Outliers Are Present
Mean and median can be similar in balanced data and very different in skewed data.
In the dataset 2, 3, 4, 5, 100, the mean is 22.8 while the median is 4.
Neither result is mathematically wrong. The mean describes the arithmetic balance point, while the median describes the middle sorted position.
For salaries, property prices, response times, and other long-tailed data, reporting both values can prevent one measure from hiding an important feature of the distribution.
How Different Datasets Produce Different Summaries
The same statistic can tell a different story depending on the distribution of observations.
A repeated value can become the mode without being close to the mean. Two datasets can also share the same range while having completely different centres and frequency patterns.
Use the table to compare how the four measures respond to symmetry, outliers, repetition, tied modes, and negative values.
How data shape changes the four measures
Swipe horizontally to view the full table.
Count, Sum, Minimum, and Maximum
Count is the number of observations included in the calculation.
Sum is the total of all observations and is used directly in the arithmetic mean.
Minimum and maximum are the smallest and largest entered values after numerical parsing.
These supporting results make the main statistics easier to verify and help reveal incomplete or incorrectly entered data.
Frequency Counts and Percentages
A frequency table records how often each exact numerical value occurs.
Relative frequency expresses that count as a percentage of the full dataset.
For example, if the value 4 appears 3 times in a dataset of 12 observations, its frequency is 3 and its percentage is 25%.
The CSV export includes every distinct value, its count, and its percentage, even when the interface displays only the main summary statistics.
Common Uses for Descriptive Statistics
These measures are useful for quickly summarizing test scores, prices, salaries, measurements, response times, delivery times, survey answers, sales figures, sports results, and experimental observations.
The most useful measure depends on the question, the data type, and the shape of the distribution.
A calculation can be numerically correct while still being misleading when observations use inconsistent units, definitions, periods, or collection methods.
Using descriptive statistics in practical datasets
Swipe horizontally to view the full table.
Check the Dataset Before Interpreting the Results
Confirm that every observation represents the same quantity and unit. Do not combine metres with centimetres, monthly values with annual values, or scores from different scales without converting them first.
Check for copied headings, blank cells, placeholders, duplicated records, missing periods, impossible measurements, and values entered with the wrong decimal separator.
Decide how missing values should be handled before using the calculator. A missing observation is not automatically zero.
Investigate apparent outliers before deleting them. An extreme value may be a data-entry error, but it may also be a valid and important observation.
Decimal Places and Display Rounding
The decimal-place setting changes only the text shown in the result.
Calculations and frequency counts use the parsed numerical values rather than the visibly rounded versions.
Two distinct values can therefore look identical at a low display precision while remaining separate in the frequency CSV.
Choose enough decimal places to match the precision and purpose of the original measurements rather than displaying digits the source data does not support.
Scientific Notation and Negative Values
Scientific notation is useful for very large or very small observations. For example, 1e3 is parsed as 1,000 and 2.5e-4 is parsed as 0.00025.
Negative values are supported. Their numerical ordering, sum, mean, median, frequencies, and range are calculated normally.
A negative range is impossible because the minimum is always subtracted from the maximum.
Why Commas Cannot Separate Thousands
A comma is treated as a boundary between observations.
Entering 1,234 therefore creates the two values 1 and 234 rather than the single value one thousand two hundred thirty-four.
Enter 1234 without a grouping comma when it is one observation.
This rule keeps pasted lists predictable and avoids guessing whether a comma separates values or groups digits.
Numerical Precision and the 50,000-Value Limit
Calculations use JavaScript double-precision floating-point numbers.
Compensated and scaled summation reduce common accumulation and intermediate-overflow problems, but they do not provide exact arbitrary-precision decimal arithmetic.
Values and results outside JavaScript's finite numerical range are rejected rather than displayed as Infinity or NaN.
The 50,000-value limit bounds local parsing, sorting, frequency counting, memory use, and CSV generation so one unusually large paste does not monopolize the page.
When Mean, Median, Mode, and Range Are Not Enough
These measures provide a compact descriptive summary but do not show the complete distribution.
Use variance or standard deviation when spread across all observations matters.
Use quartiles, percentiles, or the interquartile range when position and robust spread are important.
Use charts when shape, clusters, gaps, skewness, or several peaks need to be seen.
Use inferential statistical methods when the goal is to draw conclusions about a wider population rather than only describe the entered values.
Privacy and Local Processing
Parsing, sorting, frequency counting, statistical calculation, copying, and CSV generation run entirely in the browser.
The entered dataset is not uploaded, added to a public URL, connected to an account, or permanently stored by the tool.
Clipboard access is requested only when Copy is used. The CSV file is generated locally when requested.
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.
Formula variables
- Each entered observation
- The 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 v
- Range
Examples
Find mean, median, mode, and range
1Input
1, 2, 2, 3, 5
Show result
Result
Count 5; sum 13; mean 2.6; median 2; mode 2; minimum 1; maximum 5; range 4.
Calculate an even-count median
2Input
1, 4, 7, 10
Show result
Result
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
3Input
1, 1, 2, 2, 3
Show result
Result
Mean 1.8; median 2; modes 1 and 2; range 2.
Dataset with no mode
4Input
3, 6, 9, 12
Show result
Result
Mean 7.5; median 7.5; no mode; range 9.
Compare mean and median with an outlier
5Input
2, 3, 4, 5, 100
Show result
Result
Mean 22.8; median 4; no mode; range 98.
The extreme value raises the mean but does not change the middle sorted value.
Calculate negative values
6Input
−8, −3, −3, 2, 7
Show result
Result
Sum −5; mean −1; median −3; mode −3; range 15.
Calculate decimal observations
7Input
0.5, 1.25, 1.25, 2
Show result
Result
Sum 5; mean 1.25; median 1.25; mode 1.25; range 1.5.
Use scientific notation
8Input
1e3, 2.5e2, −5e1
Show result
Result
The values are parsed as 1,000, 250, and −50. Sum 1,200; mean 400; median 250; range 1,050.
Summarize one observation
9Input
7
Show result
Result
Mean 7; median 7; no mode; minimum 7; maximum 7; range 0.
All observations are identical
10Input
5, 5, 5, 5
Show result
Result
Mean 5; median 5; mode 5; range 0.
Equivalent numeric notation
11Input
1, 1.0, 1e0, −0, 0
Show result
Result
The three forms 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 values. 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 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 measures, but in everyday numerical work it usually means the arithmetic mean: sum divided by count.
What is the difference between mean and median?
Mean uses the numerical size of every observation. Median uses the middle position after sorting and is usually less affected by extreme values.
Which is better, mean or median?
Neither is universally better. Mean describes the arithmetic balance point, while median describes the middle sorted position. The most useful choice depends on the data and question.
Can a dataset have more than one mode?
Yes. When several exact values share the highest repeated frequency, this calculator reports every tied value.
What happens when there is no mode?
When every distinct value appears once, the calculator reports No mode.
What if every value appears the same number of times?
When the shared frequency is greater than one, every tied value is reported as a mode. When every value occurs once, the calculator reports no mode.
Can the mean be a value that does not appear in the dataset?
Yes. The arithmetic mean is calculated from the total and count and does not need to match an entered observation.
Can the median be a value that does not appear in the dataset?
Yes. With an even number of observations, the median is the average of two middle values and may not appear in the original data.
Can the range be zero?
Yes. The range is zero when the minimum and maximum are equal, meaning every observation has the same value.
Can the 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 are supported.
Can I paste numbers from a spreadsheet?
Yes, provided the pasted cells are separated by spaces, tabs, commas, semicolons, 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 it is one value.
Does 1.0 count as the same value as 1?
Yes. Both tokens are parsed as the same numerical value and share one frequency count.
Why can two distinct values look the same in the results?
The selected display precision may round them to the same visible text. Frequency counting and CSV export still use their underlying parsed values.
Does changing decimal places change the answer?
No. It changes only visible formatting and does not alter the observations or calculations.
What does the frequency percentage mean?
It is the number of times a value appears divided by the total observation count, multiplied by 100.
Does the CSV contain the complete frequency table?
Yes. It exports every distinct parsed value with its exact count and unrounded percentage value.
Why is the dataset limited to 50,000 values?
The browser performs parsing, sorting, frequency counting, calculation, and CSV generation locally. The limit prevents unusually large pastes from monopolizing the page.
Does this calculator remove outliers?
No. Every valid entered observation is included. Review suspected errors before deciding whether an observation should be removed.
Does this calculate population or sample statistics?
Mean, median, mode, and range summarize the entered values the same way in either case. Whether the data represents a sample or a full population depends on how it was collected.
Does this calculate standard deviation or variance?
No. Use the related Standard Deviation Calculator for variance and standard deviation.
Are my values uploaded or stored?
No. Parsing, calculation, copying, and CSV generation happen locally in the browser.
References
You might also like
Standard Deviation & Variance Calculator
Calculate sample or population standard deviation, variance, mean, range, sum of squares, and every deviation from the mean.
Percentage Calculator
Calculate percentages, percent change, increase, decrease, difference, discount, markup, markdown, tax, tips, and equal bill splits.
Circle Calculator
Calculate a circle's area, circumference, radius, and diameter from any one known measurement.
Temperature Converter
Convert temperature values between Celsius, Fahrenheit, Kelvin, and Rankine with absolute-zero validation.