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.
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).
Sample if they are part of a bigger group (most homework, surveys, experiments). Population if they are the whole group.
📊 Results
🧮 All statistics
| Statistic | Value | Formula / note |
|---|---|---|
| Count (n) | 15 | n |
| Sum (Σx) | 1,190 | Σx |
| Mean | 79.3333 | Σx ÷ n |
| Median | 83 | middle of the sorted list |
| Mode | 85 | appears 2 times |
| Minimum | 41 | |
| Maximum | 95 | |
| Range | 54 | max − min |
| Sample variance s² | 184.9524 | SS ÷ (n − 1) |
| Sample SD s | 13.5997 | √s² · Excel STDEV.S |
| Population variance σ² | 172.6222 | SS ÷ n |
| Population SD σ | 13.1386 | √σ² · Excel STDEV.P |
| Q1 (25th percentile) | 74 | TI-84 / textbook |
| Q3 (75th percentile) | 88 | TI-84 / textbook |
| IQR | 14 | Q3 − Q1 |
| Sum of squares (SS) | 2,589.3333 | Σ(x − x̄)² |
| Mean absolute deviation | 9.4667 | Σ|x − x̄| ÷ n |
| Standard error of the mean | 3.5114 | s ÷ √n |
| Coefficient of variation | 17.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.
| Method | Q1 | Median | Q3 | IQR |
|---|---|---|---|---|
| ✓ TI-84 / textbook | 74 | 83 | 88 | 14 |
| Tukey's hinges | 76 | 83 | 87 | 11 |
| Excel .INC / Sheets / R | 76 | 83 | 87 | 11 |
| Excel .EXC / Minitab / SPSS | 74 | 83 | 88 | 14 |
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).
Each bin includes its lower edge; the last bin also includes its upper edge.
| Class | Count | % of n | Cum. |
|---|---|---|---|
| 40 ≤ x < 50 | 1 | 6.7% | 1 |
| 50 ≤ x < 60 | 0 | 0% | 1 |
| 60 ≤ x < 70 | 1 | 6.7% | 2 |
| 70 ≤ x < 80 | 4 | 26.7% | 6 |
| 80 ≤ x < 90 | 6 | 40% | 12 |
| 90 ≤ x ≤ 100 | 3 | 20% | 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.
🎯 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.
- Count the valuesn = 15
- Add them up and divide by nΣx = 78 + 85 + 92 + 62 + 88 + 71 + … 3 more … + 74 + 90 + 41 + 86 + 79 + 83 = 1190x̄ = Σx ÷ n = 1190 ÷ 15 = 79.3333
- Sort from smallest to largest41, 62, 71, 74, 78, 79, 81, 83, 85, 85, 86, 88, 90, 92, 95
- Find the middle valuen = 15 is odd, so the median is value number 8.Median = 83
- Find the most frequent value85 appears 2 times, more than any other value.
- Range: largest minus smallest95 − 41 = 54
- Square each distance from the mean, then addSS = Σ(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
- Divide to get the varianceSample: s² = SS ÷ (n − 1) = 2589.3333 ÷ 14 = 184.9524Population: σ² = SS ÷ n = 2589.3333 ÷ 15 = 172.6222
- Take the square root for the standard deviations = √184.9524 = 13.5997σ = √172.6222 = 13.1386
- 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 = 74Upper half (values 9–15): 85, 85, 86, 88, 90, 92, 95 → Q3 = 88
- IQR and outlier fencesIQR = Q3 − Q1 = 88 − 74 = 1474 − 1.5 × 14 = 5388 + 1.5 × 14 = 109Outside the fences: 41
🧾 Work table
The usual “show your work” table for the variance. Copy it into homework or download it as CSV.
| x | f | f·x | x − x̄ | (x − x̄)² | f·(x − x̄)² |
|---|---|---|---|---|---|
| 41 | 1 | 41 | -38.3333 | 1469.4444 | 1469.4444 |
| 62 | 1 | 62 | -17.3333 | 300.4444 | 300.4444 |
| 71 | 1 | 71 | -8.3333 | 69.4444 | 69.4444 |
| 74 | 1 | 74 | -5.3333 | 28.4444 | 28.4444 |
| 78 | 1 | 78 | -1.3333 | 1.7778 | 1.7778 |
| 79 | 1 | 79 | -0.3333 | 0.1111 | 0.1111 |
| 81 | 1 | 81 | 1.6667 | 2.7778 | 2.7778 |
| 83 | 1 | 83 | 3.6667 | 13.4444 | 13.4444 |
| 85 | 2 | 170 | 5.6667 | 32.1111 | 64.2222 |
| 86 | 1 | 86 | 6.6667 | 44.4444 | 44.4444 |
| 88 | 1 | 88 | 8.6667 | 75.1111 | 75.1111 |
| 90 | 1 | 90 | 10.6667 | 113.7778 | 113.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
- 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.
- 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.
- Choose the quartile method your class or software uses, and how many decimal places to show.
- 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.
- 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
- GPA CalculatorEnter courses, credits and letter grades to get your term and cumulative GPA, compare the same transcript on three scales, and find out exactly which grades a target GPA asks for.
- Percentage CalculatorFive common percentage calculations on one page. Results update as you type, and nothing you enter leaves your browser.
- Fraction CalculatorType a whole problem such as 1 1/2 + 3/4 × 2/3 to get the simplified fraction, mixed number and exact decimal with every step shown, then see the answer on a tape measure or in measuring cups.
- Age CalculatorEnter a date of birth and get an exact age — plus the weekday you were born on, your next birthday, and your star sign and Chinese zodiac animal.
- Date Difference CalculatorTwo calculators in one — the exact gap between two dates, including business days, and a date-maths mode that adds or subtracts any period.
- Tip CalculatorEnter the bill, pick a tip percentage and say how many people are paying — the tip, the total and each person's share update as you type.
Last reviewed: