Statistics & Probability

Statistics Calculator

This free statistics calculator finds the mean x¯=∑xn\bar{x} = \frac{\sum x}{n}, median, mode, range, quartiles, IQR, outliers, standard deviation and variance of any data set, with every step shown, a histogram and a box plot.

Try

Numbers separated by commas, spaces, tabs or new lines (up to 10,000). Paste a column or row straight from Excel or Google Sheets.

Affects Q1, Q3, the IQR and the outlier fences only.

Result

Mean (x̄): 15.83333333

Mean (x̄)

15.83333333

n = 12 values, median 15

Count (n)
12
Sum (Σx)
190
MedianAverage of the 6th and 7th values
15
Mode
15 (appears 3 times)
Range (max − min)
18 (from 9 to 27)
Five-number summaryMinimum, Q1, median, Q3, maximum
9, 12.5, 15, 18.5, 27
Quartiles and IQRMethod: median of halves (TI-84 method)
Q1 = 12.5, Q3 = 18.5, IQR = 6
Outliers (1.5 × IQR rule)
None (fences 3.5 and 27.5)
Sample standard deviation (s)Divides by n − 1; use for a sample
5.006056937
Population standard deviation (σ)Divides by n; use for a whole population
4.792934615
Sample variance (s²)
25.06060606
Population variance (σ²)
22.97222222
Standard error of the mean (s/√n)
1.44512416
Coefficient of variation (s/x̄)
31.6172%
Skewness (G₁)Positive: longer tail on the right
0.999901
Excess kurtosis (G₂)Positive: heavier tails than a normal distribution
1.01901
Mean absolute deviationAverage distance from the mean, Σ|x − x̄|/n
3.777777778
Geometric mean
15.16751779
Harmonic mean
14.55632502
Sorted data
9, 11, 12, 13, 14, 15, 15, 15, 18, 19, 22, 27

The 12 values have a mean of 15.8333 and a median of 15. A typical value lies about 5.006 from the mean (sample standard deviation). The data are skewed to the right (skewness 0.9999): a longer tail of high values pulls the mean above the median.

Histogram
012345ClassFrequency5–9: 15–910–14: 410–1415–19: 515–1920–24: 120–2425–29: 125–29
Box plot (five-number summary, 1.5 × IQR whiskers)
10152025ValueBox: Q1, median, Q3Mean
Frequency table (classes of width 5)
ClassFrequencyRelative frequencyCumulative frequency
5–918.333%1
10–14433.33%5
15–19541.67%10
20–2418.333%11
25–2918.333%12
Step-by-step working (7 steps)
  1. Sort the data

    From smallest to largest: 9, 11, 12, 13, 14, 15, 15, 15, 18, 19, 22, 27.

  2. Mean

    Add the values and divide by how many there are.

    x¯=∑xn=19012=15.83333333\bar{x} = \frac{\sum x}{n} = \frac{190}{12} = 15.83333333
  3. Median

    n = 12 is even, so the median is the average of values number 6 and 7.

    median=15+152=15\text{median} = \frac{15 + 15}{2} = 15
  4. Quartiles (median of halves)

    Split the sorted data into a lower half and an upper half of 6 values each. Q1 is the median of the lower half and Q3 the median of the upper half.

    Q1=12.5,Q3=18.5,IQR=Q3−Q1=6Q_1 = 12.5, \quad Q_3 = 18.5, \quad \text{IQR} = Q_3 - Q_1 = 6
  5. Sum of squared deviations

    Subtract the mean from each value, square the result and add them up.

    SS=∑(x−x¯)2=275.6666667SS = \sum (x - \bar{x})^2 = 275.6666667
  6. Variance and standard deviation

    The sample versions divide by n − 1; the population versions divide by n.

    s2=275.666666711=25.06060606,s=5.006056937σ2=275.666666712=22.97222222,σ=4.792934615s^2 = \frac{275.6666667}{11} = 25.06060606, \; s = 5.006056937 \qquad \sigma^2 = \frac{275.6666667}{12} = 22.97222222, \; \sigma = 4.792934615
  7. Outlier fences (1.5 × IQR rule)

    Every value lies inside the fences, so there are no outliers.

    Q1−1.5⋅IQR=12.5−1.5⋅6=3.5,Q3+1.5⋅IQR=27.5Q_1 - 1.5 \cdot \text{IQR} = 12.5 - 1.5 \cdot 6 = 3.5, \quad Q_3 + 1.5 \cdot \text{IQR} = 27.5
