Use this Mean, Median, Mode & Range Calculator to summarize a dataset with the statistics that describe its center and spread. Enter raw numbers to calculate the arithmetic mean, median, mode, range, sum, count, variance and standard deviation, then use the additional tools for weighted, geometric, harmonic and trimmed means, grouped data, target-score calculations, dataset comparisons, and outlier and skewness analysis.
The calculator is designed to show the calculation rather than only the final number. Depending on the module, you can inspect frequency distributions, box-plot information, step-by-step derivations, comparison metrics, Tukey outlier fences and other supporting results.
What Are Mean, Median, Mode and Range?
Mean, median, mode and range are four basic ways to summarize a dataset.
The arithmetic mean, commonly called the average, is found by adding all observations and dividing by the number of observations:
The median is the middle value after the observations have been arranged in ascending or descending order. With an odd number of observations, it is the single middle value. With an even number of observations, it is the average of the two middle values.
The mode is the value that occurs most frequently. A dataset can have one mode, more than one mode, or no repeated value at all.
These measures answer different questions. The mean uses every observation, the median identifies the central position of ordered data, the mode identifies the most frequent value, and the range gives the total distance between the smallest and largest observations.
How to Calculate the Mean
To calculate the arithmetic mean, add every value and divide the total by the number of values.
For example, consider:
The sum is:
There are:
Therefore:
The mean is 30. The calculator performs the same operation automatically for the complete dataset you enter.
For a sample, the arithmetic mean is usually written x̄. For a population, the corresponding notation is μ. The arithmetic formula for the average itself is the same; the distinction between sample and population becomes important when estimating population quantities and when calculating measures such as variance and standard deviation.
How to Find the Median
The median depends on the ORDER of the data. First arrange the observations from smallest to largest.
Odd Number of Values
Median = middle ordered value at position (n + 1) / 2
Example: 3, 8, 12, 15, 21 → Middle value is 12.
Even Number of Values
Median = average of the two middle ordered values
Example: 3, 8, 12, 15 → (8 + 12) / 2 = 10.
The calculator sorts the data as needed for the median calculation without requiring you to manually reorder the values first.
How to Find the Mode
The mode is the value that occurs most often in a dataset. For example:
A dataset does not have to have a unique mode. If two values share the highest frequency, the dataset is bimodal. If several values share the highest frequency, it is multimodal. For example:
A dataset in which every observation occurs only once has no repeated mode. The calculator therefore reports the actual frequency structure rather than assuming that every dataset has exactly one mode.
How to Calculate Range
Range is the simplest measure of spread:
Suppose the dataset is: 5, 8, 12, 20, 25. The maximum is 25 and the minimum is 5.
The range is easy to calculate, but it uses only the two extreme observations. It does not describe how the rest of the observations are distributed between those extremes. That is why range is often interpreted alongside the mean, median, variance, standard deviation or other measures of spread.
Mean vs Median — Which Should You Use?
There is no single measure of center that is best for every dataset.
The mean incorporates every numerical observation. This makes it useful when the arithmetic average is meaningful, but it also makes the mean sensitive to extreme values and skewed distributions.
The median is based on position after ordering the observations. Because it does not depend on the precise magnitude of the most extreme observations, it is often more resistant to outliers.
Without Outlier
10, 11, 12, 13, 14
Mean = 12, Median = 12
With Extreme Outlier
10, 11, 12, 13, 100
Mean = 29.2, Median = 12
For a roughly symmetric distribution without influential outliers, the mean is often an informative center. For skewed data or data containing extreme observations, the median can provide a more robust description of a typical value.
When you need to examine variability more deeply, the Standard Deviation Calculator can be used for a dedicated standard-deviation calculation and sample/population comparison.
Choosing a Measure of Center
Mean, median and mode describe different aspects of the same dataset, so the best choice depends on the distribution and analytical purpose.
A Worked Mean, Median, Mode and Range Example
Consider the dataset used in the calculator's standard example:
Step 1: Count & Sum
N = 15 observations. Sum = 3 + 7 + 5 + ... + 29 = 330.
Step 2: Arithmetic Mean
Mean = 330 / 15 = 22.
Step 3: Ordered Dataset for Median
Because there are 15 observations, the eighth observation is the median: Median = 23.
Step 4: Frequency & Mode
The value 23 occurs four times, more frequently than any other value: Mode = 23.
Step 5: Range
The minimum is 3 and the maximum is 56: Range = 56 − 3 = 53.
Why an Outlier Can Change the Mean
The arithmetic mean uses every observation, so an unusually large or small value can move the mean substantially. Consider:
The value 100 is much larger than the other observations. The median remains tied to the middle positions of the ordered dataset, while the mean is pulled upward by the extreme value.
This is why comparing mean and median can help identify the effect of skewness or extreme observations. An outlier is not automatically an error; it may represent a legitimate observation. The appropriate response depends on the context and on why the observation is unusually large or small.
Variance and Standard Deviation
Variance and standard deviation describe how dispersed observations are around their mean.
Population Metrics
σ² = Σ(xᵢ − μ)² / N
σ = √σ²
Sample Metrics (Bessel's Correction)
s² = Σ(xᵢ − x̄)² / (n − 1)
s = √s²
The distinction between N and n−1 matters. The calculator allows the applicable sample/population selection so the resulting variance and standard deviation can be interpreted using the chosen statistical convention.
For example, for 1, 2, 3, 4, 5 (Mean = 3):
- Population Variance: 2 | Population SD: √2 ≈ 1.4142
- Sample Variance: 2.5 | Sample SD: √2.5 ≈ 1.5811
Changing sample/population mode should not change the mean, median, mode or range; it changes the corresponding dispersion calculation.
Frequency Distribution and the Mean
A frequency distribution shows how often each distinct value occurs. Instead of writing all observations separately, the same information can be represented using values and frequencies. The arithmetic mean can then be written as:
The calculator's frequency chart plots each distinct data value against its frequency. A taller bar means that the corresponding value occurs more often. The calculator also marks Mean and Median on the distribution to help show why the arithmetic mean and median need not coincide.
Advanced Means: Weighted, Geometric, Harmonic & Trimmed
What Is a Weighted Mean?
A weighted mean gives some observations more influence than others:
For values 10, 15, 18, 20, 22, 25, 150 with weights 1, 2, 3, 4, 5, 6, 7: Total weight = 28, Weighted sum = 1484 → Weighted Mean = 53.
What Is a Geometric Mean?
The geometric mean combines positive values multiplicatively rather than additively:
For 2 and 8: GM = √(2 × 8) = √16 = 4. Especially useful when quantities combine by multiplication or when proportional growth factors are summarized.
What Is a Harmonic Mean?
The harmonic mean is based on reciprocals:
For 2 and 4: HM = 2 / (1/2 + 1/4) = 2 / 0.75 ≈ 2.6667. Useful in situations where rates or ratios are being combined.
What Is a Trimmed Mean?
A trimmed mean reduces the influence of extreme observations by removing a specified proportion of the smallest and largest values before calculating the mean.
For 10, 15, 18, 20, 22, 25, 150 with a 15% trim: extreme tail values 10 and 150 are removed, leaving 15, 18, 20, 22, 25 → Trimmed Mean = 20.
If the dataset's main question is variability rather than central tendency, the Standard Deviation Calculator provides a focused workflow for standard deviation and variance.
Grouped Data Mean & Modal Class
When individual observations are unavailable but class midpoints and frequencies are known, the grouped mean can be estimated using:
For midpoints 15, 25, 35, 45, 55 with frequencies 4, 8, 15, 7, 2:
- Total Frequency: 4 + 8 + 15 + 7 + 2 = 36
- Weighted Sum: 15(4) + 25(8) + 35(15) + 45(7) + 55(2) = 1210
- Grouped Mean: 1210 / 36 ≈ 33.6111
- Modal Class: 35 (highest frequency = 15)
An important limitation is that grouped data does not preserve every original observation. The resulting grouped mean is therefore an estimate based on the available grouped representation rather than necessarily the exact mean of the underlying raw observations.
Target Mean Solver — What Score Do I Need?
The Target Mean Solver answers a practical question: "What score do I need on the remaining test to reach my target average?"
Example: Current scores 85, 90, 88, 92 (Sum = 355), Desired average = 90, Total tests = 5. Target total = 90 × 5 = 450. Required score = 450 − 355 = 95% (Achievable).
Comparing Two Datasets
Sometimes the useful question is not "What is the center of this dataset?" but "How do these two datasets differ?"
The calculator's two-dataset comparison places Dataset A and Dataset B side by side and reports Count, Mean, Median, Range, and Standard Deviation, alongside Delta (B − A).
Dataset B: 10, 14, 19, 24, 30, 35 (Mean = 22, Med = 21.5, Range = 25, s ≈ 9.5289)
Delta (B − A): ΔMean = +2.00, ΔMedian = +1.50, ΔRange = +9.00, Δs ≈ +3.4297
Skewness, IQR & Outlier Detection
Skewness describes asymmetry in a distribution. A right-skewed distribution has a longer upper tail, pulling the mean higher than the median.
The Outlier Detection module uses the Tukey 1.5×IQR rule:
For dataset 10, 12, 14, 15, 15, 16, 18, 20, 22, 100: Tukey fences are [6.375, 27.375]. The observation 100 lies above the upper fence and is identified as an outlier, with Pearson skewness ≈ 2.5802 (Right-Skewed).
Mean vs Median vs Mode vs Range
| Measure | What it describes | Main calculation | Outlier sensitivity |
|---|---|---|---|
| Mean | Arithmetic center | Σx / n | High |
| Median | Positional center | Middle ordered value(s) | Lower |
| Mode | Most frequent value | Highest frequency | Context-dependent |
| Range | Total span | Max − Min | High |
For calculations centered on standard deviation, variance and dispersion rather than the complete central-tendency suite, see the Standard Deviation Calculator.
Common Mistakes When Calculating Mean, Median, Mode and Range
Forgetting to count every observation
A single omitted observation changes the sum, count and mean.
Finding the median without sorting
The median is positional, so the observations must be considered in order.
Assuming every dataset has one mode
Some datasets are bimodal, multimodal or have no repeated mode.
Confusing range with standard deviation
Range is max minus min. Standard deviation summarizes squared deviations from mean.
Ignoring influential outliers
An extreme value may significantly pull the mean away from the true center.
Misreading negative target-score results
A negative required score means the target is already exceeded; it does not require a negative grade.
Export, Save and Reuse Your Results
When calculations need to be retained, the calculator provides unified toolbar actions:
- Save: Stores an immutable snapshot of calculation results in browser memory.
- Copy Summary & Copy LaTeX: Copies full analytical summaries or LaTeX equations to clipboard.
- Export CSV: Downloads multi-module structured spreadsheet data.
- Print / Save PDF: Launches a compact 2-page executive summary report with zero blank whitespace.
- Share: Generates a permalink preserving active dataset parameters in the URL.
Frequently Asked Questions
Verified answers to common questions about mean, median, mode, range and advanced statistics.
Related Calculators
Statistics Calculator
Use a broader statistics workflow when your analysis extends beyond measures of center and requires additional descriptive statistics.
Standard Deviation Calculator
Calculate variance and standard deviation in a dedicated statistical workflow.
- OpenStax Introductory Statistics (Chapter 2: Descriptive Statistics, Measures of Central Tendency & Spread).
- Penn State Eberly College of Science, STAT 200 (Measures of Center: Mean, Median, Mode & Skewness).
- NIST/SEMATECH e-Handbook of Statistical Methods (Section 1.3.5: Quantitative Measures of Location and Dispersion).
This calculator provides descriptive statistical calculations based on the data and options entered by the user. The numerical result should be interpreted in the context of the dataset, measurement process, sampling method and statistical convention being used. Grouped-data results may be estimates because the individual observations are not available. Outlier flags identify observations under the selected statistical rule; they do not by themselves establish that an observation is incorrect. Descriptive differences between datasets do not by themselves prove statistical significance or causation. For academic, scientific, engineering or professional analysis, verify the assumptions and statistical method appropriate to the specific problem.