DevTools Logo

Statistics Calculator

Statistics Calculator

Compute mean, spread, quartiles, outliers and a box plot from pasted numbers.

Runs in your browser
Try an example

Numbers

6 values · 1 line · 22 chars

Commas, spaces, tabs, semicolons and newlines all separate values. Grouped thousands like 1,234 stay together.

Results update as you type, entirely inside this browser tab.

Descriptive statistics

n = 6
Quartiles: Exclusive (Moore–McCabe): the median is left out of both halves for odd n.

Central tendency

Count (n)
6
Sum
98.00
Mean
16.33
Median
16.00
Mode
15.00

Dispersion

Population SD
2.81
Population variance
7.89
Sample SD
3.08
Sample variance
9.47
Range
9.00
Standard error
1.26
Coefficient of variation
17.20%
Skewness
0.15
Excess kurtosis
-0.75

Position

Min
12.00
Max
21.00
Q1
15.00
Q2
16.00
Q3
18.00
IQR
3.00
Percentile p50
16.00

Box plot

Hover or focus the plot and use arrow keys to inspect values.

Five-number summary: min 12.00, Q1 15.00, median 16.00, Q3 18.00, max 21.00. Whiskers stop at 12.00 and 21.00; dots are outliers.

Examples

Textbook standard deviation fixture

Input
2,4,4,4,5,5,7,9
Output
n 8 · mean 5 · mode 4 · population SD 2 · sample SD 2.14 · Q1 4 · Q3 6 · IQR 2

The sum of squared deviations is 32: dividing by 8 gives population variance 4, dividing by 7 gives sample variance about 4.57.

Same data, different quartiles

Input
1, 2, 3, 4, 5
method: Exclusive → Inclusive
Output
Exclusive Q1 1.5, Q3 4.5 · Inclusive Q1 2, Q3 4 · Linear Q1 2, Q3 4

For odd n only the exclusive method removes the median from both halves; the convention must be stated or the answer is ambiguous.

Outlier and robust recompute

Input
10, 11, 12, 12, 13, 13, 14, 14, 15, 100
Output
Q1 12 · Q3 14 · upper fence 17 · outlier 100 (extreme) · mean 21.40 → 12.67 without it

One extreme reading shifts the mean by almost nine units; the exclusion toggle shows the robust summary immediately.

About this tool

Descriptive statistics compress a long list of measurements into a few trustworthy numbers. Paste values separated by commas, spaces, tabs, semicolons or newlines and this calculator reports the count and sum, mean, median, every mode, range, population and sample variance and standard deviation, Q1/Q2/Q3, the IQR, outlier fences and a box plot. Grouped thousands such as 1,234 and scientific notation such as 1.5e3 are read correctly; NaN, Infinity and digit-adjacent garbage are rejected with the offending token and its position in the input.

Population and sample spreads are both shown because they answer different questions. Population variance divides the sum of squared deviations by n and describes exactly the data in front of you. Sample variance divides by n − 1 to estimate a wider population's spread, so it is undefined when only one value is supplied — the interface says “undefined (n=1)” instead of printing a misleading 0. Variance uses Welford's online algorithm rather than the unstable E[x²] − μ² shortcut; the text-statistics tool counts words and characters, while this one only cares about numbers.

Quartile answers depend on the convention in your textbook or software, so the method is explicit and switchable. Exclusive (Moore–McCabe) drops the overall median from both halves when n is odd. Inclusive (Tukey hinges, the convention behind Minitab and TI-83) keeps it in both halves. Linear interpolation (type 7, the numpy default) uses rank h = (n − 1)p + 1 and interpolates between neighbours. The labels matter: calling the exclusive method “Tukey” would produce a wrong answer for every odd-sized dataset. Switching methods updates Q1, Q3, the IQR, the fences and the plot immediately.

Outliers lie beyond Q3 + 1.5 × IQR or below Q1 − 1.5 × IQR; values beyond 3 × IQR are marked extreme. The plot draws whiskers at the furthest non-outlier values, a box from Q1 to Q3, a median line and a dot per outlier, with a textual five-number summary and an arrow-key value readout for screen readers. An optional histogram uses Freedman–Diaconis bin width when the IQR is positive, falls back to 10 bins when it is zero and never draws more than 100 bins. You can pin the bin count to 10, 20 or 50, choose 2–6 decimal places, copy the summary as text or Markdown and, for short datasets, share the numbers through the URL. Everything runs locally; values are never uploaded.

What this tool does not do

  • Purely descriptive: no t-tests, confidence intervals, regression or other inferential statistics are computed.
  • Input is a flat list of numbers; weighted values and grouped frequency tables are not supported.
  • URL sharing contains the raw numbers in a query parameter and is offered only for inputs up to 2,000 characters; nothing is sent to a server.
  • Datasets are capped at one million values, and inputs over 5,000 characters pause live recomputation until Result is pressed; the plot samples very large outlier sets for readability.
  • Canvas rendering falls back to a textual five-number summary where 2D canvas is unavailable; the screenshot-quality of the plot depends on the browser.

How to use this tool

  1. Paste the numbers

    Enter values in the numbers panel. Commas, spaces, tabs, semicolons and newlines are all accepted, and 1,234 is read as one thousand two hundred thirty-four. Results update as you type.

  2. Pick a quartile convention

    Use the Quartile method switch: Exclusive (Moore–McCabe), Inclusive (Tukey hinges / Minitab / TI-83) or Linear (type 7 interpolation). The current definition is shown under the options row.

  3. Read the summary and plot

    Central tendency, dispersion and position stats are grouped in labelled lists. The box plot marks outliers; hover it or focus it and press arrow keys to read exact values.

  4. Explore spread and outliers

    Toggle the histogram and choose Auto, 10, 20 or 50 bins. Turn on Exclude outliers to recompute the summary from the remaining values.

  5. Copy or share

    Choose 2–6 decimal places, then copy the summary as plain text or Markdown, download a .txt file, or copy a URL carrying short datasets.

