Mean Calculator
Find the arithmetic, geometric, and harmonic mean of a dataset. Enter your numbers below.
Enter the Details
Find the mean of a dataset by entering the numbers in the calculator below.
Number Set:
Separate numbers using a comma (,)
Result will appear here...
What the mean calculator does
Most people think of one average, the kind where you add everything up and divide. But there are three different means, and each one answers a different question. This calculator works out all three from your data: the arithmetic, the geometric, and the harmonic mean, with the sum, the count, and the sorted list alongside them.
The point is not to give you three numbers to pick from at random. Each mean is the right tool for a particular kind of data, and the section below sorts out which is which.
How to use it
- Enter your numbers. Type or paste them into the box, separated by commas, spaces, or new lines.
- Press Calculate for all three means and the figures behind them, or Reset to clear it.
The geometric and harmonic means only work for positive numbers, so if your data has a zero or a negative, those two will be marked as not defined while the arithmetic mean still shows.
The three means, and when to use each
The trick is to match the mean to how your numbers naturally combine.
The arithmetic mean is the everyday average, the one you already know. Use it when your values simply add up, like test scores, heights, or temperatures. It answers, if everything were equal, what would each one be.
The geometric mean is for things that multiply rather than add, like growth rates, ratios, and percentages. If an investment grows by different amounts each year, the geometric mean gives the steady yearly rate that lands you in the same place. This is the same idea as a compound annual growth rate.
The harmonic mean is for rates, especially when the same amount is covered at different speeds. Drive somewhere at 60 and back at 30, over the same distance, and your average speed is not 45. It is 40, the harmonic mean, because you spent longer at the slower speed. The harmonic mean leans toward the smaller values for exactly that reason.
How each mean is worked out
All three start from your set of numbers and combine them in a different way.
Arithmetic mean = sum of the values ÷ how many there are
Geometric mean = the n-th root of all the values multiplied together
Harmonic mean = how many there are ÷ the sum of their reciprocals
The calculator works the geometric mean out through logarithms rather than multiplying everything directly, which keeps the math stable even when you feed it large numbers. The answer is the same either way.
Why one is always larger than the next
For any set of positive numbers, the three means always line up in the same order: the arithmetic mean is the largest, the harmonic mean is the smallest, and the geometric mean sits in between.
Arithmetic ≥ Geometric ≥ Harmonic
They are only equal when every number in your set is identical. The more spread out your numbers are, the further apart the three means drift. That gap is a quiet signal in itself, and it is also why using the wrong mean on spread-out data can throw your answer off by a lot.
A worked example: four numbers, three means
Take the four numbers 1, 2, 4, 8.
- Arithmetic: (1 + 2 + 4 + 8) ÷ 4 = 15 ÷ 4 = 3.75
- Geometric: the 4th root of (1 × 2 × 4 × 8) = the 4th root of 64 = 2.83
- Harmonic: 4 ÷ (1 + 0.5 + 0.25 + 0.125) = 4 ÷ 1.875 = 2.13
There they are in order, 3.75, then 2.83, then 2.13, just as the rule promises. Same four numbers, three honest answers, each fit for a different kind of question.
Entering your data, and the rounding
You can separate your numbers with commas, spaces, or new lines, in any mix. The order does not matter to any of the three means. Results are shown to four decimal places with trailing zeros trimmed, which is plenty for almost any use.
One thing to keep in mind: the geometric and harmonic means are only defined for positive numbers. A zero would mean dividing by zero in the harmonic mean, and a negative breaks the logic of both, so the calculator marks them as not defined rather than print a misleading figure. The arithmetic mean works for any numbers.
Questions people ask
What is the difference between the three means?
The arithmetic mean adds your values, the geometric mean multiplies them, and the harmonic mean works with their reciprocals. Each suits a different kind of data: adding quantities, multiplying rates, and averaging speeds, in that order.
When should I use the geometric mean?
When your numbers represent growth, ratios, or percentages that compound, like yearly investment returns. It gives the constant rate that produces the same overall result.
When should I use the harmonic mean?
When you are averaging rates over the same amount of something, the classic case being speeds over equal distances. It correctly weights the time you spend at each rate.
Why does it say the mean is not defined?
The geometric and harmonic means only work for positive numbers. If your data includes a zero or a negative value, those two means cannot be calculated, so they are marked as not defined.
Which mean is the biggest?
For positive numbers, the arithmetic mean is always the largest and the harmonic the smallest, with the geometric mean between them. They are equal only when all the numbers are the same.
References
A quick note on where the methods here come from. The definitions of the mean and the other measures of central tendency are set out in the NIST/SEMATECH e-Handbook of Statistical Methods, the US government's public statistics reference. OpenStax Introductory Statistics is a free, widely used textbook that covers the same ground, including where the geometric and harmonic means are the right choice.
- NIST/SEMATECH e-Handbook of Statistical Methods (measures of location). https://www.itl.nist.gov/div898/handbook/
- OpenStax, Introductory Statistics (measures of the center of the data). https://openstax.org/details/books/introductory-statistics-2e
Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.
Other Tools
- 5 Number Summary Calculator
- Arithmetic Mean Calculator
- Box Plot Calculator
- Class Width Calculator
- Decile Calculator
- Frequency Distribution Calculator
- Geometric Mean Calculator
- Harmonic Mean Calculator
- Mean Median Mode Calculator
- Median Calculator
- Midrange Calculator
- Mode Calculator
- Outlier Calculator
- Percentile Calculator
- Percentile Rank Calculator
- Quartile Calculator
- Quartile Deviation Calculator
- Range Calculator
- Sample Mean Calculator
- Skewness Calculator
- Stem And Leaf Plot Calculator