---
schema_version: "1"
id: 7de49e463d578a7dc2a244e319c63d39fd92842a5aee5ccef457eae181f5a8fb
title: abs
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dw-core-functions-abs.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dw-core-functions-abs
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 89ba0d038b6134faecc319bdc3cefdb166317053958fac593005f08720f964ef
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
---

# abs

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## abs(number: Number): Number

Returns the absolute value of a number.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>number</code></p></td><td><p>The number to evaluate.</p></td></tr></tbody></table>

### Example

This example returns the absolute value of the specified numbers.

#### Source

```DataWeave
%dw 2.0
output application/json
---
[ abs(-2), abs(2.5), abs(-3.4), abs(3) ]
```

#### Output

```JSON
[ 2, 2.5, 3.4, 3 ]
```
