Mean Calculator
Paste numbers or a frequency table into the mean calculator to compare averages and see the calculation.
Choose a format, enter your numbers, then calculate.
Separate values with spaces, line breaks or semicolons. Commas separate values only in Dot mode.
Enter data to see your result.
Your data, made visible
Paste a list, a frequency table or class intervals. The map will reveal repetition, spread and the position of the average.
Distribution summary
Values and frequencies
Mean and median on the value scaleBar height represents frequency. The orange line marks the mean; the dashed line marks the median. The shaded band spans Q1 to Q3. For more than 200 distinct values, marks are sampled; calculations still use every value.
Compare the mean with the median, or check the frequency-table example.
More statistics
Check the arithmetic
| Value or class | Calculation value | Frequency | Value × frequency | Cumulative count |
|---|
Frequency profile
Sorted values and outliers
Local history
Calculations stay in your browser. Calculate saves up to five complete inputs in this browser; live previews are not saved. Clear history on shared devices.
Ctrl/⌘ + Enter: calculate. Escape: reset. Ctrl/⌘ + Shift + C: copy. Ctrl/⌘ + Shift + S: CSV.
Mean calculator for numbers and frequency tables
I start with the shape of the input, because a correct formula applied to the wrong rows produces a convincing wrong answer. Choose Raw values when every number is one observation. Choose Frequency when each row pairs a value with the number of times it occurred. Choose Class intervals when the original observations have been replaced by ranges. These formats look similar on paper, but they do not preserve the same information. The calculator labels interval results as midpoint estimates so you can carry that distinction into your report.
In dot mode you can separate raw values with commas, semicolons, spaces or line breaks. If your numbers use decimal commas, select Comma and separate observations with semicolons or spaces. A frequency row needs two columns, value and count; an interval row needs lower bound, upper bound and count. Put each table row on its own line. Frequencies must be nonnegative integers, so a count of 2.5 is rejected rather than quietly rounded. Rows with a zero count contribute no observations.
Check the total and the count
The arithmetic mean is the total divided by the number of observations. For frequency data the total is Σfx, not the sum of the distinct row values. With values 12, 15 and 18 occurring 2, 3 and 1 times, the contributions are 24, 45 and 18. Their total is 87 and the count is 6, giving 87 / 6 = 14.5. Averaging the three row labels instead gives 15, which answers a different question. I check the count first whenever a copied table seems to produce an unexpected result.
Below the result you can inspect every multiplication in the audit table and follow the cumulative count. Duplicate exact-value rows are combined for the distribution profile, while the audit retains the entered rows. The screen previews up to 100 rows; the CSV includes all of them. That separation keeps a large table usable on a phone without quietly dropping data from the calculation. Frequency counts can represent up to 1,000,000 observations without expanding them into a million-entry list.
| Value x | Frequency f | Contribution fx | Cumulative count |
|---|---|---|---|
| 12 | 2 | 24 | 2 |
| 15 | 3 | 45 | 5 |
| 18 | 1 | 18 | 6 |
| Total | 6 | 87 | 6 |
Arithmetic, geometric or harmonic mean?
An arithmetic mean preserves an additive total. A geometric mean preserves a product, making it useful for positive multiplication factors. A harmonic mean preserves a sum of reciprocals, which appears when you average rates over equal quantities such as equal travel distances. These are choices about the question, not competing versions of the same answer. The tool displays the three means together for strictly positive inputs. If any observation is zero or negative, the geometric and harmonic cards say Not applicable under this calculator’s positive-only convention.
For 2, 4 and 8, the arithmetic mean is 14 / 3 ≈ 4.666667, the geometric mean is the cube root of 64 = 4, and the harmonic mean is 3 / (1/2 + 1/4 + 1/8) = 24 / 7 ≈ 3.428571. Their ordering is a useful check: for positive data, harmonic ≤ geometric ≤ arithmetic. Equal positive observations make all three equal. Do not enter percentage changes directly as growth factors; a gain of 10% is a factor of 1.10, and a loss of 10% is 0.90.
| Mean | Preserves | A suitable input |
|---|---|---|
| Arithmetic | Sum | Measurement values with their counts |
| Geometric | Product | Strictly positive growth factors |
| Harmonic | Sum of reciprocals | Positive rates over equal distances |
Calculate a mean from class intervals
For a class from 10 to 20, the calculation value is the midpoint 15. The tool multiplies each midpoint by its frequency and divides the estimated total by the overall count. In the example 10–20 with count 2, 20–30 with count 3 and 30–40 with count 1, the midpoint contributions are 30, 75 and 35. The estimate is 140 / 6 ≈ 23.333333. The original measurements might cluster near either edge; a midpoint cannot recover their positions.
Classes are lower-inclusive and upper-exclusive: 10 ≤ x < 20. Touching classes are accepted, gaps are accepted, and overlaps are rejected. The tool also gives a possible raw-mean bound: the weighted lower endpoints give 110 / 6 ≈ 18.333333, and the weighted upper endpoints give 170 / 6 ≈ 28.333333. This is a bound from the entered ranges, not a confidence interval or an error bar from sampling. Median, quartiles, dispersion and the other means in interval mode describe repeated midpoints, not interpolated estimates of the original observations.
Compare the mean and median on the graph
The chart positions values on a linear scale, uses bar height to represent frequency and marks the arithmetic mean and median separately. The shaded Q1–Q3 band spans the central half under the stated quartile convention. A distant value with a small count can still pull the mean away from the median. I look at that disagreement before describing a distribution as typical. The companion frequency profile is a count chart; for unequal class widths it is not a frequency-density histogram.
Quartiles are the medians of the lower and upper halves, excluding an odd central observation. For 1, 2, 3, 4 and 5, this gives Q1 = 1.5 and Q3 = 4.5. Other software can use different quantile definitions. The tool flags values outside Q1 − 1.5 × IQR and Q3 + 1.5 × IQR but retains them in every calculation. A flag asks you to inspect the measurement; it is not permission to discard it. Sample standard deviation uses n − 1 and is unavailable for a single observation.
Calculation checks and examples
I keep input errors visible. Text such as 12kg is rejected as a whole token; it never becomes 12 by partial parsing. The limits are 100,000 input characters, 10,000 raw entries or 1,000 table rows, and 1,000,000 represented observations. Nonzero magnitudes must lie between 1e-100 and 1e100. The implementation uses JavaScript floating-point arithmetic, compensated sums and logarithms for the geometric mean. Variance corrects for rounding of the mean, so a large baseline does not inflate a small spread. Results are rounded for display to at most six fractional digits, with scientific notation for very small or large values; the CSV uses numerical values rather than localized display strings.
Independent control cases cover exact-value weighting, interval bounds, distinct and repeated values, zeros, negatives, decimal commas and large counts. Reset clears the displayed result and pending live preview. Editing an input invalidates an old result immediately so it cannot be exported as if it belonged to the new data. Small samples still deserve interpretation beyond a correct calculation: neither a precise mean nor a standard deviation proves that your measurements represent a wider population.
| Input | Expected answer |
|---|---|
| 2; 4; 8 | Arithmetic 14/3; geometric 4; harmonic 24/7 |
| 12 2 / 15 3 / 18 1 | Count 6; total 87; mean 14.5 |
| 10 20 2 / 20 30 3 / 30 40 1 | Mean estimate 70/3; bounds 55/3 ≤ mean < 85/3 |
| 9 1000000 | Count 1,000,000; mean 9 |
| 0; −4; 4 | Arithmetic mean 0; positive-only means unavailable |
Save inputs and export results
Calculate saves up to five complete inputs in local browser history; automatic live previews do not. Restore an entry to check its format and decimal setting, or clear history on a shared device. Nothing is sent to a calculation server. Copy summary records the mean, count, total and exact-or-estimated label. Download full CSV carries every input row, all statistics, quartiles, modes and outlier counts. The copied summary includes the same statistics. Browser storage and clipboard access can be unavailable in private or restricted environments; calculation still works, and the copy control explains when manual selection is needed.
For the reasoning behind a count table, read the frequency-table walkthrough. For lost detail and endpoint bounds, read the grouped-data guide. For rates and multiplication factors, read the guide to geometric and harmonic means. The definitions of location are summarized by NIST; OpenStax explains why a mean from class midpoints is an estimate.
Frequently asked
Can I enter a frequency table?
Yes. Choose Frequency, then enter value and whole-number count on each line. The mean weights each value by its count.
Is a grouped-data mean exact?
No. Class intervals replace observations with midpoints. The tool labels those results as estimates and shows possible raw-mean bounds.
What do zeros or negatives change?
They are valid arithmetic-mean inputs. Geometric and harmonic means are unavailable because the calculator uses a strictly positive convention for them.
Why is my median different from another calculator?
Check the input counts and grouped-data method. Quartiles here use medians of the halves; grouped statistics describe repeated midpoints.
Where are my inputs stored?
Only in this browser. Calculate keeps up to five complete inputs in local history, which you can clear. No calculation data is uploaded.
Guides
Updated