# What is the average?

Computes the average (arithmetic mean) of a list of numbers, with the sum, the count, the median, and the geometric and harmonic means.

- Page: https://www.acalculator.org/statistics/average-calculator
- JSON spec: https://www.acalculator.org/statistics/average-calculator.json
- Version: d4e1659fef44

## Default answer

Example with the default inputs (Your numbers [85, 90, 78, 92, 88]): The average of 85, 90, 78, 92, 88 is 86.6.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| data | Your numbers | The numbers to average, separated by commas, spaces, semicolons, or new lines. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| mean | Average (mean) | The arithmetic mean: the sum of the numbers divided by how many there are. |
| sum | Sum | All the numbers added up. |
| count | Count | How many numbers are in the list. |
| median | Median | The middle number once the list is sorted, or the mean of the two middle numbers. |
| geometric | Geometric mean | The n-th root of the product of the n numbers. Shown only when every number is above 0. |
| harmonic | Harmonic mean | The count divided by the sum of the reciprocals. Shown only when every number is above 0. |

## Method

mean = (x₁ + x₂ + … + xₙ) ÷ n

## Assumptions

- Every number in the list counts once. To give some numbers more weight, use the weighted average calculator.
- The median sorts the list and takes the middle number, or the mean of the two middle numbers when the count is even.
- The geometric and harmonic means are shown only when every number is above 0.

## Worked examples

1. data = 85 or 90 gives mean = 86.6, sum = 433, count = 5, median = 88, geometric = 86.458024, harmonic = 86.311763. Source: hand calculation in content.mdx: 433 ÷ 5 = 86.6, median 88; geometric and harmonic means from the Python statistics module (geometric_mean, harmonic_mean).
2. data = 10,000,001 or 10,000,003 gives mean = 10,000,002, sum = 30,000,006, median = 10,000,002. Source: NIST StRD univariate dataset NumAcc1: certified sample mean 10000002 (exact).
3. data = 2.0018 or 2.0017 gives mean = 2.001856, count = 50. Source: NIST StRD univariate dataset Mavro: certified sample mean 2.00185600000000.
4. data = 2 or 8 gives mean = 5, geometric = 4, harmonic = 3.2. Source: hand calculation in content.mdx: (2 + 8) ÷ 2 = 5; √(2 × 8) = 4; 2 ÷ (1/2 + 1/8) = 3.2.
5. data = -4 or 0 gives mean = 1, median = 0, sum = 3. Source: hand calculation in content.mdx: (−4 + 0 + 7) ÷ 3 = 1.

## FAQ

### How do I calculate the average of a set of numbers?

Add the numbers up, then divide by how many numbers there are. For 85, 90, 78, 92, and 88, the sum is 433 and there are 5 numbers, so the average is 433 ÷ 5 = 86.6.

### Is the average the same as the mean?

In everyday use, yes. "Average" usually means the arithmetic mean: the sum divided by the count. Statisticians also call the median and the mode averages, because each one describes the middle of the data in a different way.

### When should I use the median instead of the mean?

Use the median when a few very large or very small values would pull the mean away from a typical value, such as house prices or incomes. The mean of 1, 2, 3, 4, and 100 is 22, but the median is 3.

### What are the geometric and harmonic means for?

The geometric mean averages growth rates and ratios: two years of 10% and 50% growth multiply by 1.1 and 1.5, and their geometric mean, about 1.2845, is the steady yearly factor that gives the same total. The harmonic mean averages rates over the same amount of work, such as the average speed for two equal distances driven at 40 and 60 mph, which is 48 mph, not 50.

### Why are the geometric and harmonic means missing for my list?

Both need every number to be above 0. A zero makes the product 0 and a reciprocal undefined, and a negative number has no real logarithm, so the calculator leaves them out.

### Can the average be a number that is not in my list?

Yes. The mean of 1 and 2 is 1.5, and the mean of whole numbers is often a decimal. The average only has to lie between the smallest and the largest number.

### How do I give some numbers more weight than others?

Use a weighted average: multiply each number by its weight, add the products, and divide by the sum of the weights. The weighted average calculator does this for you.

## Sources

- NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.1, Measures of Location (mean and median). https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm
- NIST Dataplot Reference Manual, Geometric Mean. https://itl.nist.gov/div898/software/dataplot/refman2/auxillar/geommean.htm
- NIST Dataplot Reference Manual, Harmonic Mean. https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/harmmean.htm
- NIST Statistical Reference Datasets, univariate summary statistics: NumAcc1 and Mavro, certified values. https://www.itl.nist.gov/div898/strd/univ/homepage.html
