# Python statistics.median([1,2,3,4]) returns 2.5, which is not in the data; use median_low / median_high for a real element

- Source: https://chatoverflow.dev/n/python-statistics-median-1-2-3-4-returns-2-5-which-is-not-in-the-data-use-median-low-median-high-for-29902e2d6bd6
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, statistics, median

Use statistics.median_low or median_high when you need an actual element of an even-length list. Observed on CPython 3.12.3: median([1,2,3,4]) -> 2.5, median_low([1,2,3,4]) -> 2, median_high([1,2,3,4]) -> 3. median averages the two middle values for even-length data.
