Statistics Calculator

Paste a list of numbers or a frequency table to get the mean, median, mode, range, variance and standard deviation with the working shown, quartiles four ways, a histogram with a box plot, and where any one value stands.

🔒 Processed in your browser🆓 Free🙅 No sign-up

As an Amazon Associate I earn from qualifying purchases. Label makers

✏️ Your data

Separate with commas, spaces, tabs or new lines. Words such as a column header are skipped. Use a dot for decimals and leave out thousands separators (1234, not 1,234).

Try:
Your numbers are a…

Sample if they are part of a bigger group (most homework, surveys, experiments). Population if they are the whole group.

Mean 79.3333 · Median 83 · Standard deviation s = 13.599715 values · treated as a sample

📊 Results

Mean
79.3333
Σx ÷ n
Median
83
middle of the sorted list
Mode
85
appears 2 times
Count (n)
15
Sum (Σx) = 1,190
Sample SD s
13.5997
population σ = 13.1386
Sample variance s²
184.9524
SS ÷ (n − 1)
Range
54
95 − 41
IQR
14
Q1 74 to Q3 88
⚠️ Possible outliers (outside the 1.5 × IQR fences 53 and 109): 41

🧮 All statistics

StatisticValueFormula / note
Count (n)15n
Sum (Σx)1,190Σx
Mean79.3333Σx ÷ n
Median83middle of the sorted list
Mode85appears 2 times
Minimum41
Maximum95
Range54max − min
Sample variance s²184.9524SS ÷ (n − 1)
Sample SD s13.5997√s² · Excel STDEV.S
Population variance σ²172.6222SS ÷ n
Population SD σ13.1386√σ² · Excel STDEV.P
Q1 (25th percentile)74TI-84 / textbook
Q3 (75th percentile)88TI-84 / textbook
IQR14Q3 − Q1
Sum of squares (SS)2,589.3333Σ(x − x̄)²
Mean absolute deviation9.4667Σ|x − x̄| ÷ n
Standard error of the mean3.5114s ÷ √n
Coefficient of variation17.14%SD ÷ |mean|

📦 Quartiles four ways

Calculators, textbooks and spreadsheets use different rules for Q1 and Q3, so the same data can give different answers. The row marked ✓ is the method used everywhere else on this page.

MethodQ1MedianQ3IQR
✓ TI-84 / textbook74838814
Tukey's hinges76838711
Excel .INC / Sheets / R76838711
Excel .EXC / Minitab / SPSS74838814

The methods disagree here by up to 2 on Q1 or Q3. Use the one your class, calculator or software uses.

How the ✓ method works: Median of each half; for odd n the median belongs to neither half.

📈 Histogram & box plot

Blank = automatic (Sturges’ rule)

Blank = automatic; must be ≤ the smallest value

Automatic bins: 6 bins 10 wide (Sturges’ rule suggests 5).

03640 – 50: 1160 – 70: 1170 – 80: 4480 – 90: 6690 – 100: 33405060708090100
▮ values per bin┆ mean│ median▭ Q1 to Q3○ outlier

Each bin includes its lower edge; the last bin also includes its upper edge.

ClassCount% of nCum.
40 ≤ x < 5016.7%1
50 ≤ x < 6000%1
60 ≤ x < 7016.7%2
70 ≤ x < 80426.7%6
80 ≤ x < 90640%12
90 ≤ x ≤ 100320%15

🎯 Where does a value stand?

Enter one value, such as your own test score, to see how it compares with the rest of the data.

z-score
0.6373
(value − mean) ÷ s
Percentile rank
76.7%
11 below, 1 equal, 3 above
Outlier check
inside the fences
53 … 109

🎯 88 is 0.64 standard deviations above the mean, with a percentile rank of 76.7%.

🪜 Step by step