By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Type or paste your numbers into Data set. Commas, semicolons, spaces, tabs and new lines all separate values, so a row or a column copied from Excel or Google Sheets works as is.
  2. Use a minus sign for negative values and a period for decimals, for example −2.5. Do not use commas as thousands separators, because commas separate values.
  3. Choose a quartile method. Median of halves matches the TI-84 and most textbooks; linear interpolation matches Excel QUARTILE.INC and R.
  4. Read the mean at the top, then the median, mode, five-number summary, standard deviations and the other measures. Open the steps to see each formula with your numbers, and use Copy or Share to keep the result.

Formulas

Mean

x¯=1n∑i=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i

Plain-text formula: x̄ = (1/n)∑_{i = 1}^n x_i

The balance point of the data. The calculator adds the values with compensated (Neumaier) summation, so long lists lose no accuracy to rounding.

Median and mode

median=x(n+12) (n odd),median=x(n/2)+x(n/2+1)2 (n even)\text{median} = x_{\left(\frac{n+1}{2}\right)} \text{ (n odd)}, \qquad \text{median} = \frac{x_{(n/2)} + x_{(n/2 + 1)}}{2} \text{ (n even)}

Plain-text formula: median = x_((n + 1)/2) (n odd), median = (x_((n/2)) + x_((n/2 + 1)))/2 (n even)

Here x(k)x_{(k)} is the k-th value of the sorted list. The mode has no formula: it is the value that appears most often, and a data set can have one mode, several modes or none.

Sample and population variance

s2=∑(xi−x¯)2n−1,σ2=∑(xi−μ)2ns^2 = \frac{\sum (x_i - \bar{x})^2}{n - 1}, \qquad \sigma^2 = \frac{\sum (x_i - \mu)^2}{n}

Plain-text formula: s^2 = (∑(x_i − x̄)^2)/(n − 1), σ^2 = (∑(x_i − μ)^2)/n

s2,ss^2, s
sample variance and standard deviation (divide by n − 1)
σ2,σ\sigma^2, \sigma
population variance and standard deviation (divide by n)

Both use the sum of squared deviations from the mean, computed with the two-pass algorithm (mean first, then deviations) for full precision. The standard deviation is the square root of the variance.

Interquartile range and outlier fences

IQR=Q3−Q1,fences=Q1−1.5IQR and Q3+1.5IQR\text{IQR} = Q_3 - Q_1, \qquad \text{fences} = Q_1 - 1.5\,\text{IQR} \text{ and } Q_3 + 1.5\,\text{IQR}

Plain-text formula: IQR = Q_3 − Q_1, fences = Q_1 − 1.5 IQR and Q_3 + 1.5 IQR

The IQR is the spread of the middle half of the data. Values beyond the fences are flagged as possible outliers (Tukey’s rule, the same rule box plots use).

Standard error and coefficient of variation

SE=sn,CV=s|x¯|\text{SE} = \frac{s}{\sqrt{n}}, \qquad \text{CV} = \frac{s}{\left|\bar{x}\right|}

Plain-text formula: SE = s/√(n), CV = s/|x̄|

The standard error estimates how much the sample mean would vary from sample to sample. The coefficient of variation expresses the spread as a percentage of the mean, which lets you compare data measured on different scales.

Geometric mean, harmonic mean and mean absolute deviation

G=(∏xi)1/n,H=n∑1/xi,MAD=1n∑|xi−x¯|G = \left(\prod x_i\right)^{1/n}, \qquad H = \frac{n}{\sum 1/x_i}, \qquad \text{MAD} = \frac{1}{n}\sum \left|x_i - \bar{x}\right|

Plain-text formula: G = (∏x_i)^(1/n), H = n/(∑1/x_i), MAD = 1/n∑|x_i − x̄|

The geometric mean suits growth rates and ratios, and the harmonic mean suits rates such as speeds; both need every value above 0. The mean absolute deviation is the average distance from the mean. Kurtosis is reported as the adjusted sample excess kurtosis (Excel KURT), which is about 0 for normally distributed data.

Reading the result

Start with the center: the mean and the median. When they are close, the data are roughly symmetric. A mean well above the median signals a long right tail (a few large values), and the skewness will be positive.

