Calculate Mean and Median from Frequency Table
Enter data values and their frequencies to instantly compute the weighted mean, median, total frequency, cumulative positions, and a live frequency chart. This premium calculator is ideal for statistics homework, exam revision, classroom demonstrations, and business data summaries.
Frequency Table Calculator
Add each data value and its corresponding frequency. Use integers or decimals for values; frequencies should be non-negative numbers. The calculator sorts values automatically before finding the median.
| Value (x) | Frequency (f) | Remove |
|---|---|---|
Results
How to Calculate Mean and Median from a Frequency Table
Learning how to calculate mean and median from a frequency table is one of the most useful skills in introductory and intermediate statistics. A frequency table compresses repeated observations into a concise format, which makes large data sets easier to read, compare, and analyze. Instead of listing every individual value, you show each distinct value and how often it appears. From this compact summary, you can still calculate central tendency measures such as the mean and median with precision.
The mean tells you the average value of the data set, while the median tells you the middle value when all observations are arranged in order. Both are measures of center, but they behave differently when the distribution is skewed or when extreme values are present. In practical terms, the mean is excellent when you want to account for every value and every repetition, while the median is especially useful when you need a robust midpoint that is less affected by unusually high or low values.
Frequency tables appear in school mathematics, laboratory reports, survey analysis, quality control, economics, demographics, and educational testing. For example, a teacher may summarize test scores in a frequency table, a retailer may summarize daily purchases by basket size, and a researcher may summarize repeated measurements without writing out the full raw data list. Understanding how to compute the mean and median from this format saves time and improves statistical fluency.
What a Frequency Table Shows
A simple frequency table usually has at least two columns:
- Value or class value: the actual data value, often written as x.
- Frequency: the number of times that value occurs, often written as f.
If your data set is discrete, such as shoe sizes or the number of books read, each row may contain a single value. If your data set is grouped into intervals, such as age bands or income ranges, the process is slightly different because you often use class midpoints. This calculator is designed for standard value-frequency pairs, which is the most common version taught in classrooms and used in straightforward descriptive statistics.
Formula for the Mean from a Frequency Table
To calculate the mean from a frequency table, multiply each value by its frequency, add those products, and divide by the total of all frequencies. In symbolic form:
Mean = Σfx / Σf
Here, Σfx means the sum of each value multiplied by its frequency, and Σf means the total number of observations in the data set.
| Value (x) | Frequency (f) | Product (fx) |
|---|---|---|
| 2 | 3 | 6 |
| 4 | 5 | 20 |
| 6 | 4 | 24 |
| 8 | 2 | 16 |
| Total | 14 | 66 |
Using the totals above:
Mean = 66 / 14 = 4.714285…
Rounded to two decimal places, the mean is 4.71.
How to Find the Median from a Frequency Table
The median is the middle observation once all data points are placed in ascending order. In a raw list, you might write out every value and find the middle directly. In a frequency table, that is inefficient, so you use cumulative frequency logic instead.
First, compute the total frequency n = Σf. Then determine the median position:
- If n is odd, the median is at position (n + 1) / 2.
- If n is even, the median is the average of the values at positions n / 2 and (n / 2) + 1.
For the example above, the total frequency is 14, which is even. That means we need the 7th and 8th observations in the ordered data set.
Now track cumulative frequency:
- Value 2 covers positions 1 to 3
- Value 4 covers positions 4 to 8
- Value 6 covers positions 9 to 12
- Value 8 covers positions 13 to 14
Both the 7th and 8th observations fall within the value 4 row, so the median is 4.
Step-by-Step Method You Can Use Every Time
If you want a reliable process for exams, assignments, or quick desk calculations, use this sequence:
- List all values and frequencies clearly.
- Multiply each value by its frequency to get fx.
- Add all frequencies to get Σf.
- Add all products to get Σfx.
- Compute the mean using Σfx / Σf.
- For the median, identify the middle position or positions from the total frequency.
- Use cumulative frequency to determine which value contains that position.
This method is systematic, easy to audit, and highly transferable across many question types.
Worked Example with Interpretation
Suppose a school librarian records how many books each student borrowed during a month and summarizes the results in a frequency table. The values might represent books borrowed, while frequencies represent the number of students who borrowed that many books.
| Books Borrowed | Frequency | Cumulative Frequency |
|---|---|---|
| 0 | 2 | 2 |
| 1 | 6 | 8 |
| 2 | 8 | 16 |
| 3 | 5 | 21 |
| 4 | 3 | 24 |
Total frequency is 24. To find the mean, calculate the weighted sum:
- 0 × 2 = 0
- 1 × 6 = 6
- 2 × 8 = 16
- 3 × 5 = 15
- 4 × 3 = 12
So Σfx = 49 and Σf = 24. Therefore:
Mean = 49 / 24 = 2.04 approximately.
To find the median, because 24 is even, we locate the 12th and 13th observations. Looking at cumulative frequency, positions 9 through 16 are all value 2. Therefore, both the 12th and 13th observations equal 2, so the median is 2.
This tells us that the average number of books borrowed is slightly above 2, while the middle student borrowed exactly 2 books. The closeness of the mean and median suggests the distribution is not strongly skewed.
Why Mean and Median Can Be Different
One of the most important concepts in statistics is that the mean and median do not always match. The mean uses every value and every frequency, so it is sensitive to the overall distribution, including extreme observations. The median depends only on position, not on magnitude beyond rank order.
If a frequency table includes a few unusually large values with small frequencies, the mean can rise noticeably while the median changes very little. This is why analysts often compare both measures. In income, home price, and waiting-time data, the median can be more representative of a “typical” case because it is less influenced by outliers. In balanced academic or quality-control data, the mean can provide a more complete summary because it includes all values proportionally.
Quick Comparison
| Measure | What It Uses | Best Use Case |
|---|---|---|
| Mean | All values and all frequencies | When you want the weighted average and the data are not heavily distorted by outliers |
| Median | Ordered position of observations | When you want the midpoint and need resistance to extreme values |
Common Mistakes When Calculating from a Frequency Table
Students and even experienced users occasionally make avoidable errors. Here are the most common ones:
- Forgetting to multiply by frequency: The mean is not the average of the distinct values alone. You must weight each value by how often it occurs.
- Using the wrong denominator: Divide by total frequency Σf, not by the number of rows.
- Not sorting values first: To find the median correctly, values must be in ascending order.
- Misreading the middle positions: For even totals, you need two central positions, not one.
- Confusing grouped and ungrouped data: If your table uses intervals instead of exact values, you usually need class midpoints and slightly different assumptions.
When Frequency Tables Are Especially Useful
Frequency tables are ideal when repeated values occur often. They reduce clutter, reveal patterns, and make it easier to visualize a distribution with a bar chart or histogram. In educational measurement, public health reporting, and official statistical summaries, compact tabulations are essential for communication. You can see examples of data presentation and statistical resources through institutions such as the U.S. Census Bureau, the National Center for Education Statistics, and university-based statistical resources like Penn State Online Statistics Education.
These resources underscore an important point: descriptive statistics are not only classroom exercises. They are foundational tools for policy analysis, social science, science education, and evidence-based decision-making.
Using This Calculator Effectively
This calculator automates the arithmetic while preserving the logic of the method. Enter each unique value once, type its frequency, and calculate. The tool sorts the values, computes the weighted mean, identifies the median positions, and displays a frequency chart so you can immediately interpret the shape of the distribution.
To get the most accurate results, make sure your values represent actual data categories and your frequencies represent counts. If you have raw data, first condense it into value-frequency pairs. If you have grouped intervals such as 10–19, 20–29, and 30–39, note that you are working with grouped data, which typically requires class midpoints for the mean and interpolation methods for a more advanced median estimate.
Final Takeaway
To calculate mean and median from a frequency table, remember two key ideas. For the mean, use a weighted average: multiply each value by its frequency, add the products, and divide by total frequency. For the median, use positions and cumulative frequency: find the middle observation or observations and identify which value contains them. Once you understand these two procedures, you can handle a wide range of statistical summaries quickly and confidently.
Whether you are preparing for a mathematics exam, summarizing survey responses, or analyzing repeated measurements in a report, mastering frequency table calculations gives you a practical and highly transferable statistical skill. Use the calculator above to verify your work, visualize patterns, and build intuition about how data distributions influence the mean and median.