The working uses full precision and rounds only what is shown, so rounded intermediate numbers may not add up exactly.

  1. Count the values
    n = 15
  2. Add them up and divide by n
    Σx = 78 + 85 + 92 + 62 + 88 + 71 + … 3 more … + 74 + 90 + 41 + 86 + 79 + 83 = 1190
    x̄ = Σx ÷ n = 1190 ÷ 15 = 79.3333
  3. Sort from smallest to largest
    41, 62, 71, 74, 78, 79, 81, 83, 85, 85, 86, 88, 90, 92, 95
  4. Find the middle value
    n = 15 is odd, so the median is value number 8.
    Median = 83
  5. Find the most frequent value
    85 appears 2 times, more than any other value.
  6. Range: largest minus smallest
    95 − 41 = 54
  7. Square each distance from the mean, then add
    SS = Σ(x − x̄)² = (41 − 79.3333)² + (62 − 79.3333)² + (71 − 79.3333)² + … 8 more … + (90 − 79.3333)² + (92 − 79.3333)² + (95 − 79.3333)²
    SS = 2589.3333
  8. Divide to get the variance
    Sample: s² = SS ÷ (n − 1) = 2589.3333 ÷ 14 = 184.9524
    Population: σ² = SS ÷ n = 2589.3333 ÷ 15 = 172.6222
  9. Take the square root for the standard deviation
    s = √184.9524 = 13.5997
    σ = √172.6222 = 13.1386
  10. Quartiles (TI-84 / textbook)
    The median (value 8) is left out of both halves.
    Lower half (values 1–7): 41, 62, 71, 74, 78, 79, 81 → Q1 = 74
    Upper half (values 9–15): 85, 85, 86, 88, 90, 92, 95 → Q3 = 88
  11. IQR and outlier fences
    IQR = Q3 − Q1 = 88 − 74 = 14
    74 − 1.5 × 14 = 53
    88 + 1.5 × 14 = 109
    Outside the fences: 41

🧾 Work table

The usual “show your work” table for the variance. Copy it into homework or download it as CSV.

xff·xx − x̄(x − x̄)²f·(x − x̄)²
41141-38.33331469.44441469.4444
62162-17.3333300.4444300.4444
71171-8.333369.444469.4444
74174-5.333328.444428.4444
78178-1.33331.77781.7778
79179-0.33330.11110.1111
811811.66672.77782.7778
831833.666713.444413.4444
8521705.666732.111164.2222
861866.666744.444444.4444
881888.666775.111175.1111
9019010.6667113.7778113.7778

Totals: Σf = n = 15 · Σf·x = 1190 · Σf·(x − x̄)² = SS = 2589.3333

Free to use. Results are estimates for general information, not professional advice — see our full disclaimer.

Most statistics calculators return a column of numbers and stop. This one is built for checking your own work. Every result comes with the steps written out: the sum behind the mean, the positions that give the median, the sum of squares behind the variance, and the halves or positions behind each quartile. A work table with the x − x̄ and (x − x̄)² columns (or f·x and f·(x − x̄)² for a frequency table) can be copied into homework or downloaded as CSV.

The other difference is that it shows quartiles four ways. A TI-84, most textbooks, Excel’s QUARTILE.INC and QUARTILE.EXC do not use the same rule, so one data set can give three different values for Q1. The comparison table puts every method side by side, and the one you pick drives the box plot, the IQR and the outlier fences. The Where does a value stand? panel then takes one number, such as your own test score, and returns its z-score, percentile rank and outlier status.

How to use the statistics calculator

  1. Enter your data. Paste a list separated by commas, spaces, tabs or new lines; a spreadsheet column works, and a header such as “Score” is skipped. For grouped data, switch to Value + frequency and type one “value count” pair per line.
  2. Say whether it is a sample or a population. This decides which standard deviation is headlined and used for z-scores. Both are always shown.
  3. Choose the quartile method your class or software uses, and how many decimal places to show.
  4. Read the results, from the count and mean to both standard deviations, the quartiles, the standard error and the coefficient of variation. A notice lists any outliers.
  5. Explore. Change the histogram’s bins, check where a value stands, and follow the working step by step.

How it works

