4/25/2025

how to find median in google sheets

IN SUMMARY

To find the median value in a set of data in Google Sheets, you can use the MEDIAN function. The MEDIAN function calculates the middle value in a range of numbers when they are sorted in ascending or descending order.

Using the MEDIAN Function

In the cell where you want to display the median value, enter the formula =MEDIAN(range), replacing 'range' with the cells containing the data set. For example, if your data is in cells A1 to A10, you would enter =MEDIAN(A1:A10).

The MEDIAN function sorts the values in the specified range in ascending order and returns the middle value. If there is an even number of values, it calculates the average of the two middle values.

If the range contains text or logical values, the MEDIAN function will return a #VALUE! error. Ensure that the range contains only numeric values or empty cells.

Alternative Methods

Sort the data in ascending order, count the number of values, and select the middle value (or average of the two middle values if the count is even).

The PERCENTILE function can also be used to find the median value. The formula =PERCENTILE(range, 0.5) will return the median value, as the 50th percentile is the median.

Create a Pivot Table from your data, and add the 'Median' value field. The Pivot Table will automatically calculate the median for the selected data range.

Tips and Considerations

For large data sets, the MEDIAN function may be more efficient than sorting and counting, as it does not require rearranging the entire data set.

If your data range is dynamic (i.e., it changes frequently), use absolute cell references ($A$1:$A$10) in the MEDIAN function to ensure the correct range is always used.

You can use conditional formatting to highlight the median value in your data set, making it easier to identify visually.

Want to automate your busy work in Google Sheets with AI?

Videos