Step-by-step
- Collect the numbers in your data set.
- Arrange the values from smallest to largest.
- If there is an odd number of values, select the middle value.
- If there is an even number of values, calculate the mean of the two middle values.
- Check that every intended value was included exactly once.
Median formula for even-sized data
When the number of observations is even, add the two central values and divide their sum by two. For an odd-sized set, the median is the single central value after sorting.
Median versus average
The arithmetic mean uses every value and can be pulled by extreme values. The median depends on the middle position, so it can better represent skewed data such as home prices or response times.
Finish the task with DevUtilityKits
Use the relevant online utility, check the result, and continue with your development workflow.
Open Median Calculator →