Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I would like to simply calculate areas of a area-shape file in square meters or in acres (ha).

I didn't find that functionality in the vector tools.

Could anyone here help me with that?

share|improve this question
Follow up question: I have a layer in State Plane NAD83. When I use these commands it creates the area in feet. What if I want acres or square miles? Thanks – C_K Apr 17 '13 at 23:26
The two answers provided work but they are a bit slow to implement especially when one is trying to determine the area of many polygon vector files. Is there not a plug-in or some other way to get the area of a polygon simply by right clicking the polygon? The answers provided end up with a new field attribute (i.e. area) but the value doesn't update if the polygon is changed. So, in many cases there is no need to have the area displayed in a separate field attribute. If the area could just be shown as a number in a small chart, on the bottom of the page, etc it would be sufficient. So, is the – David Aug 16 '13 at 23:06
up vote 34 down vote accepted

Make the layer editable, then use the field calculator (Layer>Open attribute table>Field Calculator/Ctrl+I or right click shapefile>Open attribute table>Field Calculator/Ctrl+I). There is an operator "$area" that will calculate the area of each row in the table. All units will be calculated in the units of the projection, so you probably want to project it to a projection that uses feet or metres before doing that, rather than lat/lon.

share|improve this answer
I don't see any field calculator in the "Open attribute table". – Tomas Oct 27 '14 at 10:53
see comment below - click the edit button and you should see it enabled – Stev_k Oct 27 '14 at 11:12
OK. Consider updating your answer. – Tomas Oct 27 '14 at 12:04
$area vs area ? – RutgerH Feb 2 at 20:25
In current versions of QGIS if your data is in a Geographic CRS you can use the function transform() to project the geometries to a projected system (Preferably an equal area one) without the need to duplicate your data. In the Field calculator, something like this should work: area($geometry, 'EPSG:4326','EPSG:3763') – Alexandre Neto Feb 3 at 23:11

This can also be done with Vector|Geometry Tools|Add/export geometry columns, which creates a new shapefile with area and perimeter (or length) columns added.

Edit: (using the tool above, you can also unselect "save as new shape-file" in V1.8, the shapefile is now only updated!)

Using the field calculator is probably a better idea, though, as it doesn't require the creation of a new shapefile.

share|improve this answer
I'm not able to select the Field Calculator button so thank you – boulder_ruby Jan 22 '14 at 15:34
To use the Field Calculator, I believe you have to hit edit (the pencil) first. After that it should light up. Confusing! – jocull Oct 22 '14 at 14:32
You can't change the attributes of the shapefile without enabling editing first, (calculating area counts as editing the attributes, you are adding a new column). Keep in mind that all units will be calculated in the units of the projection (meters bu default), so you to re-project it to a projected coordinate system first. – Hasan Mustafa Feb 4 at 4:42

I wrote a script specifically for this. If you don't want to reproject your data, you can compute the area using ellipsoidal math.

Processing Toolbox -> Tools -> Get scripts from on-line scripts collection -> Ellipsoidal Area

You will find the script installed in Processing Toolbox -> Utils -> Ellipsoidal area

The tool should be self explanatory and will allow you to calculate area in units of your choice regardless of projection.

share|improve this answer
Can you give better example as code? – Masi Jul 4 at 19:55

protected by underdark May 6 '13 at 12:48

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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