HexMathv1.0.4

Median calculator

This median calculator finds the middle value of a list of numbers or of a frequency table. Type the data or scan it. HexMath sorts the list, counts the values and returns the median, showing the single middle value for an odd count or the mean of the two middle values for an even count.

Loading math input...

What this page covers

  • The median of a list of whole numbers, decimals or negative numbers.
  • Odd and even counts: the single middle value, or the mean of the two middle values.
  • Data given as a frequency table, by finding the middle position with running totals.
  • Not covered here: the mean and mode together, or the spread of the data (see the statistics calculator).

How to enter the problem

  • Type it or paste it. Write the word median, then the numbers separated by commas.
  • Scan it. Fit the one problem in the frame.
  • Choose a photo. Several problems in one photo are solved as a list.
  • Then tap Solve.

Worked examples

Example 1: Find the median of 7, 3, 9, 1, 12, 5.

Problem

Find the median of 7, 3, 9, 1, 12, 5.

Answer

Verified

The answer is

66

Explanation

  1. Sort the data
    1,3,5,7,9,121, 3, 5, 7, 9, 12.
  2. Find the middle
    There are 66 values, an even count, so the middle is between the 3rd and 4th values: 55 and 77.
  3. Average the two middle values
    5+72=6\frac{5 + 7}{2} = 6
  4. Check
    Three values are below 66 (1,3,51, 3, 5) and three are above (7,9,127, 9, 12).

Example 2: Find the median of 2.5, 4, 3.1, 6, 1.8, 5.

Problem

Find the median of 2.5,4,3.1,6,1.8,5\displaystyle 2.5, 4, 3.1, 6, 1.8, 5.

Answer

Verified

The answer is

3.553.55

Explanation

  1. Sort the data
    1.8,2.5,3.1,4,5,61.8, 2.5, 3.1, 4, 5, 6.
  2. Count the values
    There are n=6n = 6 values, an even count, so two values share the middle: positions 3 and 4.
  3. Read the two middle values
    Position 3 is 3.13.1 and position 4 is 44.
  4. Take their mean
    3.1+42=7.12=3.55\frac{3.1 + 4}{2} = \frac{7.1}{2} = 3.55

Example 3: A survey records how many pets each student has. The value 1 appears 3 times, 2 appears 5 times, 3 appears 4 times and 4 appears 2 times. Find the median.

Problem

A survey records how many pets each student has. The value 1 appears 3 times, 2 appears 5 times, 3 appears 4 times and 4 appears 2 times. Find the median.

Answer

Verified

The answer is

22

Explanation

  1. Count all the data
    n=3+5+4+2=14n = 3 + 5 + 4 + 2 = 14 students, an even count.
  2. Find the middle positions
    With 14 values the middle is between positions 7 and 8.
  3. Use running totals
    Values of 1 fill positions 1 to 3. Values of 2 fill positions 4 to 8. So positions 7 and 8 both hold 22.
  4. Take the mean of the two middle values
    2+22=2\frac{2 + 2}{2} = 2

Common mistakes

  • Taking the middle of the list without sorting it first. In 7,3,9,1,12,57, 3, 9, 1, 12, 5 the unsorted middle pair is 99 and 11, which gives 55 instead of 66.
  • With an even count, picking one of the two middle values instead of their mean.
  • Using the number of rows in a frequency table as nn instead of the total of the frequencies.
  • Counting a repeated value only once. Every copy stays in the sorted list.

Checks, assumptions and limits

  • Check by counting. The same number of values should sit below the median as above it. For the example in the solver above, three values are below 6 and three are above.
  • The median needs numbers that can be put in order. It does not change if the largest value grows, which is why it resists outliers.
  • HexMath can make mistakes. Double check important steps.

Frequently asked questions

With an even count, the median is the mean of the two middle values after sorting. It may be a value that is not in the list, such as 3.55.

Yes. Use the camera on the one problem, or choose a photo. Several problems in one photo are solved as a list.

Yes. Ask a follow-up question in the same thread, for example for the mean or the range of the same data. A typed follow-up needs sign-in.

Yes. Enter the values with their frequencies. The steps add up running totals to find the middle position, then read off the value at that position.

Ready to solve your next math problem?

Create a free account for 3 math questions a day in your browser. No card.

Get HexMath on your phone

The same solver and camera scan on iPhone and Android.

Last updated: · HexMath