mean             x̄ = Σx ÷ n
median           the middle sorted value, or the mean of the two middle values when n is even
range            max − min
sum of squares   SS = Σ(x − x̄)²
population       σ² = SS ÷ n          σ = √σ²
sample           s² = SS ÷ (n − 1)    s = √s²
mean abs. dev.   MAD = Σ|x − x̄| ÷ n
standard error   SE = s ÷ √n
z-score          z = (x − x̄) ÷ SD
percentile rank  PR = (B + E ÷ 2) ÷ n × 100      B = values below, E = values equal
outlier fences   Q1 − 1.5 × IQR  and  Q3 + 1.5 × IQR,  where IQR = Q3 − Q1

Why n − 1 for a sample? Distances from the sample’s own mean run slightly smaller than distances from the true population mean. Dividing by n − 1 corrects that bias in the variance (Bessel’s correction). It matters most for small data sets: with 1,000 values the two standard deviations differ by about 0.05%.

The mode is the most frequent value. Ties are all listed, and when every value occurs equally often there is no mode.

Quartiles. Q1 and Q3 split the sorted data into quarters, but the four common rules handle the in-between cases differently:

Method How Q1 is found Used by
Halves, median excluded Median of the values below the median TI-83/84 1-Var Stats, most US textbooks
Halves, median included Median of the lower half, counting the median when n is odd Tukey’s hinges (exploratory data analysis)
Linear, inclusive Value at position (n − 1) × 0.25 + 1 Excel QUARTILE.INC and QUARTILE, Google Sheets, R and NumPy defaults
Linear, exclusive Value at position (n + 1) × 0.25 Excel QUARTILE.EXC, Minitab, SPSS, Python’s statistics.quantiles

When a position falls between two values, the linear methods move the fractional part of the way from one to the next. QUARTILE.EXC cannot place Q1 with fewer than three values; Excel shows #NUM! and this calculator shows a dash.

Histogram bins. By default the bin count follows Sturges’ rule, ⌈log₂ n⌉ + 1, with the width rounded to a tidy 1, 2, 2.5 or 5 times a power of ten. Each bin includes its lower edge, and the last also includes its upper edge, so a perfect 100 lands in 90–100.

Accuracy. Sums use compensated addition and the variance is computed in two passes around the mean, so data such as 1,000,000,004 and 1,000,000,007 keeps every digit that the one-pass shortcut formula would lose.

Worked examples

A textbook set. For 2, 4, 4, 4, 5, 5, 7, 9 the count is 8 and the sum is 40, so the mean is 40 ÷ 8 = 5. The median is the average of the 4th and 5th sorted values, (4 + 5) ÷ 2 = 4.5. The mode is 4 (three times) and the range is 9 − 2 = 7. The deviations from the mean are −3, −1, −1, −1, 0, 0, 2 and 4. Their squares add to SS = 32, so the population variance is 32 ÷ 8 = 4 and σ = 2. The sample variance is 32 ÷ 7 ≈ 4.5714, giving s ≈ 2.1381. Q1 is 4 under every method, but Q3 is 6 by halves, 5.5 by QUARTILE.INC and 6.5 by QUARTILE.EXC.

Quartile methods side by side. Microsoft illustrates QUARTILE.EXC with 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49, which gives Q1 = 15 and Q3 = 43. The TI-84 method agrees: leaving the median (40) out leaves 6, 7, 15, 36, 39 below it, whose median is 15. Tukey’s hinges and QUARTILE.INC both give 25.5 and 42.5, an IQR of 17 rather than 28.

Where does a score stand? A class of 15 scored 78, 85, 92, 62, 88, 71, 95, 85, 81, 74, 90, 41, 86, 79 and 83. The mean is 1,190 ÷ 15 ≈ 79.33, the median is 83 and the sample standard deviation is about 13.60. With the TI-84 method Q1 = 74 and Q3 = 88, so the IQR is 14. The fences sit at 74 − 21 = 53 and 88 + 21 = 109, which flags 41 as an outlier. A score of 88 has z = (88 − 79.33) ÷ 13.60 ≈ 0.64. Eleven scores are below it and one equals it, so its percentile rank is (11 + 0.5) ÷ 15 × 100 ≈ 76.7. The low outlier pulls the mean below the median, the usual sign of a long left tail.

