How to Use the Average Calculator
This calculator computes four types of averages across four tabs: arithmetic mean, weighted average, geometric mean, and harmonic mean. Enter values as comma-separated, space-separated, or newline-separated numbers and calculate.
Entering Data
Use the textarea in each tab to input your dataset. The calculator accepts three delimiter styles and automatically normalizes mixed input:
Comma-separated: 10, 20, 30, 40, 50
Space-separated: 10 20 30 40 50
Newline-separated: Enter each value on its own line
10
20
30
40
50
Mixed delimiters: 10, 20 30, 40, 50
In Weighted mode, enter values and weights as alternating pairs. Each pair can be on the same line separated by commas, or on separate lines:
80, 0.3
90, 0.5
70, 0.2
This is equivalent to: 80, 0.3, 90, 0.5, 70, 0.2
Precision and Notation Settings
Use the settings bar above the tabs to control how results display:
- Decimal places: Adjust from 0 to 16 decimal places (default is 8)
- Notation: Switch between auto, fixed, exponential, and engineering notation (default is auto)
Your decimal places and notation settings save to your browser automatically. When you return to this calculator, your last chosen format loads without needing to adjust it again.
Calculation Modes
Arithmetic — Simple Average
Enter a list of numbers to compute the arithmetic mean. This is the most common average: the sum of all values divided by the count. Negative numbers are allowed.
Formula: Mean = (x1 + x2 + ... + xn) / n
Example: 10, 20, 30, 40, 50
- Numbers: 10, 20, 30, 40, 50
- Arithmetic Mean: 30
Example with negatives: -5, 10, 15
- Numbers: -5, 10, 15
- Arithmetic Mean: 6.6666667
Weighted — Value-Weight Pairs
Enter alternating value-weight pairs to calculate a weighted average. Each value is multiplied by its corresponding weight, the products are summed, and the total is divided by the sum of all weights.
Formula: Weighted Average = Σ(value × weight) / Σ(weights)
Example: Course grades with credit weights
80, 0.3
90, 0.5
70, 0.2
- Weighted Average: 83
Example: Portfolio with investment amounts as weights
1200, 3
1500, 5
900, 2
- Weighted Average: 1,290
Geometric — Growth Rates and Ratios
Enter positive numbers to compute the geometric mean. This is the nth root of the product of n values. Use it for growth rates, investment returns, and any data that compounds multiplicatively.
Formula: GM = (x1 × x2 × ... × xn)^(1/n)
Example: Annual investment returns as growth factors
- Positive Numbers: 1.05, 1.10, 0.95, 1.08
- Geometric Mean: 1.0433556 (4.34% average annual return)
Example: Bacterial population samples
- Positive Numbers: 2, 4, 8
- Geometric Mean: 4
Harmonic — Rates and Speeds
Enter positive numbers to compute the harmonic mean. This is the count divided by the sum of reciprocals. Use it for rates and speeds where the same distance is traveled at different speeds.
Formula: HM = n / (1/x1 + 1/x2 + ... + 1/xn)
Example: Average speed for a round trip
- Positive Numbers: 60, 80
- Harmonic Mean: 68.571429
Example: Average fuel efficiency across vehicles
- Positive Numbers: 25, 30, 20
- Harmonic Mean: 24.324324
Common Use Cases
Calculating a Grade Point Average
Course grades and credit hours:
85, 3
90, 4
78, 3
92, 2
- Switch to Weighted
- Enter the grade-credit pairs
- Weighted Average: 86.083333
Finding Average Speed
You drive equal distances at 60 mph and 40 mph:
- Switch to Harmonic
- Enter 60, 40
- Harmonic Mean: 48
The total trip of 240 miles takes 5 hours (2 hours at 60 mph, 3 hours at 40 mph), confirming 48 mph is correct.
Measuring Investment Growth
Yearly portfolio returns: 8%, 12%, -3%, 15%, 6%
- Switch to Geometric
- Enter as growth factors: 1.08, 1.12, 0.97, 1.15, 1.06
- Geometric Mean: 1.0741958 (7.42% true annualized return)
Averaging Test Scores
Scores from 10 students: 78, 82, 85, 88, 90, 92, 95, 98, 100, 85
- Switch to Arithmetic
- Enter the scores
- Arithmetic Mean: 89.3
Comparing Mean Types
The same positive dataset produces different averages:
- Dataset: 10, 20, 30, 40, 50
- Arithmetic Mean: 30
- Geometric Mean: 26.051711
- Harmonic Mean: 21.89781
This illustrates the classic inequality: for positive numbers, harmonic mean ≤ geometric mean ≤ arithmetic mean.
Tips for Accurate Calculations
- Geometric and harmonic block negatives: Zero and negative values trigger a validation error in these two modes
- Weighted pairs alternate: Enter value, weight, value, weight. An odd token count drops the last unmatched value
- Weights need not sum to 1: The calculator divides by the total weight automatically
- Enter growth factors for geometric mean: Use 1.05 for 5% growth, 0.95 for a 5% decline, not 5 or -5
- At least one weight must be positive: All-zero weights would require division by zero
- Harmonic mean is for equal-distance scenarios: Use it for speeds over the same distance, not for distances over the same time
- HM ≤ GM ≤ AM for positive data: The harmonic mean is always the smallest and the arithmetic mean is always the largest
Troubleshooting
Data is required
This appears when the input field is left empty. Enter at least one number before calculating
Enter at least one valid number
The input contains no parseable numbers. Check for typos, stray characters, or empty input
Enter at least one valid positive number
In Geometric or Harmonic mode, all values must be greater than 0. Check for zeros or negative numbers
Enter at least one value-weight pair
In Weighted mode, enter at least one complete value-weight pair. An odd number of values means the last one is ignored
All weights must be greater than or equal to 0
In Weighted mode, negative weights are not valid. Use zero or positive values only
At least one weight must be greater than 0
In Weighted mode, if all weights are zero, the denominator is zero and the average is undefined
All values must be greater than 0
In Geometric or Harmonic mode, zero and negative values are mathematically undefined. Remove them or switch to Arithmetic mode