MovingMedian[list,r]
gives the moving median of list, computed using spans of r elements.


MovingMedian
MovingMedian[list,r]
gives the moving median of list, computed using spans of r elements.
Details

- MovingMedian gives a list of the medians of elements in list taken in blocks of length r. »
- MovingMedian gives a list of length Length[list]-r+1.
- MovingMedian works with SparseArray objects. »
Examples
open all close allScope (5)
Compute moving medians for any numeric data:
Obtain results at machine precision:
Obtain results for lists of any precision:
Moving medians of matrices are matrices:
Moving median of a TimeSeries:
Generalizations & Extensions (1)
Compute results for a SparseArray:
Properties & Relations (3)
A moving median is a sequence of medians:
A two‐term MovingMedian is equivalent to a two‐term MovingAverage:
MovingMedian is equivalent to MovingMap of Median:
Possible Issues (1)
MovingMedian requires numeric values:

Related Guides
History
Text
Wolfram Research (2007), MovingMedian, Wolfram Language function, https://reference.wolfram.com/language/ref/MovingMedian.html.
CMS
Wolfram Language. 2007. "MovingMedian." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MovingMedian.html.
APA
Wolfram Language. (2007). MovingMedian. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MovingMedian.html
BibTeX
@misc{reference.wolfram_2025_movingmedian, author="Wolfram Research", title="{MovingMedian}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/MovingMedian.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_movingmedian, organization={Wolfram Research}, title={MovingMedian}, year={2007}, url={https://reference.wolfram.com/language/ref/MovingMedian.html}, note=[Accessed: 11-August-2025]}