Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Statistics Calculator

How to use Statistics Calculator
  1. Pick how to enter data with the two tabs at the top: Manual Input for typing values, the file tab for a CSV or TXT file. Learn more about the tabs
  2. Type one number per Value box; click + Add Number for another box and the × next to a box to remove it. Learn more about entering values
  3. On the file tab, pick CSV or TXT, then click Choose File and select a file with one number per line or per comma. Learn more about files
  4. Click Calculate Statistics. The Results table lists 19 statistics, from the sample size to the root mean square. Learn more about the results
  5. Under the button, choose Auto, Always use n-1 (Sample) or Always use n (Population) for the variance and standard deviation. Learn more about sample and population
  6. Click the i icon next to any statistic to read its explanation in the Explanation panel; each explanation ends with a link to the section below that explains it. Learn more about the panel
  7. Click Reset to clear the values, the results and the explanation. Learn more about entering values
Probability Calculators
Continuous Distributions Calculator
Discrete Distributions Calculator

Input Data

Calculation Method

Results

Sample Size
iClick to see explanation
—
Sum
iClick to see explanation
—
Mean
iClick to see explanation
—
Median
iClick to see explanation
—
Mode
iClick to see explanation
—
Min
iClick to see explanation
—
Max
iClick to see explanation
—
Range
iClick to see explanation
—
Variance
iClick to see explanation
Standard Deviation
iClick to see explanation
Q1 (First Quartile)
iClick to see explanation
—
Q3 (Third Quartile)
iClick to see explanation
—
IQR
iClick to see explanation
—
Skewness
iClick to see explanation
—
Kurtosis
iClick to see explanation
—
Coefficient of Variation
iClick to see explanation
—
Geometric Mean
iClick to see explanation
—
Harmonic Mean
iClick to see explanation
—
Root Mean Square
iClick to see explanation
—

Explanation

Click on any i icon in the results to see an explanation





Getting Started with the Statistics Calculator

DemoFive values, the results table, one explanation, Reset
Step 0 of 5
The calculator takes a list of numbers and returns nineteen descriptive statistics at once. It has four parts, top to bottom: two tabs that choose how the data comes in, Manual Input or a file; the data area, which is a column of Value boxes or a file picker; the Calculate Statistics button with three radios under it for the variance formula; and the Results table with the Explanation panel next to it.

Start on the Manual Input tab, which is selected when the page opens. There is one Value box; click + Add Number for each further value, type one number per box, and click Calculate Statistics. For the values 11, 22, 22, 33 and 77 the table shows a sample size of 55, a sum of 15.0015.00, a mean of 3.003.00, a median of 2.002.00 and a mode of 22, and goes on down to the root mean square.

Every row of the table has an i icon. Click it and the Explanation panel on the right describes that statistic and its formula; the text ends with a link to the section on this page that treats it in full. Reset clears the boxes, the table and the panel.

What the nineteen numbers tell you about a dataset is explained in what descriptive statistics describe.

Entering Values by Hand

DemoAdd boxes, remove a box, recalculate
Step 0 of 5
On the Manual Input tab each number has its own Value box. The page opens with one box; click + Add Number as often as you need, and type one number per box. Whole numbers, decimals and negative numbers are all accepted; a box left empty or holding text is not a number and the calculation reports an error.

Every box except the first has an × button on its right. Click it to remove that box and its value. The remaining boxes keep their values, so you can recalculate at once: with 44, 88 and 99 the sample size is 33, the mean 7.007.00 and the median 8.008.00; remove the 99 and the sample size is 22, the mean 6.006.00 and the median 6.006.00.

The order of the boxes does not matter, because the calculator sorts the values before it computes the median, the quartiles and the minimum and maximum. For more than a dozen values the file tab is quicker, as described in uploading a data file.

Click Reset to empty every box and clear the results. The statistics that need only the count and the extremes of the list are explained in count, sum, minimum, maximum and range.

Uploading a Data File

DemoThe file tab and its two formats
Step 0 of 5
Click the second tab at the top to load the numbers from a file instead of typing them. The Value boxes are replaced by two format radios and a Choose File button.

Pick CSV for a file whose numbers are separated by commas, on one line or many; pick TXT for a file with one number per line. Then click Choose File, which opens your system's file dialog; the demo above stops at the button, since a file dialog cannot be driven from the page. After you pick a file the numbers are read at once and the Results table is cleared until you click Calculate Statistics again.

The file must be plain text with the extension .csv or .txt; any other file is refused with the message Please upload a valid .txt or .csv file. Entries that are not numbers are skipped. A file with fewer than two numbers gives no useful spread statistics, as explained in variance and standard deviation.

Click Manual Input to return to the boxes; the file's numbers are kept until you click Reset.

Sample or Population

DemoWhich formula the variance uses
Step 0 of 5
Under the Calculate Statistics button three radios decide which formula the variance and the standard deviation use. Always use n-1 (Sample) divides the squared deviations by n−1n - 1, the correction for data that is a sample of a larger population. Always use n (Population) divides by nn, for data that is the whole population. Auto, the default, uses n−1n - 1 when there are fewer than 3030 values and nn otherwise.