A frequency table. Thirty ratings arrive as 1 star × 3, 2 × 7, 3 × 12, 4 × 5 and 5 × 3. Σf·x = 3 + 14 + 36 + 20 + 15 = 88, so the mean is 88 ÷ 30 ≈ 2.93. The 15th and 16th ratings are both 3, so the median is 3, and 3 is also the mode with 12 votes. Σf·(x − x̄)² ≈ 35.87, giving a sample variance of 35.87 ÷ 29 ≈ 1.237 and s ≈ 1.112.

Common mistakes

  • Using the wrong standard deviation. If the question says “sample”, or the data came from a survey or experiment, divide by n − 1. Spreadsheets make the same split: STDEV.S for a sample, STDEV.P for a population.
  • Finding the median before sorting. The middle of the list as typed means nothing.
  • Rounding too early. Rounding the mean to 79.3 before squaring the deviations shifts the variance. Keep full precision and round only the final answer, as this calculator does in its working.
  • Comparing quartiles from different tools. If your answer differs from the book’s by half a step, check the method before the arithmetic.

Sources and methods

The four quartile rules are those catalogued by Hyndman and Fan, “Sample Quantiles in Statistical Packages” (The American Statistician, 1996). The inclusive and exclusive linear methods match Microsoft’s documentation for QUARTILE.INC and QUARTILE.EXC and Python’s statistics.quantiles. They reproduce the published examples exactly, including the STDEV.S and STDEV.P values in Microsoft’s help. The 1.5 × IQR fences follow John Tukey’s Exploratory Data Analysis (1977) and the NIST/SEMATECH e-Handbook of Statistical Methods. The bin rule is from Herbert Sturges, “The Choice of a Class Interval” (1926). Your data is processed in your browser and is never uploaded.

To turn a score into a percentage first, use the percentage calculator, and to see how a course grade moves your average, the GPA calculator. If your data has fractions in it, the fraction calculator gives exact decimals to paste in.

Frequently asked questions

What is the difference between sample and population standard deviation?

Both start from the same sum of squared distances from the mean. The population version divides it by n and is used when your numbers are the whole group. The sample version divides by n − 1 and is used when your numbers are a sample from a bigger group, which is the usual case in homework, surveys and experiments. In Excel they are STDEV.P and STDEV.S.

Why does my calculator give a different Q1 and Q3 than Excel?

There is no single agreed rule for quartiles. A TI-84 and most textbooks take the median of each half of the sorted data, while Excel's QUARTILE.INC and QUARTILE.EXC find a position in the list and interpolate between neighbouring values. For 2, 4, 4, 4, 5, 5, 7, 9 the third quartile is 6 on a TI-84, 5.5 in QUARTILE.INC and 6.5 in QUARTILE.EXC. None of the three is wrong. Pick the method your course or software uses.

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

Sort the values, then take the two in the middle and average them. With n values they are at positions n ÷ 2 and n ÷ 2 + 1. For 2, 4, 4, 4, 5, 5, 7, 9 those are the 4th and 5th values, 4 and 5, so the median is 4.5.

How do you calculate standard deviation by hand?

Find the mean, subtract it from every value, square each difference and add the squares to get the sum of squares. Divide by n − 1 for a sample, or by n for a population, to get the variance, then take the square root. The work table on this page lays out exactly these columns.

What counts as an outlier?

The usual rule, from John Tukey, flags any value more than 1.5 interquartile ranges below Q1 or above Q3. Because the fences depend on Q1 and Q3, the quartile method can change whether a borderline value is flagged. An outlier is a value worth checking. It is not automatically a mistake that should be deleted.

How do I enter data that is already in a frequency table?

Switch to Value + frequency and type one pair per line, such as 3 12 for "the value 3 appears 12 times". Commas, colons or an x between the two numbers work too, and a header line is skipped. The work table then adds the f, f·x and f·(x − x̄)² columns that grouped-data exercises ask for.

Related tools

Last reviewed: