> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Perimeter

> Use the Sigma Perimeter function to calculate the perimeter of a geography, in specified units.

The **Perimeter** function calculates the perimeter of a geography, in specified units.

This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

## Syntax

```
Perimeter(units, polygon)
```

The function arguments are:

<dl>
  <dt>
    units
  </dt>

  <dd>
    Required
  </dd>

  <dd>
    The unit of measurement for the perimeter.
  </dd>

  <dd>
    Valid values are 

    <code>"kilometers"</code>

    , 

    <code>"meters"</code>

    , and 

    <code>"miles"</code>

    .
  </dd>

  <dt>
    polygon
  </dt>

  <dd>
    Required
  </dd>

  <dd>
    The object for which we calculate the perimeter.
  </dd>

  <dd>
    Must be in valid Geography polygon format.
  </dd>
</dl>

## Examples

```
Perimeter("meters", [Coordinates])
```

```
Perimeter("kilometers", [Coordinates])
```

```
Perimeter("miles", [Coordinates])
```

The **Perimeter** function returns the following values for the **Coordinates** column values that define a polygon, when specifying area in meters, kilometers, or miles:

![Examples of the Perimeter function, showing the perimeter in meters, kilometers, and miles](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/92a62ce871a88effdc0830699094a0e6f8ebb7384c057e1ff2644b8a1d14150b/assets/docs-images/4bf256d-k.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260725%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260725T033723Z&X-Amz-Expires=604800&X-Amz-Signature=4cb6eaee4fbeffde56a679b3df9a4901c929149ef3b2c4b945d4bbba4f9ad6a2&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

On Databricks connections, values might differ slightly from those shown in the examples. This is because Databricks represents earth using the [WGS 84 ellipsoid](https://en.wikipedia.org/wiki/World_Geodetic_System), while other connections assume a perfect sphere.

## Related resources

* [Distance](/docs/distance)
* [Area](/docs/area)
* [Geography functions](/docs/geography-functions)