---
title: "calculateArea(_:for:orientedArea:)"
framework: vision
role: symbol
role_heading: Type Method
path: "vision/vngeometryutils/calculatearea(_:for:orientedarea:)"
---

# calculateArea(_:for:orientedArea:)

Calculates the area for the specified contour.

## Declaration

```swift
class func calculateArea(_ area: UnsafeMutablePointer<Double>, for contour: VNContour, orientedArea: Bool) throws
```

## Parameters

- `area`: The output parameter to populate with the calculated contour area.
- `contour`: The contour object for which to calculate the area.
- `orientedArea`: A Boolean value that indicates whether to calculate the signed area (positive for counterclockwise-oriented contours and negative for clockwise-oriented contours). If you specify doc://com.apple.documentation/documentation/Swift/false, the returned area is always positive.

## Discussion

Discussion Attempting to calculate the area for a contour containing random points, or with self-crossing edges, produces undefined results.

## See Also

### Calculating Area and Perimeter

- [calculatePerimeter(_:for:)](vision/vngeometryutils/calculateperimeter(_:for:).md)
