Home / GIS and Open Map Data for Beginners

QGIS Calculate Area of a Polygon: $area, area($geometry), and the Degrees Trap

An aerial view of vibrant agricultural fields

Photo: Masood Aslami / Pexels

Ask QGIS for the area of a polygon and it will happily give you a number. Whether that number means anything depends on one choice most tutorials rush past: QGIS has two area functions, they compute different things, and picking the wrong one produces answers that are wrong in ways ranging from slightly off to square degrees. This guide separates them properly. It assumes you can already open QGIS and load a layer; if you are still at the first session stage, our QGIS guide covers getting oriented, and this article picks up at the measurement job itself.

Interactive tool

Area Done Right: The $area Routine

Check off each step as you finish it. Your progress stays on this page.

0 of 6 complete

0% done

The Two Functions, Side by Side

In the expression engine, both of these exist:

  • $area returns the area of the current feature computed ellipsoidally, following the measurement settings of your project: the ellipsoid chosen in Project Properties (General, Measurements), and the units you set there. On a default project using the WGS 84 ellipsoid, $area gives you true ground area in square meters (or your chosen unit), regardless of what CRS your layer is stored in. This is the function that answers "how big is this field, really?"
  • area($geometry) returns the planimetric area: the flat geometry area computed in the layer's own CRS coordinates. If the layer CRS is a projected system measured in meters, that is square meters on the projection plane, often close enough to ground truth for local work. If the layer CRS is EPSG:4326, the coordinates are degrees, and the result is square degrees, a number that describes nothing on the surface of the Earth.

The rule that keeps you safe: $area for reporting real areas; area($geometry) only when you deliberately want projection plane area and know your CRS is projected in sensible units. When a forum answer or a colleague's expression uses area($geometry) without mentioning CRS, that silence is where the error lives.

The Degrees Trap, Named Precisely

The trap deserves its own section because it catches everyone once. You load a shapefile or GeoJSON, which is almost always EPSG:4326. You open the field calculator, type area($geometry), and receive values like 0.000423. Those are square degrees. Worse, a square degree is not even a fixed size: it shrinks in the east west direction as latitude rises, so two polygons with identical ground area at different latitudes return different square degree values, and comparing them is meaningless. $area on the same layer returns square meters directly, because the ellipsoidal calculation does not care that the storage is in degrees. If you take one habit from this article, take this one: check the layer CRS in the status bar before believing any area figure, and when the CRS is geographic, $area is the only safe expression of the two.

A bird's eye view of rural fields in a patchwork pattern
A bird's eye view of rural fields in a patchwork pattern

The Workflow: Adding an Area Field

  1. Toggle editing on the layer and open the Field Calculator (the abacus icon in the attribute table, or Layer, then Field Calculator).
  2. Choose Create a new field, name it (area_ha, say), and set the type to a decimal number (real) with a generous width and precision: width 20, precision 6 is a safe habit for areas, because a too narrow field silently truncates big values.
  3. Enter the expression. For hectares from the ellipsoidal measurement: $area / 10000. For square meters, plain $area. For acres: $area / 4046.8564224.
  4. Confirm, save the edits, and spot check one polygon against a known reference before trusting the column: a sports field, a reservoir, anything whose area you can verify independently.

The same expression engine works in the Select by Expression and geometry generator contexts, so a label showing round($area / 10000, 2) gives live hectare labels that update as you edit, a trick worth knowing once the static field starts going stale.

Units and Divisors, Exactly

$area returns square meters under default metric measurement settings. The conversions you will actually type:

  • Hectares: divide by 10,000 exactly.
  • Acres: divide by 4,046.8564224, the international acre in square meters.
  • Square kilometers: divide by 1,000,000.
  • Square feet: divide by 0.09290304, or multiply by 10.7639104.

If your $area results arrive in square feet or square miles uninvited, your project's measurement units are set to imperial: Project Properties, General, Measurements is where the ellipsoid and the units live, and setting them deliberately at project start is cheaper than converting around them forever.

When the Two Functions Disagree, and Which to Believe

On a projected layer in meters, $area and area($geometry) often differ by a fraction of a percent: the projection stretches or shrinks the plane slightly relative to the ellipsoid, and the two functions are honestly answering their different questions. For a field in one county, either is defensible; say which you used. Over large extents, a country sized polygon in a national projection, the disagreement grows, and the ellipsoidal $area is the figure that matches what other authorities publish. For legal, cadastral, or payment purposes, neither number is self certifying: the authority's own method governs, and your job is to state your function, your ellipsoid, and your CRS alongside the result so the figure can be reproduced. An area without its method is an anecdote.

The Project Settings That Decide What $area Means

