Toolstia / Average calculator

Calculate the average of numbers

An average is a single number meant to describe a list, but there are several kinds and they can disagree sharply. This tool takes a list you paste or type and reports the count, sum, mean, median, mode, smallest, largest and range, plus the standard deviation and variance in both the population and sample versions.

Numbers can be separated by spaces, commas, semicolons or new lines, so you can paste a column from a spreadsheet or a line of results from an email. The results update as you type. Anything that is not a valid number is skipped and listed in a warning, so you know if a typo changed the count.

Use it for checking homework, summarizing survey scores, comparing prices or timings, or seeing whether one odd value is distorting an average. It treats each number equally and does not do weighted averages.

Enter some numbers to see the average and other statistics.

How it works

  1. Enter your numbers.
  2. Read the results as you type.
  3. Check any skipped entries.

Mean, median and mode

The mean adds up the numbers and divides by how many there are. The median is the middle value when sorted, and is less affected by one very large or small number. The mode is the value that appears most often.

Standard deviation

It shows how spread out the numbers are. Use the population version when your list is everything you care about, and the sample version when the list is only a part of a larger group.

No repeated value

If every number appears once there is no mode, and the tool says so instead of guessing. If several numbers tie, all of them are listed.

Bad entries

Anything that is not a number is skipped and listed above the results, so a typo does not silently change your answer.

Worked example: 12, 15, 9, 20, 15

Enter those five numbers. The count is 5 and the sum is 71, so the mean is 71 / 5 = 14.2. Sorted, the list is 9, 12, 15, 15, 20, so the median is the middle value, 15. The mode is 15, because it appears twice. The smallest is 9, the largest 20 and the range 11.

The population standard deviation is 3.655133 and the sample version is 4.086563. The sample figure is larger because it divides by n - 1 instead of n.

When the mean and median disagree

Try the list 40, 42, 45, 38, 41, 300. The mean is 84.33, a number that is higher than five of the six entries. The median is 41.5, which describes the typical value much better. There is no mode, because no value repeats.

A large gap between mean and median is a warning that the list is skewed or has an outlier. Salaries, house prices and page-load times often behave this way. Report both, or investigate the extreme value.

Population or sample standard deviation

For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the population standard deviation is exactly 2. The sample standard deviation is 2.13809 (the sample variance is 4.571429 against 4 for the population).

Choose population when your list is the entire group, such as every student in one class. Choose sample when the list is a subset used to estimate a larger group, such as 30 customers out of thousands. With one number the sample versions cannot be calculated and show a message.

Median with an even count and ties in the mode

With an even number of values the median is the mean of the two middle values: for 2, 4, 4, 4, 5, 5, 7, 9 the middle pair is 4 and 5, giving 4.5. That value does not need to be in the list.

If two values tie for most frequent, all are listed, separated by commas. If every value appears once, the tool says there is no repeated value and does not invent a mode.

Typing numbers correctly

Commas, spaces, semicolons and new lines all separate numbers. That means a thousands separator splits a number: typing 1,200 gives two numbers, 1 and 200. Enter 1200 without the comma.

Decimals such as 3.5, negative numbers and scientific notation like 2e3 are accepted. Words, percent signs and currency symbols are not, so remove them first. Results are rounded to six decimal places with trailing zeros removed.

Questions

Can I use decimals and negatives?

Yes, for example 3.5 and -2.

How are results rounded?

To 6 decimal places, with trailing zeros removed.

Is a weighted average supported?

No, this tool treats every number equally.

Is anything uploaded?

No. Your numbers stays in your browser and is never sent anywhere.

Why does my list of prices give strange results?

Check for thousands separators. Commas split numbers, so 1,250 becomes 1 and 250. Remove the commas and try again.

What is the difference between average and mean?

In everyday use they mean the same thing, the sum divided by the count. Median and mode are other kinds of average.

How do I find an average of percentages?

Enter the percentages as plain numbers. Be careful: if the groups differ in size, a simple average of percentages can mislead, and a weighted average is needed.

Is there a limit on how many numbers I can enter?

There is no built-in limit, but very long lists depend on your browser's speed.

Why is the sample standard deviation blank for one number?

It divides by n - 1, which would be zero. At least two numbers are needed.