On this page
How to use the statistics calculator
The tool above has three tabs: Describe data, Regression and Distributions.
- Describe data: paste numbers separated by spaces, commas, semicolons or new lines. Anything that is not a number is skipped and listed in a warning.
- Regression: type one x, y pair per line. You need at least three pairs. Fill the predict box to get y at a chosen x.
- Distributions: choose normal, t, chi-square or F, enter its parameters, then choose the question and type x, a probability or α.
| Input | What you type | Example |
|---|---|---|
| Describe data | numbers split by space, comma or semicolon | 72 85 90 68 77 |
| Regression | x, then y, one pair per line | 50 2.1 |
| Parameters | normal: μ and σ; t, chi-square: df; F: d1 and d2 | 10 |
| Question | P(X ≤ x), P(X ≥ x), P(a ≤ X ≤ b), x for a left-tail probability, or a two-tailed critical value for α | α = 0.05 |
To read a row of a t table, choose Student t, type the df, pick the two-tailed critical value and type α. Any df works, not only the ones printed in a textbook.
The math behind it
Standard deviation: sample vs population
Square each deviation from the mean, add them up, divide, then take the square root.
- Population:
σ = √( Σ(x − μ)² / n ) - Sample:
s = √( Σ(x − x̄)² / (n − 1) )
Why n − 1? The sample mean x̄ comes from the same data, so the points sit closer to it than to the true mean, and dividing by n comes out low. Dividing by n − 1 (Bessel's correction) fixes that on average. Use s for a sample of something bigger, such as 15 lab readings. Use σ only when you have the whole group. For 4, 8, 6, 5, 7 the sample SD is 1.5811 and the population SD is 1.4142.
Quartiles and the 1.5 × IQR rule
The IQR is Q3 − Q1. No single quartile method is standard. This calculator takes the median of each half and leaves the middle value out of both halves when n is odd, as most textbooks and the TI-84 do. Excel's QUARTILE.INC interpolates at position 1 + (n − 1)p instead, so the answers differ. Example 1 shows it.
The outlier fences are Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. A value outside them is flagged. Treat that as a prompt to check the measurement, not a licence to delete it.
Regression and R²
Least squares minimises the sum of squared vertical gaps. The slope is b = Sxy / Sxx and the intercept is ȳ − b·x̄. R² is the share of the variation in y that the curve explains, 1 − SSE / SST, and for a straight line it equals r². The tool fits linear, quadratic, exponential and power models and measures each R² on your original y values. Exponential and power fits run a straight line through ln y (and ln x), so they need positive data.
A model with more terms never fits worse, so a higher R² alone proves little. Pick the simplest curve whose R² is close to the best. See choosing the right regression model for more.
Two-tailed critical values
A two-tailed critical value cuts α/2 off each end. For α = 0.05 you find the point with 0.975 of the area to its left and read it as ±. The t distribution has heavier tails than the normal when df is small, so its values are larger. Use normal for z scores, t for a small-sample mean (df = n − 1), chi-square for variances and goodness of fit, and F for ratios of variances.
Three worked examples
Example 1: a class of 15 test scores
Scores: 72, 85, 90, 68, 77, 81, 94, 58, 88, 79, 83, 91, 74, 86, 35. Sorted: 35, 58, 68, 72, 74, 77, 79, 81, 83, 85, 86, 88, 90, 91, 94.
| Statistic | Value |
|---|---|
| n, sum | 15, 1161 |
| Mean, median | 77.4, 81 |
| Q1, Q3, IQR | 72, 88, 16 |
| Sample SD, population SD | 15.1507, 14.6369 |
| Fences, outliers | 48 and 112, 35 |
By hand: the squared deviations from 77.4 add up to 3213.6. Divide by 14 for the sample variance 229.5429, and its square root is 15.1507. Divide by 15 and you get 214.24, so σ = 14.6369, about 3.4% lower.
Only 35 sits outside the fences. Drop it and the mean rises to 80.43, the median moves from 81 to 82, and the sample SD falls from 15.15 to 9.95. The median barely noticed the low score while the SD reacted strongly, which is why you report both. With QUARTILE.INC you get Q1 = 73, Q3 = 87 and fences 52 and 108: different numbers, same outlier. Its z score is (35 − 77.4) / 15.1507 = −2.80.
Example 2: a spring lab fitted with a line
Mass in grams against extension in centimetres: (50, 2.1), (100, 3.9), (150, 6.2), (200, 8.1), (250, 10.4), (300, 11.9).
The means are x̄ = 175 and ȳ = 7.1. With Sxx = 43750 and Sxy = 1760, the slope is 1760 / 43750 = 0.0402286 cm per gram and the intercept is 7.1 − 0.0402286 × 175 = 0.06. The fit is y = 0.06 + 0.0402286x, with r = 0.998747 and R² = 0.997496.
The other models score R² = 0.997874 (quadratic), 0.997560 (power) and 0.891386 (exponential). The tool highlights the quadratic as best fit, but it gains only 0.0004 for an extra term, and Hooke's law says extension is proportional to load. Keep the line. The near-zero intercept agrees.
At 220 g the line predicts 0.06 + 0.0402286 × 220 = 8.91 cm. The slope also gives the spring constant: 0.0402286 cm/g is 0.4023 m/kg, so k = 9.81 / 0.4023 ≈ 24.4 N/m, taking g = 9.81 m/s².
Example 3: t critical value for a 95% interval, df = 10
You measured 11 values, so df = 10. A 95% interval means α = 0.05, with 0.025 in each tail, so you want the t value with 0.975 of the area to its left. The calculator returns 2.228 (2.228139). The matching normal value is 1.96 (1.959964).
Say the 11 values have mean 50.2 and sample SD 3.1. The standard error is 3.1 / √11 = 0.9347. With t the margin is 2.228139 × 0.9347 = 2.0826, giving 48.12 to 52.28. With z it would be 1.8319, giving 48.37 to 52.03, about 12% too narrow for 11 points.
The t value shrinks toward 1.96 as df grows: 4.3027 at df 2, 2.5706 at df 5, 2.0423 at df 30, 1.9623 at df 1000. At α = 0.01 and df = 10 it is 3.1693.
Reading the result and common mistakes
- Sample vs population. Quote the n − 1 figure for a sample. The tool shows both, so copying the wrong one is easy.
- Mean vs median. In example 1 the mean (77.4) sits below the median (81) and the skewness is −1.73: the low tail pulls the mean down.
- Extrapolating. The spring line says 16.15 cm at 400 g, but nothing was measured past 300 g and real springs leave the Hooke range near their limit.
- Trusting R² alone. Look at the scatter plot. A high R² can hide a curve.
- One tail or two. P(X ≥ x) is one-tailed and the critical value option is two-tailed. For a one-tailed 5% test, use the inverse option with probability 0.95.
- Wrong df. A one-sample t interval uses n − 1. For the 15 scores that is 14, and the critical value is 2.1448.
Correlation is not causation. A strong r means two variables move together, not that one causes the other.
For practice, see standard deviation by hand vs calculator.
Frequently asked questions
Should I use the sample or the population standard deviation?
Use the sample SD (divide by n − 1) when your data is a sample from a larger group, which is almost always true in a lab or a survey. Use the population SD (divide by n) only when you measured every member. For 4, 8, 6, 5, 7 the answers are 1.5811 and 1.4142.
Why does my quartile calculator differ from Excel?
Several quartile methods are in use. This tool takes the median of each half, as most textbooks and the TI-84 do. Excel's QUARTILE.INC interpolates. On the 15 test scores one gives Q1 = 72 and Q3 = 88, the other 73 and 87.
What is the 1.5 × IQR rule, and should I delete outliers?
A value is flagged when it lies below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. The fences are shown so you can see why. Check flagged values for errors, and remove one only if you can name a reason.
How do I calculate a z score?
Use z = (x − mean) / SD. There is no separate z score box, but Describe data gives the mean and SD. For the score 35 in example 1, z = −2.80. For the probability, choose the normal distribution with μ = 0 and σ = 1 and use P(X ≤ x): 0.0026.
How do I find a t critical value for any df and α?
Open Distributions, choose Student t, type the df, pick the two-tailed critical value and enter α. With df = 10 and α = 0.05 you get ±2.228. The value is computed, so df = 37 works as well as a printed row.
Which regression model should I pick?
Start with the straight line and check the scatter plot. Move to a quadratic, exponential or power curve only if the points clearly bend and R² improves meaningfully. In the spring example the quadratic beats the line by 0.0004, so the line wins.