Then look at the spread. The standard deviation is the typical distance of a value from the mean, in the same units as the data. The IQR is the width of the middle 50% and is not affected by extreme values, so it is the better measure when outliers are present. The box plot shows both at a glance: the box spans Q1 to Q3, the line inside is the median and the whiskers reach the most extreme values inside the fences.

Flagged outliers are not errors by definition. Check whether each one is a typing mistake, a measurement problem or a genuine extreme value before you remove anything.

How to find the mean, median and mode

Take the scores 13, 16, 12, 14, 19, 12, 14, 13, 14. First sort them: 12, 12, 13, 13, 14, 14, 14, 16, 19. There are n = 9 values and their sum is 127.

Mean: divide the sum by the count, 127 / 9 ≈ 14.11. Median: with an odd count, take the middle value, number (9 + 1) / 2 = 5 in the sorted list, which is 14. With an even count, average the two middle values instead. Mode: 14 appears three times, more than any other value, so the mode is 14. Range: 19 − 12 = 7.

The calculator above follows the same steps and shows them with your own numbers, so you can check homework line by line. If you only need the average, a weighted average or the score needed to reach a target average, the average calculator is quicker.

How to find the quartiles and the IQR

Sort the data and find the median. For 4, 4, 6, 7, 10, 11, 12, 14, 15 the median is 10. With the median-of-halves method, Q1 is the median of the lower half 4, 4, 6, 7, so Q1 = 5, and Q3 is the median of the upper half 11, 12, 14, 15, so Q3 = 13. The interquartile range is IQR = 13 − 5 = 8.

The outlier fences are 5 − 1.5 × 8 = −7 and 13 + 1.5 × 8 = 25. Every value lies inside them, so this data set has no outliers. Together, the minimum, Q1, median, Q3 and maximum (4, 5, 10, 13, 15) form the five-number summary that a box plot draws.

Which statistic should you report?

Pair a measure of center with a measure of spread of the same kind. The table lists the common choices.

Choosing descriptive statistics
DataCenterSpread
Roughly symmetric, no outliersMeanStandard deviation
Skewed or with outliers (incomes, house prices, reaction times)MedianIQR or the five-number summary
Categories or repeated whole numbers (shoe sizes, dice rolls)ModeFrequency table
Growth rates or ratiosGeometric meanRange of the ratios

Sample or population: which numbers should you report?

Use the sample standard deviation ss (dividing by n − 1) when your values are a sample from a larger group, for example 30 students from a school or 12 batches from a production run. Dividing by n − 1 corrects for the fact that a sample tends to sit closer to its own mean than to the true mean.

Use the population standard deviation σ\sigma (dividing by n) only when the data include every member of the group you want to describe, such as the final scores of every player in one season. For large n the two are almost the same; for small n the sample version is noticeably larger. For the full working of the standard deviation alone, with grouped data, use the standard deviation calculator.

Why quartiles differ between calculators

There is no single agreed definition of a quartile for a finite list. The median of halves method splits the sorted data at the median (leaving the median out when n is odd) and takes the median of each half. It always returns a data value or the midpoint of two data values.

The linear interpolation method places Q1 at position 0.25(n−1)0.25(n - 1) and Q3 at 0.75(n−1)0.75(n - 1) in the sorted list (counting from 0) and interpolates between neighbors. For the 11 values 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 the first method gives Q1 = 15 and Q3 = 43; the second gives Q1 = 25.5 and Q3 = 42.5. Choose the method your course, software or report expects.

Statistics on a TI-84, Casio or Excel

On a TI-84, enter the data in a list with STAT, Edit, then run STAT, CALC, 1-Var Stats. It reports x̄, Σx, Sx (the sample standard deviation), σx (the population one), n, minX, Q1, Med, Q3 and maxX, which match this page with the median-of-halves quartile method. Casio scientific calculators with a statistics mode give the mean, standard deviations and count in the same way, though the quartile rule can differ by model.

In Excel or Google Sheets, the matching functions are AVERAGE, MEDIAN, MODE.MULT, STDEV.S, STDEV.P, VAR.S, VAR.P, QUARTILE.INC (choose linear interpolation here), SKEW and KURT. A handheld calculator is only needed when an exam bans other devices; for homework and checking, this page gives the same numbers with the working shown. See choosing the right calculator for when a scientific or graphing calculator fits better.

Worked example

Twelve quiz scores

