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

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