Skip to content

Statistics Calculator

Paste a data set to get every common statistic at once: averages, quartiles, outliers, spread, shape, percentiles and a confidence interval, with a box plot and histogram. Add a second set for correlation and a line of best fit.

More options
Your data is

Separate them with commas, spaces or new lines, or paste a spreadsheet column. Type 15x3 for 15 three times.

Is this a sample or the whole population?

Sample if your numbers are part of a bigger group (like 15 students out of a school). Population if you have every value.

Gives its z-score and percentile rank.

Each y pairs with the x in the same place. Clear this box to skip it.

ResultUpdates as you type—Mean (average)—Median—Mode—Standard deviation (s)—Variance (s²)—Count (n)—Sum—Range—Q1 · Q3—Outliers—Standard error of the mean—Coefficient of variation—Skewness—Excess kurtosis—95% confidence interval for the meanFive-number summary and box plotHistogramPercentilesMore statisticsQuartiles by each methodConfidence intervals for the mean (t-distribution)Two data sets: correlation and line of best fit
Z-score table
Sorted data and frequency table
Histogram table

How your statistics are worked out

Sort the numbers, find the middle and the quarters, average them, then measure the spread.

  1. 1

    Sort the numbers

    41 … 95
    n = 15

  2. 2

    Middle and quarters

    Q1 66 · Q3 84
    median 75

  3. 3

    Find the mean

    1106 ÷ 15
    = 73.7333

  4. 4

    Spread (sample SD)

    √(2666.9333 ÷ 14)
    = 13.802

Read more: the formulas, a worked example, quartile methods and correlation

Descriptive statistics sum up a data set in a few numbers: where its centre is (mean, median, mode), how spread out it is (range, IQR, variance, standard deviation), its shape (skewness, kurtosis), and where any one value sits (percentiles, z-scores). The box plot and histogram show the same story as pictures.

The formula

mean = sum of the values ÷ n
median = the middle value once sorted (average of the two middle ones if n is even)
range = largest − smallest; IQR = Q3 − Q1
outlier fences = Q1 − 1.5 × IQR and Q3 + 1.5 × IQR
sample variance s² = sum of (value − mean)² ÷ (n − 1); population σ² divides by n
standard deviation = square root of the variance
standard error = s ÷ square root of n
confidence interval = mean ± t × standard error (t with n − 1 degrees of freedom)
coefficient of variation = SD ÷ mean × 100%
z-score = (value − mean) ÷ SD

Worked example

Take 15 test scores: 62, 75, 81, 58, 90, 75, 68, 84, 71, 79, 66, 95, 73, 88 and 41, treated as a sample. Sorted, they are 41, 58, 62, 66, 68, 71, 73, 75, 75, 79, 81, 84, 88, 90, 95.

Centre. They add up to 1,106, so the mean is 1,106 ÷ 15 = 73.7333. The median is the 8th value, 75, and the mode is 75 (it appears twice). The range is 95 − 41 = 54.

Quartiles and outliers. By the median-of-each-half method, the lower seven values (41 to 73) have a median of Q1 = 66 and the upper seven (75 to 95) have Q3 = 84, so the IQR is 84 − 66 = 18. The fences are 66 − 1.5 × 18 = 39 and 84 + 1.5 × 18 = 111, so there are no outliers. The five-number summary is 41, 66, 75, 84, 95.

Spread. The squared gaps from the mean add up to 2,666.9333. Divided by n − 1 = 14 that gives a variance of 190.4952, and the standard deviation is √190.4952 = 13.8020. As a population you would divide by 15 instead: 177.7956 and 13.3340.

Standard error and confidence. The standard error is 13.8020 ÷ √15 = 13.8020 ÷ 3.8730 = 3.5637. For 95% with 14 degrees of freedom t = 2.1448, so the margin is 2.1448 × 3.5637 = 7.6433 and the interval is 73.7333 ± 7.6433 = 66.0900 to 81.3766. The coefficient of variation is 13.8020 ÷ 73.7333 = 18.72%.

Shape and position. Skewness is −0.7151 (a longer tail to the left, pulled by the 41) and excess kurtosis is 0.9659. The z-score of 41 is (41 − 73.7333) ÷ 13.8020 = −2.3716. The 90th percentile (inclusive method) sits at rank 1 + 0.9 × 14 = 13.6, so it is 88 + 0.6 × (90 − 88) = 89.2.

Two data sets. With a second test's scores (65, 70, 85, 55, 92, 78, 64, 80, 75, 74, 70, 98, 69, 90, 50) as y, Pearson's r is 0.9491 (r² = 0.9008), Spearman's rho is 0.9347, and the line of best fit is y = 6.5331 + 0.9195x.

Quartile methods: which tools use which

