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

# 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 ]
```