Summarize the scores 12, 15, 11, 18, 22, 15, 9, 14, 15, 27, 13, 19.

  1. Sorted: 9, 11, 12, 13, 14, 15, 15, 15, 18, 19, 22, 27. The sum is 190 and n = 12.
  2. Mean: x¯=190/12≈15.833\bar{x} = 190 / 12 \approx 15.833. Median: the 6th and 7th values are both 15, so the median is 15. The mode is 15 (three times).
  3. Quartiles (median of halves): lower half 9, 11, 12, 13, 14, 15 gives Q1 = 12.5; upper half 15, 15, 18, 19, 22, 27 gives Q3 = 18.5; IQR = 6. The five-number summary is 9, 12.5, 15, 18.5, 27.
  4. Fences: 12.5 − 9 = 3.5 and 18.5 + 9 = 27.5. The largest score, 27, is just inside, so there are no outliers.
  5. Sum of squared deviations SS ≈ 275.667. Sample variance s2=275.667/11≈25.061s^2 = 275.667 / 11 \approx 25.061, so s≈5.006s \approx 5.006. Population: σ2≈22.972\sigma^2 \approx 22.972, σ≈4.793\sigma \approx 4.793.

Answer: Mean ≈ 15.833, median 15, mode 15, range 18, Q1 = 12.5, Q3 = 18.5, no outliers, s ≈ 5.006, σ ≈ 4.793, standard error ≈ 1.445, coefficient of variation ≈ 31.62%.

Frequently asked questions

What calculator is used for statistics?

For coursework, a graphing calculator such as the TI-84 Plus or a scientific calculator with a statistics mode, such as many Casio models, computes the mean, standard deviation and quartiles. Online, a statistics calculator like this one gives the same results with the working shown, and Excel or Google Sheets handle large data sets.

What is the difference between the mean and the median?

The mean adds every value and divides by the count, so a single extreme value can move it a lot. The median is the middle value of the sorted list and ignores how far the extremes are. For incomes or house prices the median is usually the more representative center.

What if there is no mode or more than one?

When every value appears exactly once, the calculator reports no mode. When several values tie for the highest count (at least twice each), all of them are listed, so a data set can be bimodal or multimodal.

Why does my textbook or Excel give different quartiles?

Quartile methods differ. Choose median of halves to match TI-84 calculators and most textbooks, or linear interpolation to match Excel QUARTILE.INC, Google Sheets QUARTILE and R’s default. The median, mean and standard deviation are the same either way.

Can I paste data from Excel or Google Sheets?

Yes. Copy a column or a row and paste it into the data box: new lines, tabs, commas, semicolons and spaces all separate values. Remove any header cell and any thousands separators first.

How many numbers can I enter?

Up to 10,000 values. All statistics are computed in your browser in a few milliseconds; long lists are shortened in the sorted-data display but every value is used.

What does the standard error of the mean tell me?

It estimates how far the sample mean is likely to be from the true population mean. Roughly, the true mean lies within about two standard errors of the sample mean for moderately large samples.

How is the histogram binned?

Data with a few repeated values (such as dice rolls) get one bar per value. Otherwise the number of classes follows Sturges’ rule, ⌈log₂ n⌉ + 1 (between 5 and 20), and the class width is rounded up to a round number such as 2, 5 or 10 so the class limits are easy to read.

Standard Deviation Calculator

Sample or population standard deviation and variance, with grouped data and a step-by-step deviation table.

Statistics & Probability

Linear Regression Calculator

Line of best fit with r², slope p-value, 95% intervals and steps, plus five curved regression models.

Statistics & Probability

Poisson Distribution Calculator

Exact and cumulative Poisson probabilities for any average rate λ, with steps, a table and a graph.

Statistics & Probability

Average Calculator

The average (mean) of a list of numbers with steps, plus weighted averages and the score needed for a target.

Statistics & Probability

Graphing Calculator

Plot functions, equations, inequalities, parametric and polar curves; find roots and intersections.

Tools

Learn more: For statistics on a list of values in the full calculator, read statistics and distributions.

Sources and further reading

  1. NIST/SEMATECH e-Handbook of Statistical Methods, Chapter 1: Exploratory Data Analysis (opens in a new tab), National Institute of Standards and Technology
  2. Introductory Statistics 2e, Chapter 2: Descriptive Statistics (opens in a new tab), OpenStax, Rice University
  3. Sample Quantiles in Statistical Packages (R. J. Hyndman and Y. Fan), The American Statistician 50(4), 1996 (opens in a new tab), American Statistical Association

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?