Because $area follows the project, the project deserves thirty seconds of attention before the calculation, not after the confusion. Open Project Properties, General, and find the Measurements section. Two settings live there:

  • Ellipsoid. The mathematical Earth model the measurement is computed on. The default in most installs is WGS 84, which is the right choice unless a national standard or a client specification names another. Areas computed on different ellipsoids differ by small fractions of a percent, invisible in a paddock and relevant in a province.
  • Distance and area units. The units $area reports in. Metric projects get square meters; a project set to imperial reports square feet, which is how mysterious five digit areas appear in a report that expected hectares. Set the units deliberately, then your expressions stay simple: $area for square meters, $area / 10000 for hectares, with no conversion archaeology later.

Neither setting changes your data or your layer CRS. They only change the measuring instrument, which is exactly why they are forgotten: nothing on the map looks different when they change, and the numbers quietly move.

Sanity Checks and Rescuing a Wrong Column

Never let a computed column ship unchecked. The cheapest verification in all of GIS is a known shape: a standard football pitch is about 0.71 hectares of playing surface; a hectare is a square 100 meters on a side; a square kilometer is 100 hectares. Digitize or select a feature of roughly known size, read its computed area, and ask whether the figure is in the right universe. Square degree errors fail this test screamingly, since the same pitch returns a number like 0.0000008, while ellipsoid confusion fails it silently at the second decimal, which is why the check uses a coarse anchor on purpose: it is aimed at the catastrophic errors, and it catches all of them.

If you discover a column was computed wrong, with area($geometry) on a degree layer, for example, do not patch individual values. Toggle editing back on, open the Field Calculator in Update existing field mode, enter the correct expression ($area, with your divisor), and let it recompute the entire column atomically. Then spot check the same known feature again and confirm the rescue. A GIS column should be reproducible from an expression at any moment; the moment it contains hand edits, it has stopped being data and become folklore.

Companion Questions: Perimeter, Holes, and Parts

Area rarely travels alone, and its companions behave differently enough to deserve a warning each. Perimeter has its own function, $perimeter, with the same project based logic: measured on the ellipsoid in your project's units, and the same warning applies about degree based shortcuts. Holes are handled the way you hope: a polygon with an inner ring, a field with a pond, a building with a courtyard, returns its net area from $area automatically, the hole already subtracted, because the function measures the geometry you actually drew rather than its outline. Multipart polygons, one feature made of several separate pieces, an island group, a scattered reserve, return the sum of their parts from $area, which is usually the intent and occasionally a trap: if your "one feature" is secretly three fields that need separate figures, split it into single parts (the Multipart to Singleparts tool) before calculating, or the column will hand you a total where you wanted three numbers. The general principle: $area answers for the geometry as stored, faithfully and literally. Every surprise it produces is the geometry confessing something about how it was digitized, which makes the area column an accidental audit of your data as well as a measurement of your land.

One Habit to Take Away

If this article leaves a single reflex, let it be this: never write area($geometry) in a project you have not checked, and never trust an area you did not compute with $area or planimetric measurement on a projected layer. The two routes are both legitimate, the shortcut is not, and the difference between them is the difference between a GIS that measures land and a GIS that measures the coordinate system's opinion of land. Set the ellipsoid and units once per project, compute with $area, sanity check against one known shape, and the humble area column becomes what it should be: the most boring, reliable number in the building.

Related Guides

Readers working through this topic usually need its closest companions too. These GIS and open map data guides cover the neighboring ground:

Frequently Asked Questions

What is the difference between $area and area($geometry) in QGIS?

$area computes ellipsoidal area using your project's measurement settings (ellipsoid and units), so it returns real ground area in square meters by default, whatever CRS the layer uses. area($geometry) computes flat planimetric area in the layer CRS's own units: square meters for a projected CRS, and meaningless square degrees for EPSG:4326. Use $area for real world areas.

Why is my polygon area a tiny decimal like 0.0004?

Your layer is in a geographic CRS (almost certainly EPSG:4326) and you used area($geometry), which returned square degrees. Either switch the expression to $area, which handles the ellipsoidal math for you, or reproject the layer to a suitable projected CRS before using planimetric area.

How do I calculate area in hectares in QGIS?

In the Field Calculator, create a decimal field and use the expression $area / 10000, since a hectare is exactly 10,000 square meters and $area returns square meters under default settings. For acres, divide by 4046.8564224 instead. Set the new field's width and precision generously so large values are not truncated.

Which area function should I use for a report?

$area, with the project's ellipsoid set deliberately (WGS 84 unless your national standard says otherwise), and state the method with the result. It is independent of the layer's storage CRS and matches how authorities compute areas. Keep area($geometry) for cases where projection plane area is specifically what is asked for.

Does $area work if my layer is in EPSG:4326?

Yes. That is its main virtue. $area measures on the ellipsoid from the geometry's coordinates, so a degree based layer still yields square meters. It is area($geometry) that inherits the CRS units and returns square degrees on such a layer.

Photo credits: Masood Aslami (Pexels); Andreas Koch (Pexels). Photos are served from this site; follow the credit to the library page for the original.