Statistics Calculator
- Updated
- Formula shown
- Free, no sign-up
Results
15 values: mean 16.53333333, median 15, sample SD 7.651952754, range 32
- 5 to < 10
- 1
- 10 to < 15
- 5
- 15 to < 20
- 6
- 20 to < 25
- 2
- 25 to < 30
- 0
- 30 to < 35
- 0
- 35 to < 40
- 0
- 40 to < 45
- 1
| Class | Frequency | Relative frequency | Cumulative frequency |
|---|---|---|---|
| 5 to < 10 | 1 | 6.667% | 1 |
| 10 to < 15 | 5 | 33.33% | 6 |
| 15 to < 20 | 6 | 40% | 12 |
| 20 to < 25 | 2 | 13.33% | 14 |
| 25 to < 30 | 0 | 0% | 14 |
| 30 to < 35 | 0 | 0% | 14 |
| 35 to < 40 | 0 | 0% | 14 |
| 40 to < 45 | 1 | 6.667% | 15 |
Read 15 values.
Quartiles: Position (n − 1) × p + 1 in the sorted list, interpolating between neighbors (Excel QUARTILE.INC, R type 7).
How to use the statistics calculator
- Paste or type your data, separated by commas, spaces or new lines. Up to 10,000 values are read; anything that is not a number is listed and skipped.
- Pick the quartile method that matches your course, textbook or software (Excel QUARTILE.INC is the default).
- Scroll through the results: summary statistics first, then the histogram and the frequency table.
Formulas used
Q1, Q3 (QUARTILE.INC): value at position (n − 1) × p + 1, p = 0.25, 0.75
IQR = Q3 − Q1 · Outlier fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR
s = √(Σ(x − x̄)² ÷ (n − 1)) · Standard error = s ÷ √n
Skewness G₁ = √(n(n − 1)) ÷ (n − 2) × m₃ ÷ m₂^1.5
Excess kurtosis G₂ = (n − 1) ÷ ((n − 2)(n − 3)) × ((n + 1) × (m₄ ÷ m₂² − 3) + 6)
Geometric mean = ⁿ√(x₁x₂…xₙ) · Harmonic mean = n ÷ Σ(1 ÷ x)
Here mₖ = Σ(x − x̄)ᵏ ÷ n is the k-th central moment. G₁ and G₂ are the sample-adjusted versions reported by Excel's SKEW and KURT functions and by most statistics packages; the uncorrected population versions g₁ and g₂ are shown alongside. The geometric and harmonic means are only given when every value is positive. The standard deviation comes from Welford's one-pass algorithm, which stays accurate even when values are large and close together.
Worked example
The default data has 15 values from 9 to 41. The mean is 248 ÷ 15 = 16.53 and the median, the 8th of the 15 sorted values, is 15. With the inclusive method Q1 = 12.5 and Q3 = 17.5, so the IQR is 5 and the outlier fences are 5 and 25. The value 41 lies beyond the upper fence, so it is flagged as an outlier.
That one value pulls the mean above the median and gives a strongly right-skewed shape: skewness 2.541, excess kurtosis 7.962 and a sample standard deviation of 7.652. Without it, the remaining 14 values have mean 14.79, median 15, standard deviation 3.704 and skewness 0.314. The median barely moves, which is why it is the more robust measure of the center.
Quartile methods compared
Hyndman and Fan (The American Statistician, 1996) catalogued nine different sample quantile definitions in common software, and calculators, spreadsheets and textbooks still disagree. For large data sets the differences are tiny; for small ones they are visible. Here are the four methods offered above, applied to 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5 (sorted: 1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9):
| Method | Q1 | Median | Q3 | IQR |
|---|---|---|---|---|
| Excel QUARTILE.INC (linear interpolation) | 2.5 | 4 | 5 | 2.5 |
| Excel QUARTILE.EXC | 2 | 4 | 5 | 3 |
| Median of each half (TI-84, most school courses) | 2 | 4 | 5 | 3 |
| Tukey's hinges | 2.5 | 4 | 5 | 2.5 |
- Excel QUARTILE.INC (linear interpolation): Position (n − 1) × p + 1 in the sorted list, interpolating between neighbors (Excel QUARTILE.INC, R type 7).
- Excel QUARTILE.EXC: Position (n + 1) × p in the sorted list, interpolating between neighbors (Excel QUARTILE.EXC, R type 6). Needs at least 3 values.
- Median of each half (TI-84, most school courses): Q1 and Q3 are the medians of the lower and upper halves; with an odd count the middle value is left out of both halves.
- Tukey's hinges: Q1 and Q3 are the medians of the lower and upper halves; with an odd count the middle value is included in both halves.
If your answer key disagrees with yours by half a step, the method is almost always the reason. Say which one you used when you report quartiles.
Interpreting the results
- Mean vs median. When the mean is well above the median, a few large values are stretching the right tail; well below, the left tail.
- Skewness. As a rough guide, values between −0.5 and 0.5 suggest a fairly symmetric shape, and values beyond ±1 a clearly skewed one. Small samples give noisy estimates.
- Excess kurtosis. 0 matches a normal distribution. Positive values mean heavier tails and more extreme values; negative values mean lighter tails, as in a flat, uniform-looking spread.
- Outliers. The 1.5 × IQR rule (Tukey's fences) flags values worth checking. It does not prove they are errors: check them, do not just delete them.
- Coefficient of variation. s ÷ |x̄| compares spread between data sets with different units or scales; it is only meaningful for data measured from a true zero.
Reading the histogram
With 12 or fewer distinct values the frequency table lists each value. Otherwise the data is grouped into equal-width classes. The number of classes starts from Sturges' rule, k = ⌈log₂ n⌉ + 1, and the width is rounded to a tidy 1, 2, 2.5 or 5 times a power of ten. Each class includes its lower edge but not its upper edge, except the last one, which includes both.
For just the basics with the working shown, try the mean, median, mode and range calculator; for spread alone, the standard deviation calculator shows every squared deviation.
Frequently asked questions
How do you find outliers with the IQR?
Work out Q1 and Q3, take IQR = Q3 − Q1, and flag values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. For the example data set Q1 = 12.5 and Q3 = 17.5, so the fences are 5 and 25 and the value 41 is an outlier.
Why do different calculators give different quartiles?
There are several accepted definitions. For 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, Excel QUARTILE.INC and Tukey’s hinges give Q1 = 2.5, while QUARTILE.EXC and the median-of-halves method taught in many schools give Q1 = 2. This calculator lets you pick the method.
What do skewness and kurtosis mean?
Skewness measures lopsidedness: positive means a long right tail, negative a long left tail, and near 0 is roughly symmetric. Excess kurtosis compares the tails with a normal distribution (0). The example data has skewness 2.54 and excess kurtosis 7.96 because of the single large value 41.
What is the standard error of the mean?
It is the sample standard deviation divided by √n and estimates how much the sample mean would vary between samples. For the example data, s = 7.652 and n = 15, so the standard error is 7.652 ÷ √15 ≈ 1.976.
When should I use the geometric or harmonic mean?
Use the geometric mean for growth rates and ratios, and the harmonic mean for averaging rates such as speeds over equal distances. Both need positive values. For 2 and 8, the arithmetic mean is 5, the geometric mean 4 and the harmonic mean 3.2.