Enter the numbers you want to average, separated by commas (,). Along with the average (arithmetic mean), the sum, count, median, geometric mean, maximum, minimum and range are calculated too.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formula
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter numbers separated by commas (,) and you get the average (arithmetic mean) \(\bar{x}\) on the spot
- Questions like "What is the average of the test scores 82, 76, 90, 65, 88?" are answered in one step
- The sum, count, median, geometric mean, maximum, minimum and range are calculated at the same time
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
If your scores on five tests are 82, 76, 90, 65 and 88, your average is \((82+76+90+65+88) \div 5 = 401 \div 5 = 80.2\) points.
Tracking your average over the semester or comparing it with the class average, the mean is the most familiar way to sum up your grades in one number.
If your electric bills for three months are $84, $72 and $99, the monthly average is \(255 \div 3 = 85\) dollars.
Spending that changes from month to month becomes a budget number, "about this much every month", once you take the average. The "monthly average" in budgeting apps is this same calculation.
Suppose five households have savings of $10,000, $20,000, $30,000, $40,000 and $400,000. The mean is $100,000, but the median is only $30,000.
A few large values pull the mean up, so for lopsided data such as savings or income, the mean and the median are often far apart. When a news report says "the average is X dollars", checking the median too helps you compare it with real life.
When a forecast says a day is "warmer than normal", the "normal" is based on the average of 30 years of observations (in the US, NOAA updates these Climate Normals every 10 years).
The very standard for judging whether today's temperature is ordinary is a long-term average. It is an everyday use of the mean that society relies on.
If sales grew to 1.21 times in 2 years, the growth per year is found not by adding and dividing but with the geometric mean, \(\sqrt{1.21} = 1.1\) (1.1 times per year, or 10% growth per year).
For amounts that build up by multiplication, such as investment returns and sales growth, use the geometric mean. This is standard practice in business.
Formula
Symbols and terms
Symbols
| \(x_1, x_2, \ldots, x_n\) | x sub 1, x sub 2, …, x sub n | The individual values you want to average. (Example - the test scores of 5 students) |
| \(n\) | n | The number of values. (Example - for 5 students, \(n = 5\)) |
| \(\bar{x}\) | x-bar | The mean (arithmetic mean). A bar over the letter is the standard way to write a mean in statistics. |
| \(\tilde{x}\) | x-tilde | The median. Textbooks often just write the word "median" instead of a symbol, and some write it as M or Med. |
| \(x_{(k)}\) | x sub k in parentheses | The \(k\)th value when the data is sorted from smallest to largest. (Example - \(x_{(1)}\) is the minimum) |
| \(G\) | G | The geometric mean, from the first letter of "geometric". |
| \(R\) | R | The range, the maximum minus the minimum. It comes from the first letter of "range". |
Terms
| arithmetic mean | The ordinary "average". Add up all the data and divide by the number of values. When people just say "average" or "mean", this is usually what they mean. |
| measure of center | A single number that sums up where the data is centered. The three main ones are the mean, the median and the mode. In US schools they are usually taught in Grade 6. |
| median | The value exactly in the middle when the data is sorted from smallest to largest. With an even number of values, take the mean of the two middle values. It is a measure of center that outliers hardly affect. |
| mode | The value that appears most often in the data. It is one of the measures of center, along with the mean and the median (the calculator on this page does not cover it). |
| geometric mean | The average found by multiplying all the data together and taking the \(n\)th root. It is used to average amounts that build up by multiplication, such as growth rates and ratios. It is only defined when all the numbers are greater than 0. |
| range | The maximum minus the minimum. It is the quickest measure of how spread out the data is. |
| outlier | A value that is extremely far from the other values. The mean is pulled strongly by outliers, but the median is hardly affected. |
| weighted average | An average where each value gets its own "weight". It is used, for example, when a grade counts the midterm exam as 40% and the final exam as 60% (the calculator on this page gives all values the same weight). |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
| Addition and division (Grades 3–4) |
|
| The mean (Grade 6) |
|
| Division with decimal answers (Grade 5) |
|
| Statistics and measures of center (Grade 6) |
|
| Square roots (Grade 8) [for the geometric mean] |
|
How to calculate it in Excel
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Sum | =SUM(B1:B7) |
| Count | =COUNT(B1:B7) |
| Average (arithmetic mean) | =AVERAGE(B1:B7) |
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Median | =MEDIAN(B1:B7) |
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Geometric mean | =GEOMEAN(B1:B7) |
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Maximum | =MAX(B1:B7) |
| Minimum | =MIN(B1:B7) |
| Range (max − min) | =B8-B9 |
In the first table, B8 shows the sum 155, B9 shows the count 7, and B10 shows the average, about 22.14.
To use a different number of values, add (or remove) rows of numbers, then change "B1:B7" in the formulas to your actual data range (for 10 values, B1:B10).
The geometric mean (GEOMEAN) gives an error if the data includes a number that is 0 or less.
How to calculate it in Google Sheets
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Sum | =SUM(B1:B7) |
| Count | =COUNT(B1:B7) |
| Average (arithmetic mean) | =AVERAGE(B1:B7) |
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Median | =MEDIAN(B1:B7) |
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Geometric mean | =GEOMEAN(B1:B7) |
| Value 1 | 10 |
| Value 2 | 2 |
| Value 3 | 38 |
| Value 4 | 23 |
| Value 5 | 38 |
| Value 6 | 23 |
| Value 7 | 21 |
| Maximum | =MAX(B1:B7) |
| Minimum | =MIN(B1:B7) |
| Range (max − min) | =B8-B9 |
How to calculate it in Python
import statistics
numbers = [10, 2, 38, 23, 38, 23, 21] # the numbers to average
average = statistics.mean(numbers) # average (arithmetic mean)
median = statistics.median(numbers) # median
geometric_mean = statistics.geometric_mean(numbers) # geometric mean (only when all numbers are positive)
largest = max(numbers) # maximum
smallest = min(numbers) # minimum
value_range = largest - smallest # range
print(f"Average: {average}")
print(f"Sum: {sum(numbers)} / Count: {len(numbers)}")
print(f"Median: {median}")
print(f"Geometric mean: {geometric_mean}")
print(f"Maximum: {largest} / Minimum: {smallest} / Range: {value_range}")
How to write it in LaTeX and other math languages (copy and paste)
x̄ = (x₁ + x₂ + ⋯ + xₙ) ÷ n
\bar{x} = \frac{x_1 + x_2 + \cdots + x_n}{n}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mover accent="true"><mi>x</mi><mo>¯</mo></mover>
<mo>=</mo>
<mfrac>
<mrow>
<msub><mi>x</mi><mn>1</mn></msub>
<mo>+</mo>
<msub><mi>x</mi><mn>2</mn></msub>
<mo>+</mo>
<mo>⋯</mo>
<mo>+</mo>
<msub><mi>x</mi><mi>n</mi></msub>
</mrow>
<mi>n</mi>
</mfrac>
</mrow>
</math>
bar x = (x_1 + x_2 + cdots + x_n) / n
Mean[{x1, x2, x3}]
xbar := add(x[i], i = 1 .. n)/n;
xbar = mean(x);
x̄ = (x_1 + x_2 + ⋯ + x_n)/n
\tilde{x} = \begin{cases} x_{(\,(n+1)/2\,)} & (n:\ \mathrm{odd}) \\[6pt] \dfrac{x_{(n/2)} + x_{(n/2+1)}}{2} & (n:\ \mathrm{even}) \end{cases}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mover accent="true"><mi>x</mi><mo>~</mo></mover>
<mo>=</mo>
<mrow>
<mo>{</mo>
<mtable columnalign="center left">
<mtr>
<mtd><msub><mi>x</mi><mrow><mo>(</mo><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>/</mo><mn>2</mn><mo>)</mo></mrow></msub></mtd>
<mtd><mrow><mo>(</mo><mi>n</mi><mo>:</mo><mtext>odd</mtext><mo>)</mo></mrow></mtd>
</mtr>
<mtr>
<mtd><mfrac>
<mrow>
<msub><mi>x</mi><mrow><mo>(</mo><mi>n</mi><mo>/</mo><mn>2</mn><mo>)</mo></mrow></msub>
<mo>+</mo>
<msub><mi>x</mi><mrow><mo>(</mo><mi>n</mi><mo>/</mo><mn>2</mn><mo>+</mo><mn>1</mn><mo>)</mo></mrow></msub>
</mrow>
<mn>2</mn>
</mfrac></mtd>
<mtd><mrow><mo>(</mo><mi>n</mi><mo>:</mo><mtext>even</mtext><mo>)</mo></mrow></mtd>
</mtr>
</mtable>
</mrow>
</mrow>
</math>
tilde x = {(x_(((n+1)/2)), if n odd), ((x_(n/2) + x_(n/2+1))/2, if n even):}
Median[{x1, x2, x3}]
Statistics:-Median([x1, x2, x3]);
med = median(x);
x̃ = (x_(n/2) + x_(n/2+1))/2 (for an even number of values; for an odd number, x̃ = x_((n+1)/2))
G = (x₁ × x₂ × ⋯ × xₙ)^(1/n)
G = \left( x_1 x_2 \cdots x_n \right)^{1/n}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>G</mi>
<mo>=</mo>
<msup>
<mrow>
<mo>(</mo>
<msub><mi>x</mi><mn>1</mn></msub>
<msub><mi>x</mi><mn>2</mn></msub>
<mo>⋯</mo>
<msub><mi>x</mi><mi>n</mi></msub>
<mo>)</mo>
</mrow>
<mrow><mn>1</mn><mo>/</mo><mi>n</mi></mrow>
</msup>
</mrow>
</math>
G = (x_1 x_2 cdots x_n)^(1/n)
GeometricMean[{x1, x2, x3}]
G := (x1 * x2 * x3)^(1/3);
G = prod(x)^(1/numel(x));
G = (x_1 x_2 ⋯ x_n)^(1/n)
R = xₘₐₓ − xₘᵢₙ
R = x_{\max} - x_{\min}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>R</mi>
<mo>=</mo>
<msub><mi>x</mi><mi>max</mi></msub>
<mo>−</mo>
<msub><mi>x</mi><mi>min</mi></msub>
</mrow>
</math>
R = x_(max) - x_(min)
Max[{x1, x2, x3}] - Min[{x1, x2, x3}]
R := max(L) - min(L);
R = max(x) - min(x);
R = x_max − x_min
How to have ChatGPT do the calculation
You are a statistics calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). For the following data, find each of the values below. Data: 10, 2, 38, 23, 38, 23, 21 1. The average (arithmetic mean) 2. The sum and the count 3. The median 4. The geometric mean 5. The maximum, the minimum and the range (maximum − minimum) Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
