Skip to main content

Calcu.fit

Statistics Calculator: Mean, Median, Mode, Standard Deviation & More

Use this free statistics calculator to analyze a set of numbers. Paste or type your data, separated by commas, spaces, or new lines, and the calculator shows the count, sum, mean, median, mode, range, variance, standard deviation, quartiles, and outliers. It also gives z-scores, a confidence interval for the mean, and, for two sets of data, the correlation and a best-fit line. No signup needed.

Statistics Calculator

Enter your numbers to calculate mean, median, mode, standard deviation, quartiles, outliers and more.

Statistical Results

Quartiles & Outliers

Z-Scores

Confidence Interval

Histogram

Correlation & Linear Regression

Enter two lists with an equal number of values.

Calculation Details

How to Use This Statistics Calculator

For correlation and regression, enter two lists of equal length, one for X and one for Y.

  1. Enter your numbers, separated by commas, spaces, or line breaks. You can use decimals and negative numbers.
  2. Choose whether your data is a sample (a part of a larger group) or a population (the whole group). This changes the variance and standard deviation.
  3. Click Calculate.

What You’ll See in Your Results

  • Count, sum, minimum, and maximum
  • Mean, median, and mode
  • Range
  • Variance and standard deviation (sample and population)
  • Quartiles (Q1, Q2, Q3), interquartile range (IQR), and outliers
  • Standard error and coefficient of variation
  • Confidence interval for the mean
  • Z-scores for your values
  • Correlation and linear regression, for two data sets
  • A histogram or box plot

Statistics Formulas

In these formulas, n is the number of values, x̄ is the mean, and Σ means “add up.”

MeasureFormula
Meanx̄ = Σx ÷ n
MedianThe middle value of the sorted data (the average of the two middle values if n is even)
ModeThe value that appears most often
RangeMaximum − Minimum
Population varianceσ² = Σ(x − x̄)² ÷ n
Sample variances² = Σ(x − x̄)² ÷ (n − 1)
Standard deviationThe square root of the variance
Standard error of the means ÷ √n
Coefficient of variations ÷ x̄ × 100%
Z-scorez = (x − x̄) ÷ s
Interquartile range (IQR)Q3 − Q1
Outlier fencesQ1 − 1.5 × IQR and Q3 + 1.5 × IQR
Confidence interval for the meanx̄ ± t × (s ÷ √n)
Weighted meanΣ(w × x) ÷ Σw
Geometric mean(x₁ × x₂ × … × xₙ)^(1/n)
Harmonic meann ÷ Σ(1/x)
Correlation (r)Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²)
Regression liney = a + b × x, where b = r × (sy ÷ sx) and a = ȳ − b × x̄

The t value in the confidence interval depends on the sample size and the confidence level. For 95% confidence and 7 degrees of freedom, t is about 2.365.

Statistics Examples

All examples use this data set of 8 values: 12, 15, 11, 18, 15, 20, 15, 13

Sorted: 11, 12, 13, 15, 15, 15, 18, 20

Example 1: Count, Sum, Mean

  • Count: 8
  • Sum: 11 + 12 + 13 + 15 + 15 + 15 + 18 + 20 = 119
  • Mean: 119 ÷ 8 = 14.875

Example 2: Median

The data has 8 values, so the median is the average of the 4th and 5th sorted values.

  • Median: (15 + 15) ÷ 2 = 15

Example 3: Mode

  • The value 15 appears 3 times, more than any other value.
  • Mode: 15

A data set can have no mode, one mode, or several modes.

Example 4: Range

  • Range: 20 − 11 = 9

Example 5: Variance and Standard Deviation

First, find each value’s difference from the mean (14.875), square it, and add up the results.

  • Sum of squared differences: 62.875
  • Population variance: 62.875 ÷ 8 = 7.859, standard deviation: 2.803
  • Sample variance: 62.875 ÷ 7 = 8.982, standard deviation: 2.997

Use the sample version when your data is a sample from a larger group. It divides by n − 1, which corrects for the fact that a sample tends to underestimate the spread of the whole group.

Example 6: Quartiles, IQR, and Outliers

The lower half is 11, 12, 13, 15, and the upper half is 15, 15, 18, 20.

  • Q1 (median of the lower half): 12.5
  • Q2 (the median): 15
  • Q3 (median of the upper half): 16.5
  • IQR: 16.5 − 12.5 = 4
  • Outlier fences: 12.5 − 1.5 × 4 = 6.5 and 16.5 + 1.5 × 4 = 22.5
  • No values fall outside 6.5 to 22.5, so there are no outliers.

Different programs use slightly different methods to find quartiles, so results can differ a little.

Example 7: Standard Error and Coefficient of Variation

  • Standard error of the mean: 2.997 ÷ √8 = 1.060
  • Coefficient of variation: 2.997 ÷ 14.875 × 100 = 20.1%

Example 8: Z-Scores

  • For the value 20: (20 − 14.875) ÷ 2.997 = 1.71, which is 1.71 standard deviations above the mean
  • For the value 11: (11 − 14.875) ÷ 2.997 = −1.29

Example 9: Confidence Interval for the Mean

With 95% confidence and 7 degrees of freedom, t = 2.365.

  • Margin of error: 2.365 × 1.060 = 2.51
  • 95% confidence interval: 14.875 ± 2.51, or 12.37 to 17.38

This means that, if the data are a random sample and meet the assumptions, we are 95% confident that the true mean of the whole group is in this range.

