# Issue with area calculation in Google Earth Engine

Using this code https://code.earthengine.google.com/36d0af209d34063ff109c57c40d1901e I calculate the area of pixels inside a set of 5km radius Features.

From the code results printed in the console, it is evident that the calculation leads to cases where the sum of area pixels calculated is substantially larger than the area of the feature itself (5^2 * pi), which makes no sense.

Where is the issue?

``````var getCentroid = function(feature) {
var centroid = feature.geometry().centroid()
return ee.Feature(centroid)
}

var table = ee.FeatureCollection("users/giacomofalchetta/UC_cities_global")

var table = table.map(getCentroid)

var bufferBy = function(size) {
return function(feature) {
return feature.buffer(size);
};
};

var table = table.map(bufferBy(5000))

var area = ee.Image.pixelArea().divide(1000000)

var aFeatureCollection = area.reduceRegions({
collection: table,
reducer: ee.Reducer.sum(),
scale: area.projection().nominalScale(),
});

print(aFeatureCollection.reduceColumns({
reducer: ee.Reducer.max(),
selectors: ['sum'],
}));

print(ee.Number.expression("(3.14159*5000*5000)/1e6"))
``````

``````var area = ee.Image.pixelArea().divide(1000000)
The default projection of `ee.Image.pixelArea()` is EPSG:4326 — WGS 84 longitude and latitude in degrees. Print the `nominalScale()` and you'll learn that the a degree at the equator is 111319.5 meters. Your 5000-meter-radius buffered point features fit inside a single one of these 111-km pixels — the reason you're getting a plausible value at all is solely because of weighting in the reduction.