For the values 11, 22, 22, 33 and 77 the sample formula gives a variance of 5.505.50 and a standard deviation of 2.352.35; the population formula would give 4.404.40 and 2.102.10. The table reports the sample values here, because n=5n = 5 is below 3030.

Choosing Always use n (Population) switches the table to the nn result at any size; for the five values above it shows 4.404.40 and 2.102.10. The coefficient of variation, the skewness and the kurtosis always use the population standard deviation.

Which formula fits which situation, and why the correction is n−1n - 1, is explained in variance and standard deviation.

Reading the Results Table

DemoNineteen statistics for one dataset
Step 0 of 5
After Calculate Statistics the Results table lists nineteen rows in a fixed order: the sample size and the sum; the three averages, mean, median and mode; the minimum, the maximum and the range; the variance and the standard deviation; the first and third quartiles and the interquartile range; the skewness and the kurtosis; the coefficient of variation; and the geometric mean, the harmonic mean and the root mean square.

Values are rounded to two decimal places, except the sample size, the mode, the minimum and the maximum, which are printed as entered. The coefficient of variation carries a percent sign. For the values 33, 55, 55, 88 and 99 the table reads: sample size 55, sum 30.0030.00, mean 6.006.00, median 5.005.00, mode 55, minimum 33, maximum 99, range 66, variance 6.006.00, standard deviation 2.452.45, quartiles 5.005.00 and 8.008.00, interquartile range 3.003.00, skewness 0.110.11, kurtosis −1.44-1.44, coefficient of variation 36.51%36.51\%, geometric mean 5.585.58, harmonic mean 5.165.16 and root mean square 6.396.39.

When every value occurs equally often the mode reads No unique mode. With only two values the quartiles are the two values themselves, so for 44 and 88 the first quartile is 4.004.00, the third 8.008.00 and the interquartile range 4.004.00.

The averages are compared in mean, median and mode.

The Explanation Panel

DemoOne explanation per statistic
Step 0 of 5
The Explanation panel sits to the right of the Results table. Before you click anything it says: click any i icon in the results to see an explanation. Click the icon next to a statistic and the panel shows its definition and its formula in plain symbols, for example the standard deviation as the square root of the variance, s=s2s = \sqrt{s^2}, or the geometric mean as the nn-th root of the product of the values.

The panel keeps the last explanation until you click another icon or Reset. Every explanation ends with a link, so a reader who wants the full story on, say, the quartiles can jump straight to the section below that treats them; the sections then link on to the lessons.

Each statistic has one explanation; the two formula variants of the variance and the standard deviation, with n−1n - 1 and with nn, are both given in their text. For the values 11, 22, 22, 33 and 77 the standard deviation is 2.352.35 and the geometric mean 2.432.43.

The statistics that measure the shape of the data, and the three less common means, are explained in skewness, kurtosis and other means.

What Descriptive Statistics Describe

Descriptive statistics summarise a list of numbers with a few figures. Each figure answers one question. How many values are there, and how large are they in total? That is the count and the sum. Where is the middle of the data? That is the mean, the median and the mode. How far do the values spread? That is the range, the variance, the standard deviation and the interquartile range. Is the spread symmetric, and are there outliers? That is the skewness and the kurtosis.

Two things to keep in mind. First, a statistic is a function of the data and nothing else; change one value and most of them change. Second, the mean and the standard deviation are sensitive to extreme values while the median and the quartiles are not, so a dataset with a long tail is better described by the second pair.

The calculator computes nineteen such figures from one list, the sample size up to the root mean square. The sections that follow explain them in groups: count, sum, minimum, maximum and range, mean, median and mode, variance and standard deviation, quartiles and the interquartile range and skewness, kurtosis and other means.

The idea of a centre is introduced in the intuition behind expected value and the idea of spread in what variance measures.

Count, Sum, Minimum, Maximum and Range

The sample size nn is the number of values. The sum ∑x\sum x adds them all; for 11, 22, 22, 33 and 77 it is 1515. Both are needed by almost every other statistic: the mean is the sum divided by the count, and the variance divides by n−1n - 1 or nn.

The minimum and the maximum are the smallest and the largest values, found by sorting; here 11 and 77. The range is their difference, 7−1=67 - 1 = 6. It is the simplest measure of spread, but it depends on the two extreme values alone: adding a single outlier can double it while the rest of the data stays put. That is why the interquartile range and the standard deviation are used alongside it.

The calculator prints the count, the minimum and the maximum as entered and the sum with two decimals. The common mistake is to confuse the range with the interval it spans: the range of 33, 55, 55, 88, 99 is the single number 66, not "from 33 to 99".

Mean, Median and Mode

The mean is the sum divided by the count: for 11, 22, 22, 33 and 77, xˉ=15/5=3.00\bar{x} = 15 / 5 = 3.00. The median is the middle value after sorting, here 22; with an even count it is the average of the two middle values, so the median of 44 and 88 is 66. The mode is the most frequent value, here 22; a dataset can have several modes, and when every value occurs once the calculator reports no unique mode.