MethodHow it worksUsed byExample Q1 · Q3
Median of each halfLeave out the middle value when n is odd; take the median of each halfTI-83/84 calculators, most school textbooks66 · 84
Tukey's hingesKeep the middle value in both halves when n is oddR fivenum(), Tukey's original box plots67 · 82.5
InclusiveQ1 at rank 1 + 0.25 × (n − 1)Excel QUARTILE.INC, Google Sheets, R and NumPy default67 · 82.5
ExclusiveQ1 at rank 0.25 × (n + 1)Excel QUARTILE.EXC, Minitab, SPSS66 · 84

The method changes the outliers too: with inclusive quartiles the IQR is 15.5, the lower fence is 67 − 23.25 = 43.75, and 41 becomes an outlier. Use the method your teacher or software uses. Percentiles have the same choice: Excel PERCENTILE.INC uses rank 1 + p(n − 1), PERCENTILE.EXC uses p(n + 1), and the nearest-rank method always picks a real data value.

Histogram bar rules

  • Sturges: 1 + log₂ n bars, rounded up. Good for small, bell-shaped data.
  • Freedman–Diaconis: bar width 2 × IQR ÷ ∛n. Holds up well with outliers and skewed data.
  • Scott: bar width 3.49 × s ÷ ∛n.
  • Square root: √n bars, as Excel's histogram tool roughly does.

The bars are equal width from the smallest to the largest value. Each bar includes its left edge, and the last bar also includes the largest value.

Correlation and regression

Pearson r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²)
Spearman rho = Pearson r of the ranks (ties share the average rank)
slope b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)²; intercept a = ȳ − b × x̄
p-value: t = r × √((n − 2) ÷ (1 − r²)) with n − 2 degrees of freedom

Correlation is not causation: two things can rise together because a third thing drives both. Strength words used here: 0.9 and up very strong, 0.7 strong, 0.5 moderate, 0.3 weak, below that very weak or none. A prediction outside the range of your x values is an extrapolation and much less reliable.

Notes

  • Standard error and confidence intervals always use the sample SD, because they estimate the mean of a bigger group.
  • Sample skewness and kurtosis match Excel SKEW and KURT; population ones use the plain moment formulas.
  • The t values are worked out exactly for your n, not read from a rounded table. For large n they approach the normal values (1.96 for 95%).
  • Geometric and harmonic means only show when every value is above 0.

Common questions

What does a statistics calculator work out?

Paste a list of numbers and it gives the count, sum, mean, median, mode, range, quartiles, outliers, variance, standard deviation, standard error, skewness, kurtosis, percentiles, z-scores and a confidence interval for the mean, with a box plot and a histogram. In Advanced, a second list adds correlation and a line of best fit.

Why do different calculators give different quartiles?

There are several accepted methods. Median of each half is used by TI-84 calculators and most textbooks, Tukey's hinges by R's fivenum, inclusive by Excel QUARTILE.INC and Google Sheets, and exclusive by Excel QUARTILE.EXC, Minitab and SPSS. For the example scores they give Q1 = 66, 67, 67 and 66.

How are outliers found?

A value is an outlier when it is below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. With the example scores, Q1 = 66 and Q3 = 84, so the fences are 39 and 111 and no score is an outlier. With Excel's inclusive quartiles the lower fence is 43.75, so 41 is flagged.

What is the difference between sample and population standard deviation?

Population divides the sum of squared gaps by n, and is right when you have every value. Sample divides by n − 1, and is right when your numbers are part of a bigger group. For the example scores the sample SD is 13.802 and the population SD is 13.334.

How do I read a correlation coefficient?

Pearson's r runs from −1 to 1. Near 1 means both sets rise together in a straight line, near −1 means one falls as the other rises, and near 0 means no straight-line link. Spearman's rho does the same with ranks, so it also catches curved but steady trends. The example tests give r = 0.949.

What is a 95% confidence interval for the mean?

It is the mean plus or minus t × standard error, where t comes from the t-distribution with n − 1 degrees of freedom. For the 15 example scores it is 73.7333 ± 2.1448 × 3.5637, which is 66.09 to 81.38. It shows the range the true average of the whole group probably sits in.

Related calculators

Standard deviation calculatorStandard deviation, variance, mean, median, mode, quartiles, outliers and confidence intervals from a list or a frequency table.Average calculatorMean, median, mode and range of a list, weighted averages, averages of percentages and times, moving averages and the number you need next.Probability calculatorTwo events (and, or, not, neither), repeated tries, Bayes’ theorem, odds, dice, coins and cards, with exact fractions and the working.Random number generatorFair random numbers, no-repeat picks, lottery lines, dice, coin flips, list pickers and team splits.

Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.

Embed this calculator on your site

Free to use on your website or blog. Paste this code where you want the calculator to appear. Please keep the credit link.

Statistics calculator by Zulu Calculator ↗