Calculating area of polygon shapefile and output data in QGIS

Calculating area of shapefile in QGIS


Area calculation is one of the commonly used functions in GIS, and this article will introduce several different ways of calculating area.



Tools for area calculation

  1. Identify Features
  2. Expression of $area Function
  3. Create virtual field



Identify Features

Select the Identify Features (Shortcut: Ctrl+Shift+I) and click on the polygon.



Identify Features QGIS




Expression of area Function


Layer > Properties > Field calculator


Enter the field name and expression in the field calculator.

Output field name: Area

Enter in the expression: $area


If you need a more precise value, select the decimal number (real) in the category and set the precision (Length, Precision).


qgis layer properties


QGIS field calculator


qgis layer properties




Export Area data

Right-click on the layer to export it as a csv data, export the data of the vector layer as a CSV file. Select the archive location and make sure the Area field is selected.

Deselect "Add to map" and you will see the size of each symbol in the exported CSV file.



export area data


save vector layer


data export to excel




Calculate the area of all polygons on the layer

Enter sum($area) in the expression to get the total area of the layer.

Enter $area in the expression to get the area of single polygon.


Calculate the area




Create virtual field

Create virtual fields to display the area in real time when drawing shapes on the map.xi virus


Knowing bug: Using sum($area) will cause an error if only virtual layers exist in the layer.



Calculate the area



Calculate the area



Calculate the area




Calculation of area in different coordinate systems

The following is an example of how to calculate the area of the EPSG:3857 coordinate system on the map of EPSG:4326. Select the layer and open the Field Calculator and enter the following formula to add the Area field.





calculate EPSG 3857 on EPSG 4326







Read more

面積計算、Cartesian 與 Ellipsoidal 的意義 - QGIS







Windows 11 真有必要升級嗎?安裝前你應該要知道的災情 (2022/12)