Mean & Median Calculator

For 12, 18, 9, 22, 15 and 20, the sum is 96 and the mean is 16. The sorted middle pair is 15 and 18, giving a median of 16.5. Replace the upper value 22 with 220: the mean becomes 49 while the median stays 16.5.

That controlled change shows how one extreme upper observation affects these two summaries differently.

Mean & Median Calculator: inputs

Calculated result
Mean16
Median16.5

Mean & Median Calculator: Value 1 sensitivity

Mean & Median Calculator: Value 1 and Mean5 calculations vary the “Value 1” input while holding the other entered inputs constant.1015.71115.812161316.21416.3

Mean & Median: formula

Mean = Σvalues ÷ n; median = middle value of the sorted list

NIST: measures of location

The mean is sensitive to outliers, and the median ignores the size of extreme values entirely. Neither shows spread, so pair them with the standard deviation or the range. Small samples can mislead.

The mode, the most frequent value, is a third measure of center that this tool does not compute.

Mean & Median: worked example

Number of observations to include6
Value 112
Value 218
Value 39
Value 422
Value 515
Value 620
Mean16
Median16.5

Use observations measured in a common unit and over comparable periods. Mixing annual salaries with hourly rates produces a mean with no consistent meaning. Decide whether each entry represents a person, transaction or another observation before interpreting the middle value.

Mean & Median: changing Value 1

Changing the first observation alters the total used by the arithmetic average. The middle rank is found again after sorting each revised list, so median can remain flat while mean moves. Treat each row as an edited observation, not a forecast.
Value 1MeanMedian
1015.716.5
1115.816.5
12 (example)1616.5
1316.216.5
1416.316.5

Mean & Median: compare input ranges

Compare how much the selected center responds to each tested edit. Observation count changes sample membership; an individual-value edit changes one measurement within the selected list. A large response to one tested interval does not establish that the corresponding measurement is the least reliable.
InputTested fromToMean: low inputMean: high inputSwing
Number of observations to include1612164 (25%)
Value 2162015.716.30.667 (4.2%)
Value 4202415.716.30.667 (4.2%)
Value 6182215.716.30.667 (4.2%)
Value 5141715.816.30.5 (3.1%)
Value 1111315.816.20.333 (2.1%)
Value 381015.816.20.333 (2.1%)

Mean & Median: individual input comparisons

Read an observation group as a correction to that recorded measurement. The count group asks a different question: which prefix of the supplied list is included? Confirm membership before interpreting a difference between two averages, especially when unused slots contain zeros.
InputValueMeanMedian
Number of observations to include11212
21515
31312
415.315
515.215
61616.5
Value 11015.716.5
1115.816.5
121616.5
1316.216.5
1416.316.5
Value 21415.314.5
1615.715.5
181616.5
2016.317.5
2216.717.5
Value 3715.716.5
815.816.5
91616.5
1016.216.5
1116.316.5
Value 41815.316.5
2015.716.5
221616.5
2416.316.5
2616.716.5
Value 51215.515
1415.816
151616.5
1716.317.5
1816.518
Value 61615.315.5
1815.716.5
201616.5
2216.316.5
2416.716.5

Mean & Median: combined input changes

Two recorded observations are edited together in these crossed cases. Their combined effect on the arithmetic average follows the change in their sum. Median instead depends on where the revised observations sit in the sorted order, so the same size edit need not move both centers equally.
Value 1 / Value 2141822
101515.716.3
1115.215.816.5
1215.31616.7
1315.516.216.8
1415.716.317

Mean & Median: which assumptions move the result?

Mean & Median: Mean as Number of observations to include changesMean starts at 12. Moving Number of observations to include from 1 to 6 changes it to 16, with Value 1 12; Value 2 18; Value 3 9; Value 4 22; Value 5 15; Value 6 20 kept fixed.112215313415.3515.2616
Observation count selects a prefix of the displayed list. With only the first value included, the mean is 12. Including all six observations produces 16. That change does not describe repeated measurements of one fixed sample: observations have been added to the calculation. Inspect which values enter before attributing a movement in the average to a trend.
Mean & Median: Mean as Value 2 changesMean starts at 15.3. Moving Value 2 from 14 to 22 changes it to 16.7, with Number of observations to include 6; Value 1 12; Value 3 9; Value 4 22; Value 5 15; Value 6 20 kept fixed.1415.31615.718162016.32216.7
An edit to a single observation contributes only its share of the sum. There are six included values in this case, so changing the second from 16 to 20 adds four divided by six to the mean. The displayed endpoints round to 15.7 and 16.3. Median responds to the sorted ranks instead; its behavior need not follow that same increment.

Mean & Median: values and definitions

Retain the raw list alongside its center when reporting a sample. An average without its observation count conceals how many measurements contributed, and a median without the ranked values conceals the middle-position convention. The definition of an observation belongs with the result.
Quantity and definitionValue used
Number of observations to include — Uses the first 1–6 value slots; an included zero is data, not a missing-value marker.6
Value 112
Value 218
Value 39
Value 422
Value 515
Value 620
Mean16
Median16.5

Common error: Reporting the mean as the typical value in a skewed dataset. Median is the one built to resist outliers, and in a skewed set it's usually the closer answer to what a typical case looks like.

Equal centers do not establish symmetry

Mean and median can coincide in a distribution that is not symmetric. As an assumed five-observation example, take 0, 2, 3, 3 and 7: both centers are 3. Moving the last observation to 17 lifts the mean to 5 while the median remains 3.

Sorting identifies rank; summing preserves the magnitude of every observation. An included zero participates in both operations. An empty slot should be excluded by changing the observation count rather than replaced by an artificial zero.

These distinctions matter before interpreting the calculated center. Neither summary establishes how the sample was selected or whether a population inference is justified.

Statistics & Probability calculators: Standard Deviation Calculator, Range & Midrange Calculator, Permutation & Combination Calculator, Simple Probability Calculator, Z-Score Calculator, Confidence Interval Calculator.

Mean uses the magnitude of every included observation; median locates the middle rank after sorting. A large upper observation can pull the mean upward while leaving the median unchanged. That difference is useful to inspect, but agreement between the two centers does not prove symmetry or rule out extreme values.

Inspect the individual observations and their distribution. Equal mean and median can occur in an asymmetric set, so neither their agreement nor their separation alone establishes its shape.

Measure spread on the standard deviation and range calculators, compute weighted averages on the weighted average page, and find how far a value sits from the mean on the z-score calculator. The confidence interval page uses the mean to estimate a population. The percentage calculator helps with shares.

How do I find the median of an even number of values?

Sort the values from smallest to largest and take the average of the two middle values, since an even count has no single middle number.

What is the difference between mean and median?

The mean is the arithmetic average. Add the values and divide by their count. The median uses the sorted order and its middle position.

Extreme observations can move the mean substantially while leaving the middle position unchanged.

When should I use the median instead of the mean?

A skewed list can pull the mean toward an extreme. Incomes and house prices are familiar examples. The median describes the center of the sorted list instead, so compare it with the mean when a few unusually large or small values dominate the average.