Zonal statistics — Tool (QGIS)

In QGIS: Processing Toolbox › Raster analysis › Zonal statistics (native:zonalstatisticsfb).

Realises:

Settings that matter

  • Statistics to calculate: Count, Sum, Mean, Median, St dev, Minimum, Maximum, Range, Minority, Majority, Variety, Variance.
  • Output column prefix names the new fields.

Watch out

  • A cell counts when its centre is inside the zone.
  • To get a mean for a group of zones, add up Sum and Count and divide: never average the zones’ means.

Checked in QGIS 4.2.2, October 2026. Names and options can differ in other versions.