Use cases

Checking homework

Compare a hand-calculated mean, standard deviation and quartile answer with a full working summary, including which quartile convention produced it.

Quality and measurement checks

Summarize a quick batch of measurements, see which readings sit beyond the 1.5× IQR fence and judge how much they move the average.

Teaching spread visually

Demonstrate the same dataset under three quartile conventions, toggle between a box plot and a histogram, and show why n − 1 matters for samples.

Methods and input syntax the calculator uses

ItemDefinition
SeparatorsComma, semicolon, space, tab and newline; grouped commas between digits are stripped before parsing
Number syntaxOptional sign, integer or decimal part, optional exponent: 12, -0.5, .25, 3., 1.5e3
Population SD / varianceSquared deviations from the mean divided by n; defined even for one value
Sample SD / varianceSquared deviations divided by n − 1; undefined for n = 1
Exclusive quartilesMoore–McCabe: median of halves that exclude the overall median for odd n
Inclusive quartilesTukey hinges / Minitab / TI-83: median of halves that include the overall median for odd n
Linear quartilesType 7 interpolation at h = (n − 1)p + 1; also used for the percentile field
Outlier fencesMild beyond Q1 − 1.5×IQR or Q3 + 1.5×IQR; extreme beyond 3×IQR

Display precision changes formatting only — all calculations use full double-precision arithmetic.

Common mistakes

Mistake:Assuming every calculator uses the same quartiles.

Fix:For odd-sized datasets, exclusive (Moore–McCabe) and inclusive (Tukey / Minitab / TI-83) disagree. Match the convention named in your course or software before comparing answers.

Mistake:Confusing sample and population standard deviation.

Fix:Population SD divides by n; sample SD divides by n − 1 and is undefined for a single observation. Both values are labelled separately here, so copy the one your question asks for.

Mistake:Reading a comma as a decimal separator.

Fix:Commas separate values in this tool: 3,5 becomes two values, 3 and 5. The interface warns when a comma is followed by one or two digits; write 3.5 for a decimal or 3,500 for a thousands group.

Mistake:Treating an outlier as a data entry error automatically.

Fix:The fences flag unusual values, not invalid ones. Use the exclusion toggle to compare summaries, then check the measurement before deleting anything.

Frequently asked questions

What is the difference between sample and population standard deviation?

Population standard deviation describes the exact values you pasted: it divides the sum of squared deviations by n. Sample standard deviation divides by n − 1, which corrects the bias when those values are a sample of a larger population and is therefore a little larger. The tool shows both, labelled, so you can choose the one your question asks for. With only one value the sample version is undefined, while the population version is 0; the interface says “undefined (n=1)” rather than inventing a number.

Which quartile method does the calculator use?

You choose it. Exclusive (Moore–McCabe) removes the overall median from both halves when n is odd. Inclusive (Tukey hinges, the convention used by Minitab and TI-83 calculators) keeps the median in both halves. Linear (type 7, the numpy default) sets rank h = (n − 1)p + 1 and interpolates between the neighbours. For an even number of values the exclusive and inclusive methods agree; for an odd number they do not, which is why the selected method is shown next to the results. Note that classic Tukey hinges are the inclusive variant, not the exclusive one.

How does the tool decide what counts as an outlier?

It uses the 1.5 × IQR rule. Q1 and Q3 come from the quartile method you selected, the IQR is Q3 − Q1, and anything below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is listed as an outlier. Values beyond Q1 − 3 × IQR or Q3 + 3 × IQR are marked extreme, and the rest are mild. The box plot draws whiskers at the furthest values inside the fences; you can toggle a recompute that excludes the flagged values from every statistic.

Can I paste data with commas, newlines or thousands separators?

Yes. Commas, semicolons, spaces, tabs and newlines all separate values, so a copied spreadsheet column works as-is. A comma surrounded by digits in a thousands group, such as 1,234,567, is stripped and read as one number. Scientific notation such as 1.5e3 and signs and decimals such as -2.5 are supported. Because commas are separators, European decimal commas are not: 3,5 becomes the two values 3 and 5, and the tool warns when it sees that pattern.

What happens when my data has no mode?

If every value occurs exactly once, there is no mode and the results grid says “no mode”. When several values tie for the highest frequency, all of them are shown — [1, 1, 2, 2, 3] has modes 1 and 2 — rather than picking one arbitrarily.

Why are variance and standard deviation computed with Welford's algorithm?

The familiar shortcut E[x²] − μ² subtracts two nearly equal large numbers and loses precision, especially when measurements have a large offset but a tiny spread. Welford's online algorithm updates the mean and the sum of squared deviations together, and the mean here also uses compensated summation. The sum of squared deviations is then divided by n for population spread or n − 1 for sample spread. Display precision (2–6 decimals) only changes formatting; the arithmetic keeps full double precision.

Does my data leave the browser?

No. Parsing, statistics, the box plot and the histogram all run locally in the tab. Short datasets can be copied into a URL through the Copy link action so a classmate can reproduce the exact input, but that link contains the numbers themselves — avoid sharing sensitive measurements. Nothing is uploaded, and inputs are not sent to an analytics or AI service.

Can I share very large datasets or weighted data?

The calculator accepts up to one million flat values. Live recomputation pauses above 5,000 characters so typing stays responsive; press Result when you are ready. URL sharing is limited to inputs of 2,000 characters or fewer, and the box plot draws a sample of the outlier dots when there are more than a few hundred. Weighted observations and grouped frequency tables are outside the current input grammar.

References & standards