---
name: "Catmandu::Fix::stat_median"
section: "3pm"
platform: "linux"
package: "libcatmandu-stat-perl"
version: "0.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::stat_median"
---

# Catmandu::Fix::stat\_median(3pm)

calculate the median of an array

## NAME

Catmandu::Fix::stat\_mean - calculate the median of an array

## SYNOPSIS

```
   # Calculate the median of foo. E.g. foo => [1,2,3,4]
   stat_median(foo)  # foo => '2.5'
```

## SEE ALSO

Catmandu::Fix
