ToolSphere

Statistics Calculator

Computer science

Calculate mean, median, mode, sample and population standard deviation with steps. See variance, quartiles, range, IQR and potential outliers.

Mean
5.2
Median
5
Sample SD (n − 1)
2.5298221
Population SD (n)
2.4

Paste up to 200 values. Commas separate values, so enter 1000 rather than 1,000. Results update as you type.

Both SDs are shown: use sample SD when estimating a larger population from a sample; use population SD when describing the entire group of interest. Display rounds to eight significant digits; calculations keep unrounded values.

1. Sort, count and find the center

Sorted values: 2, 2, 3, 4, 5, 5, 6, 8, 8, 9

Count n = 10. Sum = 4 + 8 + 6 + 5 + 3 + 2 + 8 + 9 + 2 + 5 = 52.

Mean = sum / n = 52 / 10 = 5.2.

Median: average positions 5 and 6: (5 + 5) / 2 = 5.

Mode: 2, 5, 8. Highest frequency: 2. Tied repeated values are all reported.

Frequencies (value: count): 2: 2; 3: 1; 4: 1; 5: 2; 6: 1; 8: 2; 9: 1.

2. Subtract the mean and square

For every original value x, compute d = x − mean, then d².

RowValue xx − mean(x − mean)²
14-1.21.44
282.87.84
360.80.64
45-0.20.04
53-2.24.84
62-3.210.24
782.87.84
893.814.44
92-3.210.24
105-0.20.04

Sum of squared deviations, SS = 1.44 + 7.84 + 0.64 + 0.04 + 4.84 + 10.24 + 7.84 + 14.44 + 10.24 + 0.04 = 57.6.

Population variance σ² = SS / n = 57.6 / 10 = 5.76. Population SD σ = √5.76 = 2.4.

Sample variance s² = SS / (n − 1) = 57.6 / 9 = 6.4. Sample SD s = √6.4 = 2.5298221.

3. Find quartiles, spread and outliers

Quartile method: type 7 (inclusive linear interpolation). Set h = (n − 1)p, starting from index zero. Interpolate between the values at floor(h) and ceil(h). Positions below start at one. For a single value, both quartiles equal that value.

Q1: h = (10 − 1) × 0.25 = 2.25 (zero-based); positions 3 and 4: 3 + 0.25 × (4 − 3) = 3.25.

Q3: h = (10 − 1) × 0.75 = 6.75 (zero-based); positions 7 and 8: 6 + 0.75 × (8 − 6) = 7.5.

Range = maximum − minimum = 9 − 2 = 7.

IQR = Q3 − Q1 = 7.5 − 3.25 = 4.25.

Lower fence = Q1 − 1.5 × IQR = 3.25 − 1.5 × 4.25 = -3.125.

Upper fence = Q3 + 1.5 × IQR = 7.5 + 1.5 × 4.25 = 13.875.

Potential outliers, strictly below -3.125 or above 13.875: None. Values exactly on a fence are included, not flagged. Check unusual values before removing them.

Next: use your mean and SD in the z-score calculator, or explore the probability and statistics lab.

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use Statistics Calculator

  1. 1Start with the loaded example, or paste up to 200 numbers separated by commas, spaces or new lines.
  2. 2Read the mean, median and clearly labeled sample and population standard deviations above the input.
  3. 3Follow the sorted list, frequencies, squared deviations and quartile calculations below the input.
  4. 4Check the IQR fences for potential outliers, then use Copy results and steps to save the work.

About Statistics Calculator

Mean, median, mode and standard deviation with steps

Use this descriptive statistics calculator to check homework for Intro to Statistics, a lab report or a data analysis assignment. Paste a list of measurements and read the mean, median and both standard deviations first. Below the input, the calculator shows the sorted data, frequencies, every deviation from the mean, every squared deviation, the variance formulas and the quartile calculations. Nothing is hidden behind a calculate button. Change a value to see which parts of the work change with it.

Enter a clean list

Separate values with commas, spaces or new lines. Negative numbers, decimals and scientific notation are accepted. Commas are separators rather than thousands marks: enter 1000 for a thousand. Keep all measurements in the same units before calculating. Do not paste a header, a unit after each value or missing-value labels. Empty comma fields and invalid entries clear the answer instead of producing a result from only part of your data. The limit is 200 observations; nonzero magnitudes must be between 1e−100 and 1e100.

Worked example: center and frequency

The loaded data is 4, 8, 6, 5, 3, 2, 8, 9, 2, 5. Sorting gives 2, 2, 3, 4, 5, 5, 6, 8, 8, 9. There are 10 observations with a sum of 52, so the mean is 52 / 10 = 5.2. The middle positions are the fifth and sixth. Both contain 5, making the median (5 + 5) / 2 = 5. The values 2, 5 and 8 each occur twice, so all three are modes. The frequency list makes this tie visible rather than picking one arbitrarily.

