# Median calculator

For median calculation, please enter numerical data separated with comma (or space, tab, semicolon, or newline). For example: 498.3 315.8 -788.9 239.0 808.6 -621.0 698.8 138.7 -473.7 964.7 167.6 534.2 773.0### Median

Median is the number separating the higher half of the ordered data sample (or data file) from the lower half.

The median is the 2nd quartile (Q2), 5th decile, and 50th percentile.

### How to calculate the median?

Sort data set with n elements and select n/2-th element. If the index n/2 is not an integer, then use interpolation between the surrounding elements (median then it does not belong to the set of input data).

For example, for n=10 elements, the median equal to 5th element, for n=50 elements, the median equal to 25th of the ordered data etc.

### How to enter data as a frequency table?

Simple. First-type data elements (separated by spaces or commas, etc.), then type f: and further write frequency of each data item. Each element must have a defined frequency that count of numbers before and after symbol f: must be equal. For example:1.1 2.5 3.99

f: 5 10 15

### How to enter a grouped data?

Grouped data are data formed by aggregating individual data into groups so that a frequency distribution of these groups serves as a convenient means of summarizing or analyzing the data.group | frequency |

10-20 | 5 |

20-30 | 10 |

30-40 | 15 |

10-20 20-30 30-40

f: 5 10 15

### How to enter data as a cumulative frequency table?

Similar to a frequency table, but instead f: type cf: in the second line. For example:10 20 30 40 50 60 70 80

cf: 5 13 20 32 60 80 90 100

The cumulative frequency is calculated by adding each frequency from a frequency distribution table to the sum of its predecessors. The last value will always be equal to the total for all observations since all frequencies will already have been added to the previous total.