Average Calculator
Calculate mean, median, mode, range, and more for any number set. Includes weighted average mode and a visual distribution of your data.
Enter a set of numbers and this calculator computes the mean, median, mode, range, minimum, maximum, sum, and count. It supports weighted averages and shows a visual distribution chart. Use it for homework, data analysis, survey results, or any time you need quick summary statistics.
About Average Calculator
How Mean, Median, and Mode Work
These three measures describe where the "centre" of a data set is, but they do it differently:
Mean (arithmetic average) is the most common. Add all values and divide by the count:
Mean = (x1 + x2 + ... + xn) / n
Example: Data: 4, 8, 6, 5, 7. Mean = (4 + 8 + 6 + 5 + 7) / 5 = 30 / 5 = 6.0
Median is the middle value when data is sorted. If the count is even, take the average of the two middle values:
Example (odd count): Sorted: 4, 5, 6, 7, 8. Median = 6 (the third value).
Example (even count): Sorted: 3, 5, 7, 9. Median = (5 + 7) / 2 = 6.
Mode is the value that appears most often. A data set can have no mode (all values unique), one mode, or multiple modes (bimodal, multimodal).
Example: Data: 2, 4, 4, 6, 8. Mode = 4 (appears twice).
When to Use Which Average
Choosing the wrong average can be misleading. Here is a practical guide:
| Measure | Best For | Watch Out For |
|---|---|---|
| Mean | Symmetric data without extreme outliers | Pulled heavily by outliers (one millionaire in a room changes the mean income dramatically) |
| Median | Skewed data or data with outliers | Ignores the actual values of extremes - only cares about position |
| Mode | Categorical data, finding the most popular choice | Can be meaningless for continuous data where every value is unique |
Classic example: Ten people in a bar earn $50,000 each. The mean, median, and mode are all $50,000. Then someone earning $10,000,000 walks in. Now the mean jumps to $954,545, but the median stays at $50,000. The median better represents the "typical" person in the room.
This is why statistics like household income and house prices are almost always reported as medians, not means.
How Weighted Average Works
A weighted average gives some values more influence than others. The formula:
Weighted Mean = (w1 x v1 + w2 x v2 + ... + wn x vn) / (w1 + w2 + ... + wn)
Example - university grades:
| Module | Grade | Credits (Weight) |
|---|---|---|
| Maths | 85 | 30 |
| English | 72 | 20 |
| History | 90 | 10 |
Weighted average = (85 x 30 + 72 x 20 + 90 x 10) / (30 + 20 + 10) = (2550 + 1440 + 900) / 60 = 4890 / 60 = 81.5
The unweighted mean would be (85 + 72 + 90) / 3 = 82.3. The weighted average is slightly lower because the lower-scoring English module has a higher weight than History.
Other common uses for weighted averages:
- Investment returns: Weight by portfolio allocation to get overall return
- Customer satisfaction: Weight by number of responses per category
- Sports rankings: Weight recent performance more heavily than older results
- Manufacturing: Weight measurements by batch size for quality control
Range, Minimum, and Maximum
The range is the simplest measure of spread: max minus min. It tells you how far apart the extremes are but says nothing about the distribution in between.
Example: Data: 12, 45, 23, 67, 34. Min = 12, Max = 67, Range = 67 - 12 = 55.
Range is useful for quick checks but sensitive to outliers. A single extreme value can make the range enormous even if most data points are tightly clustered. For a more robust measure of spread, the standard deviation calculator is a better choice.
Real-World Uses for Averages
- Education: Grade averages, class performance comparison, test score analysis. The GPA calculator handles weighted grade point averages for students.
- Business: Average order value, customer lifetime value, average response time. These metrics drive decisions about pricing, staffing, and service levels.
- Science: Averaging repeated measurements to reduce random error. The mean of 10 measurements is more reliable than any single one.
- Sport: Batting averages in cricket and baseball, points per game, average lap times.
- Daily life: Average monthly spending, average commute time, average sleep hours.
Common Mistakes with Averages
- Averaging averages: If Class A (20 students) averages 80% and Class B (5 students) averages 90%, the overall average is NOT (80 + 90) / 2 = 85%. It is (20 x 80 + 5 x 90) / 25 = 82%. You need a weighted average.
- Averaging percentages from different bases: If you shot 50% (1/2) on Monday and 75% (3/4) on Tuesday, your overall is 4/6 = 66.7%, not (50 + 75) / 2 = 62.5%.
- Using mean for skewed data: Reporting "average salary" as the mean hides the fact that a few high earners pull it up. Always check whether mean or median is more appropriate.
- Ignoring sample size: A 5-star rating from 3 reviews means much less than 4.5 stars from 10,000 reviews.
Other Types of Averages
Beyond arithmetic mean, there are specialized averages for specific situations:
| Type | Formula | Used For |
|---|---|---|
| Arithmetic mean | Sum / count | General purpose, most common |
| Geometric mean | nth root of product | Growth rates, investment returns over time |
| Harmonic mean | n / sum of reciprocals | Rates and ratios (average speed on a round trip) |
| Trimmed mean | Mean after removing extremes | Olympic judging, robust estimation |
Harmonic mean example: If you drive 60 mph going and 40 mph returning over the same distance, the average speed is NOT (60 + 40) / 2 = 50 mph. The harmonic mean gives the correct answer: 2 / (1/60 + 1/40) = 48 mph.
Geometric Mean: Why It Matters for Investment Returns
The arithmetic mean gives the wrong answer when averaging rates of change. This is one of the most common errors in finance and it can be very misleading.
Worked example: You invest £10,000. Year one: +50%. Year two: -50%.
- Arithmetic mean return: (50% + (-50%)) / 2 = 0%. Looks like you broke even.
- Actual result: £10,000 x 1.50 = £15,000 after year one. £15,000 x 0.50 = £7,500 after year two.
- You lost £2,500 (a 25% loss), not 0%.
The geometric mean gives the correct answer: (1.50 x 0.50)^(1/2) - 1 = (0.75)^0.5 - 1 = -13.4% per year. That accurately reflects the annualised return. Whenever you see "average annual return" for an investment fund, check whether it is the arithmetic mean (flattering) or the geometric mean/CAGR (accurate). Most fund marketing uses arithmetic mean because it is a higher number.
The formula is: Geometric Mean = (x1 x x2 x ... x xn)^(1/n). It only works with positive numbers, so for returns, convert percentages to multipliers first (e.g., +20% becomes 1.20, -15% becomes 0.85).
Trimmed Mean: How Olympic Judging Works
A trimmed mean removes a fixed percentage of the highest and lowest values before calculating the arithmetic mean. This makes it resistant to outliers and biased judges.
In Olympic sports like diving and gymnastics, the scoring system drops the highest and lowest judge scores (or the highest two and lowest two, depending on the number of judges), then averages the remaining scores. This is a trimmed mean in action. If seven judges score a dive as 8.5, 9.0, 9.0, 9.5, 9.0, 7.0, 9.0, dropping the 7.0 and 9.5 gives a trimmed mean of (8.5 + 9.0 + 9.0 + 9.0 + 9.0) / 5 = 8.9. Without trimming, the mean would be 8.71 because the 7.0 outlier drags it down.
The US Bureau of Labor Statistics uses a 16% trimmed mean to calculate a core inflation measure (the Dallas Fed Trimmed Mean PCE). By removing the most volatile price changes each month, it gives a cleaner signal of underlying inflation trends than the standard CPI.
When Median Beats Mean: Real-World Examples
Some data sets are so skewed that the mean gives a genuinely misleading picture. Two major examples:
House prices: The UK Office for National Statistics (ONS) reports house prices using the median. The 2024 median house price in England was £290,000, per the ONS Housing affordability bulletin. The mean was substantially higher because a relatively small number of multi-million pound London properties pulls the average up. The median better represents what a typical buyer actually pays.
Salaries: The US Census Bureau reports household income as a median for the same reason. The median US household income in 2023 was about $80,610, while the mean was over $114,000. The mean is inflated by high earners. If someone quotes "average salary" without specifying mean or median, be sceptical. In salary negotiations, the median for your role in your area is the more useful benchmark.
Moving Averages in Finance
A moving average smooths out short-term fluctuations to reveal a trend. Two types dominate financial analysis:
| Type | How It Works | Common Periods | Used For |
|---|---|---|---|
| Simple Moving Average (SMA) | Straight arithmetic mean of the last N data points | 50-day, 200-day | Identifying long-term trend direction |
| Exponential Moving Average (EMA) | Gives more weight to recent data points | 12-day, 26-day | Faster trend detection, MACD indicator |
The 50-day and 200-day SMAs are the most watched indicators on stock charts. When the 50-day SMA crosses above the 200-day SMA, traders call it a "golden cross" (bullish signal). When it crosses below, it is a "death cross" (bearish signal). The S&P 500 historically performs better when trading above its 200-day SMA than below it.
Moving averages are just averages applied to a sliding window of time. A 50-day SMA on April 14 is the arithmetic mean of closing prices from the last 50 trading days. Tomorrow, the oldest day drops off and today's price gets added. The concept is the same as a simple average; the window just keeps moving forward.
For spread analysis, the standard deviation calculator computes variance and standard deviation. For percentage-based calculations, try the percentage calculator. To see how compound growth rates (geometric means) work in an investment context, the CAGR calculator handles multi-year return analysis.
All calculations run in your browser. No data is stored or sent to any server.
Sources
Frequently Asked Questions
What is the difference between mean, median, and mode?
Mean is the arithmetic average - add all numbers and divide by the count. Median is the middle value when numbers are sorted in order; if there is an even count, it is the average of the two middle values. Mode is the value that appears most frequently. A data set can have no mode, one mode, or multiple modes.
When should I use median instead of mean?
Median is more appropriate when your data contains outliers or is heavily skewed. For example, if most household incomes are around $50,000 but one is $10,000,000, the mean would be pulled far upward while the median stays near the typical value. Median gives a better sense of the central value in such cases.
What is a weighted average and when is it useful?
A weighted average assigns different importance (weights) to each value. For example, if a final exam is worth 50% of your grade and homework is worth 50%, you would weight the exam score by 0.5 and the homework score by 0.5. This is common in academic grading, financial portfolio returns, and survey analysis.
Can a data set have more than one mode?
Yes. If two values tie for the highest frequency, the data set is bimodal. If three or more values tie, it is multimodal. If every value appears the same number of times, there is no mode. This calculator reports all modes when multiple exist.
How does this calculator handle decimal numbers?
The calculator fully supports decimal numbers. Enter values like 3.14 or 0.5 and the results will reflect full decimal precision. All results are rounded to a reasonable number of decimal places for readability.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/average-calculator/" title="Average Calculator - Free Online Tool">Try Average Calculator on ToolboxKit.io</a>