I want the count of the number of raster pixels within that polygon. I ran the Zonal Statistics as Table tool using one polygon as the feature zone data and only getting the SUM. I thought it would be the sum but i had done some rough calculations another way and got the number in the COUNT field.

Can someone explain what the difference between Count and Sum are?

screenshot of the output table from the zonal statistics as table tool

1 Answer 1


What you are looking for is COUNT, which is the frequency of the cells that you processed through Zonal Statistics. Sum, on the other hand, is the sum of cell values covered by your polygon. Overly simplistically, say, your cell values are 2,1,3,4,4 in this case COUNT is 5 and SUM is 14.

  • Thanks @fatih_dur ! How could my SUM value (above image) be smaller than the COUNT number? I do have quite a few NoData pixels, but those shouldn't be counted in the COUNT, right?
    – cAnna01
    Commented Dec 20, 2016 at 2:48
  • @cAnna01, do you have negative values in your raster? That could offset the sum.
    – Fezter
    Commented Dec 20, 2016 at 3:24
  • @Fezter Nope, no negative values :/
    – cAnna01
    Commented Dec 20, 2016 at 19:00
  • 1
    oh jeez, you guys i had a dumb moment! i just realized the reason it looked like the SUM was lower is because in the attribute table the column was made too skinny and so it chopped off the last digit. insert face palm emoticon haha. thanks for your help! I understand it all now! :)
    – cAnna01
    Commented Dec 20, 2016 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.