Example 10: How an Outlier Changes the Mean

Data: 10, 12, 12, 13, 12, 14, 13, 15, 50

  • Mean: 16.78, pulled up by the value 50
  • Median: 13, which is not affected much

When data has outliers, the median can describe the center better than the mean.

Example 11: Weighted Mean

Your scores are 90, 80, and 70, with weights of 50%, 30%, and 20%.

  • Weighted mean: 90 × 0.5 + 80 × 0.3 + 70 × 0.2 = 83

Example 12: Geometric and Harmonic Means

  • Geometric mean of 2 and 8: √(2 × 8) = 4. It is used for growth rates and ratios.
  • Harmonic mean of 40 and 60: 2 ÷ (1/40 + 1/60) = 48. It gives the average speed if you travel the same distance at 40 and at 60.

Example 13: Correlation and Regression

X = 1, 2, 3, 4, 5 and Y = 2, 4, 5, 4, 5.

  • Correlation (r): 0.775, a fairly strong positive relationship
  • Regression line: y = 2.2 + 0.6x
  • Predicted y at x = 6: 2.2 + 0.6 × 6 = 5.8

Correlation does not prove that one thing causes another. Be careful about predicting far outside your data.

Example 14: The Normal Distribution

For data that follow a normal (bell-shaped) distribution:

  • About 68.27% of values fall within 1 standard deviation of the mean
  • About 95.45% fall within 2 standard deviations
  • About 99.7% fall within 3 standard deviations
  • Exactly 95% fall within 1.96 standard deviations

Example 15: Percentile Rank

In the data set above, 3 of the 8 values are below 15.

  • Percentile rank of 15: 3 ÷ 8 = 37.5% (using the share of values below it)

Mean, Median, and Mode: Which to Use?

MeasureBest forWatch out for
MeanData without big outliers, and symmetric dataPulled by extreme values
MedianSkewed data or data with outliers, such as incomes or house pricesIgnores the size of the values
ModeCategories and the most common valueMay not exist or may not be unique

Sample vs. Population

  • Population: every member of the group you care about. Use the population formulas (divide by n).
  • Sample: a smaller group taken from the population. Use the sample formulas (divide by n − 1).

If you are unsure, the sample version is the safer choice, since most real data sets are samples.

What Is a Standard Deviation?

The standard deviation measures how spread out the values are around the mean. A small standard deviation means the values are close to the mean. A large one means they are spread out. It is in the same units as the data, which makes it easy to read: for the data above, a typical value is about 3 away from the mean of 14.9.

Reading Correlation

rMeaning
1Perfect positive relationship
0.7 to 0.99Strong positive
0.3 to 0.69Moderate positive
−0.29 to 0.29Weak or no linear relationship
−0.69 to −0.3Moderate negative
−0.99 to −0.7Strong negative
−1Perfect negative relationship

These labels are a rough guide, and what counts as strong depends on your field.

Tips for Using a Statistics Calculator

  • Check your data for typing errors before you calculate. One wrong digit can change the result.
  • Look at a plot, such as a histogram or box plot, as well as the numbers.
  • Decide whether your data is a sample or a population.
  • Do not rely on the mean alone when data is skewed or has outliers.
  • Remember that more data usually gives more reliable estimates.
  • Be careful with small data sets. A set of 3 or 4 numbers cannot tell you much.
  • Report both a measure of the center (mean or median) and a measure of the spread (standard deviation or IQR).
  • Correlation is not causation.

Statistics Calculator vs. Other Tools

  • Standard Deviation Calculator: standard deviation and variance for a data set.
  • Mean, Median, Mode Calculator: the three averages.
  • Probability Calculator: the chance of events.
  • Percentage Calculator: percent change and basic percentage math.
  • Random Number Generator: picks random numbers.
  • Scientific Calculator: general math and functions.

Frequently Asked Questions (FAQ)

How do I calculate the mean?

Add up all the values and divide by the number of values. For 12, 15, 11, 18, 15, 20, 15, 13, the sum is 119 and the mean is 119 ÷ 8 = 14.875.

Sort the values and take the middle one. If there are two middle values, take their average. The median of the data above is 15.

Find the value that appears most often. In the data above, 15 appears three times.

Find the mean, subtract it from each value, square the differences, add them up, divide by n (population) or n − 1 (sample), and take the square root. For the data above, the sample standard deviation is 2.997.

Population standard deviation divides by n and is used when you have every member of the group. Sample standard deviation divides by n − 1 and is used when your data is a sample of a larger group.

The average of the squared differences from the mean. It is the square of the standard deviation.

Calculate Q1 and Q3, find the IQR (Q3 − Q1), and flag values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.

How many standard deviations a value is from the mean: z = (x − mean) ÷ standard deviation.

A range that is likely to contain the true value of the mean. A 95% confidence interval for the data above is about 12.37 to 17.38.

A number from −1 to 1 that shows how closely two variables move together in a straight line. It does not show that one causes the other.

 If data is skewed or has outliers, the mean is pulled toward the extreme values, and the median is not.

Yes. It is free, with no registration and no limits.

It uses standard formulas and the numbers you enter. Quartiles may differ slightly from other programs because there are several accepted methods.

Disclaimer

This calculator is for general informational and educational purposes only. Results depend on the numbers you enter and the assumptions behind each method. For research, medical, financial, or other important decisions, consult a qualified statistician or professional.