Math · free · step by step
Statistics Calculator
Paste or type numbers to get the mean, median, mode, standard deviation, variance, quartiles and outliers, with a histogram, a box plot and the working. Switch to x, y pairs for the line of best fit and correlation.
All results
Step by step
Charts
Frequency table
| Value | Count | Percent | Cumulative |
|---|
Worked example
Mean, median, mode and standard deviation of 2, 4, 4, 4, 5, 5, 7, 9
| Measure | Working | Answer |
|---|---|---|
| Mean | (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 | 5 |
| Median | 8 values, so average the 4th and 5th: (4 + 5) ÷ 2 | 4.5 |
| Mode | 4 appears 3 times | 4 |
| Range | 9 − 2 | 7 |
| Population standard deviation (σ) | √(32 ÷ 8) | 2 |
| Sample standard deviation (s) | √(32 ÷ 7) | 2.138089935 |
| Quartiles | Medians of 2, 4, 4, 4 and 5, 5, 7, 9 | Q1 = 4, Q3 = 6 |
Formulas
Mean, variance and standard deviation formulas
The sample standard deviation s divides by n − 1 (Bessel’s correction) because a sample’s own mean sits closer to its values than the true mean does; dividing by n would underestimate the spread. The population formula σ divides by N and is right only when the data is the whole population. Variance is the standard deviation squared.
More math
Other math tools
- Scientific CalculatorTrig, logs, powers, n!, nCr with history and exact answers
- Fraction CalculatorAdd, subtract, multiply and divide fractions with steps
- Matrix CalculatorDeterminant, inverse, multiply and RREF with steps
- Binary ConverterBinary, decimal, hex and octal with steps
- Complex Number Calculatora + bi, polar form, powers and roots with steps
- Equation SolverQuadratic, cubic and simultaneous equations with steps
- Graphing CalculatorPlot functions, circles, polar and parametric curves
- Derivative CalculatorDerivatives with every step shown
- Integral CalculatorIntegrals with steps, definite and indefinite
- Ohm’s Law CalculatorVolts, amps, ohms and watts
Questions
Statistics Calculator FAQ
Free, private and works offline: everything is worked out in your browser.
How do you find the mean, median and mode?
Mean: add the numbers and divide by how many there are. Median: sort them and take the middle one (or the average of the two middle ones). Mode: the value that appears most often. For 2, 4, 4, 4, 5, 5, 7, 9: mean = 5, median = 4.5, mode = 4.
How do you calculate standard deviation?
Subtract the mean from each number, square the results, add them up, divide by n − 1 for a sample (or by n for a whole population), then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the sample standard deviation is 2.138089935 and the population standard deviation is 2.
Should I use sample or population standard deviation?
Use the sample formula (divide by n − 1) when your numbers are a sample from a bigger group, which is the usual case in surveys and experiments. Use the population formula (divide by n) only when you have every member of the group. The calculator shows both and lets you pick which one leads.
How are quartiles calculated?
There is more than one method. By default the calculator uses the one on TI-84 and Casio calculators and in most textbooks: Q1 and Q3 are the medians of the lower and upper halves, leaving out the middle value when the count is odd. For 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 that gives Q1 = 15 and Q3 = 43. Excel’s QUARTILE.INC interpolates instead and gives 25.5 and 42.5; choose “Inclusive (Excel)” to match it.
How do you find outliers?
A common rule marks values more than 1.5 × IQR below Q1 or above Q3 as outliers, where IQR = Q3 − Q1. They show as dots beyond the whiskers on the box plot and are listed in the results.
How do I find the line of best fit and correlation?
Switch to x, y pairs and enter one pair per line. The calculator fits the least-squares line y = a + bx, with slope b = Sxy ÷ Sxx and intercept a = ȳ − b·x̄, and gives the correlation r and r². For the example pairs the line is y = 2.02x − 0.02 with r = 0.9991049325.
Can I paste data from Excel or Google Sheets?
Yes. Copy a column (or two columns for x, y pairs) and paste it into the box. Numbers can be separated by spaces, commas, semicolons, tabs or new lines; up to 100,000 values work.
Is the statistics calculator free and private?
Yes. Everything is worked out in your browser, nothing you enter is uploaded, and there is no sign-up. The link updates as you type so you can share a data set.