# Why area of intersection differs from total area of polygon?

I calculated intersection between Layer 1 and Layer 2 using expression below:

area(
intersection (
$geometry, collect_geometries( overlay_intersects ('layer1',$geometry)
)
)
)


And total area of polygon on Layer 2 using: $area Given the fact that polygon drawn on Layer 2 is completely inside polygon from Layer 1 the area of intersection should equal the total area of polygon but for some reason that's not the case and I don't understand why and how to fix it. This question is a indirect follow-up to this thread: Calculating area of polygon intersection with condition • Probably one calculation was done using planimetric measuring, and the other took into account the ellipsoid. – Erik Jan 9, 2023 at 8:03 • So it has something to do with CRS or with the way both funtions are calculated? I made sure that both Layers and Project are using EPSG:2180, but that didn't do the trick. Jan 9, 2023 at 8:07 • Also check this: gis.stackexchange.com/a/348856/63384 for the difference between planimetric area area() and ellipsoidal area $area Jan 9, 2023 at 8:18
• and also this one of course : gis.stackexchange.com/questions/23355/… Jan 9, 2023 at 8:21
• @ahmadhanb This is what I was looking for, I should be using area($geometry) instead of$area. Please copy your comment as answer so I can accept it as solution. Jan 9, 2023 at 8:25

As stated in my comment, check Using area() or $area function in QGIS, when the data (polygon) is stored in UTM? for the difference between planimetric area area() and ellipsoidal area $area for more information.