The three agree for symmetric data and separate when the data has a tail. In 1,2,2,3,71, 2, 2, 3, 7 the single large value pulls the mean up to 33 while the median stays at 22: the mean follows outliers, the median does not. For incomes, house prices or response times the median is therefore the usual summary.

The common mistake is to use the mean of a few values as if it were typical of them: 4,8,94, 8, 9 has mean 7.007.00, but no value is near 77. Look at the median and the spread before trusting an average.

See how to calculate expected value, how to find the median, how to find the mode and median, mean, and mode compared.

Variance and Standard Deviation

The variance measures spread as the average squared distance from the mean. For a sample it is s2=∑(x−xˉ)2/(n−1)s^2 = \sum (x - \bar{x})^2 / (n - 1), for a whole population σ2=∑(x−μ)2/N\sigma^2 = \sum (x - \mu)^2 / N. For 11, 22, 22, 33 and 77 the squared deviations from 33 are 44, 11, 11, 00 and 1616, summing to 2222; the sample variance is 22/4=5.5022 / 4 = 5.50 and the population variance 22/5=4.4022 / 5 = 4.40.

The standard deviation is the square root of the variance and has the units of the data: 5.50≈2.35\sqrt{5.50} \approx 2.35 or 4.40≈2.10\sqrt{4.40} \approx 2.10. The division by n−1n - 1 compensates for the fact that a sample's values sit closer to their own mean than to the population mean; without it the sample variance would be too small on average. For large samples the two formulas agree closely, which is why the calculator's Auto setting switches to nn at 3030 values.

The coefficient of variation divides the standard deviation by the mean and reports a percentage, so spreads of datasets with different units or scales can be compared; the calculator uses the population standard deviation for it, 2.10/3≈69.92%2.10 / 3 \approx 69.92\%. The common mistake is to compare variances of data in different units; use the standard deviation or the coefficient of variation instead.

See how to calculate variance, variance vs standard deviation and why squaring the distance.

Quartiles and the Interquartile Range

The quartiles cut the sorted data into four parts. The first quartile Q1Q_1 sits a quarter of the way up, the third quartile Q3Q_3 three quarters of the way, and the median between them. The interquartile range IQR=Q3−Q1IQR = Q_3 - Q_1 is the width of the middle half of the data: for 33, 55, 55, 88 and 99 the calculator gives Q1=5.00Q_1 = 5.00, Q3=8.00Q_3 = 8.00 and IQR=3.00IQR = 3.00.

Several conventions exist for the quartile positions and they differ slightly on small datasets. This calculator uses the positions n/4n / 4 and 3n/43n / 4 of the sorted list: with an even count it averages the two values around each position, with an odd count it takes the value at the position. For 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 9 that gives Q1=4.00Q_1 = 4.00 and Q3=6.00Q_3 = 6.00.

The interquartile range is the spread measure that ignores outliers, since it uses only the middle half. A value more than 1.5×IQR1.5 \times IQR beyond a quartile is the usual rule for flagging an outlier. The common mistake is to expect the quartiles to lie exactly on data values; with an even count they are often averages.

See median as the 50th percentile and how to find the median.

Skewness, Kurtosis and Other Means

Skewness measures the asymmetry of the data. The calculator computes ∑(x−xˉ)3/(nσ3)\sum (x - \bar{x})^3 / (n \sigma^3) with the population standard deviation: a positive value means a longer tail to the right, as for 1,2,2,3,71, 2, 2, 3, 7 with skewness 1.171.17; a value near zero means a symmetric shape, as for 3,5,5,8,93, 5, 5, 8, 9 with 0.110.11. Kurtosis measures how heavy the tails are; the calculator reports the excess kurtosis, ∑(x−xˉ)4/(nσ4)−3\sum (x - \bar{x})^4 / (n \sigma^4) - 3, which is 00 for a normal distribution, negative for flat data such as 3,5,5,8,93, 5, 5, 8, 9 with −1.44-1.44, and positive when outliers dominate.

Three further averages suit special data. The geometric mean, the nn-th root of the product, averages growth factors and percentages: for 1,2,2,3,71, 2, 2, 3, 7 it is 845≈2.43\sqrt[5]{84} \approx 2.43. The harmonic mean, nn divided by the sum of reciprocals, averages rates such as speeds over equal distances: 5/(1+1/2+1/2+1/3+1/7)≈2.025 / (1 + 1/2 + 1/2 + 1/3 + 1/7) \approx 2.02. The root mean square, ∑x2/n\sqrt{\sum x^2 / n}, averages magnitudes regardless of sign, as for alternating currents: 67/5≈3.66\sqrt{67 / 5} \approx 3.66. For positive data the harmonic mean is never above the geometric mean, which is never above the arithmetic mean: 2.02≤2.43≤3.002.02 \le 2.43 \le 3.00.

The geometric and harmonic means need positive values; a zero or a negative value makes them meaningless. The common mistake is to average percentages or speeds with the arithmetic mean when the geometric or harmonic mean is the right one.