The mean uses every observation and moves when an extreme observation changes. The median depends on the middle positions in the sorted data. Comparing them is useful, but similar values do not prove symmetry or a normal distribution. If no observation repeats, this tool reports no mode. A repeated value can be a mode even when another repeated value ties it for the highest frequency.

Worked example: variance and standard deviation

Subtract the mean from each original observation. For the first observation, 4 − 5.2 = −1.2, and its squared deviation is 1.44. Repeat that subtraction and squaring for every row. For this dataset the sum of squared deviations, SS, is 57.6. Population variance is SS / n = 57.6 / 10 = 5.76, and population standard deviation is √5.76 ≈ 2.4. Sample variance is SS / (n − 1) = 57.6 / 9 ≈ 6.4. Sample standard deviation is √6.4 ≈ 2.5298221.

Choose the denominator to match the question. Population SD describes the full group of interest. Sample SD is commonly used when those observations are a sample used to estimate variability in a larger population. The n − 1 correction makes sample variance unbiased under standard independent sampling assumptions; it does not make sample SD itself unbiased. Variance has squared units, while SD has the same units as the original measurements. One observation has population variance zero, but sample variance and sample SD are undefined.

Quartiles and the method used here

Different textbooks and software can produce different quartiles from the same short list. This calculator uses type 7, also called inclusive linear interpolation. For a proportion p, calculate the zero-based index h = (n − 1)p. If h is between indices, interpolate between the adjacent sorted values using its fractional part. This is the existing tool's method, and the steps identify each position and interpolation weight.

For the loaded example, Q1 uses h = 9 × 0.25 = 2.25. Positions 3 and 4 contain 3 and 4, so Q1 = 3 + 0.25 × (4 − 3) = 3.25. Q3 uses h = 9 × 0.75 = 6.75. Positions 7 and 8 contain 6 and 8, so Q3 = 6 + 0.75 × (8 − 6) = 7.5. If your course uses medians of the lower and upper halves, follow that convention and expect a different answer.

Range, IQR and potential outliers

Range is maximum minus minimum: 9 − 2 = 7. IQR is Q3 − Q1 = 7.5 − 3.25 = 4.25. The lower fence is Q1 − 1.5 × IQR = −3.125, and the upper fence is Q3 + 1.5 × IQR = 13.875. No loaded observation lies outside these fences. An observation exactly on a fence is not flagged. These are potential outliers to investigate, not instructions to delete data. A recording error and a valid unusual measurement need different treatment.

Use the work in your next assignment

Copy results and steps keeps the formulas with the answers. Displayed numbers use eight significant digits; calculations retain unrounded floating-point values. Small rounding differences can appear when repeating displayed intermediate steps. For standardized scores, continue to the z-score calculator. For related tools and study tasks, open the probability and statistics lab. Always report the SD denominator and quartile convention with your answer.

Guides and tutorials

Frequently asked questions

How do I calculate mean, median and mode?

Divide the sum by the count for the mean. Sort the data and take the middle value, or average the two middle values, for the median. Count each value's frequency for the mode; all repeated values tied at the highest frequency are shown.

Should I use sample or population standard deviation?

Use population SD to describe the complete group of interest, dividing the squared-deviation sum by n. Use sample SD when estimating a larger population's spread from a sample, dividing by n − 1. The calculator shows both with clear labels.

Does the calculator show the full standard deviation work?

Yes. It lists each original value, its deviation from the mean and its squared deviation, then the sum of those squares, both variance divisions and both square roots. You can copy the results and steps together.

Which quartile method is used?

Type 7, inclusive linear interpolation: use the zero-based index h = (n − 1)p, with p = 0.25 or 0.75, and interpolate between neighboring sorted values. This can differ from the median-of-halves method used in some courses.

How are potential outliers detected?

The calculator flags values strictly below Q1 − 1.5 × IQR or strictly above Q3 + 1.5 × IQR. Values equal to a fence are not flagged. Review unusual observations rather than automatically deleting them.

What if there is no mode or several modes?

When every value occurs once, the result says there is no mode. When repeated values tie for the highest frequency, all tied values are listed in ascending order. The full frequency list is shown.

Can I enter negative numbers or scientific notation?

Yes. Paste numbers separated by commas, spaces or new lines. Commas cannot act as thousands separators. Up to 200 observations are supported, with nonzero magnitudes from 1e−100 through 1e100. Invalid entries clear the answer.

What happens with one value or identical values?

For one value, mean, median and both quartiles equal that value; range, IQR and population variance are zero. Sample variance and SD are undefined because n − 1 is zero. With two or more identical values, both SDs are zero.

Why does rounding change my hand calculation slightly?

Displayed values use eight significant digits, while calculations use unrounded floating-point values. Keep extra digits until your final answer. Variance has squared units, and standard deviation has the original data units.

Are my numbers uploaded?

The calculation runs in your browser. This tool does not upload your dataset or store it. Copy results and steps writes to your clipboard only when you press the button.

Have a suggestion for Statistics Calculator?Share your feedback ↗