Contact Free trial Login

ceil

ceil(Number): Number

Rounds a number up to the nearest whole number.

Parameters

Name Description

number

The number to round.

Example

This example rounds numbers up to the nearest whole numbers. Notice that 2.1 rounds up to 3.

Source

%dw 2.0
output application/json
---

[ ceil(1.5), ceil(2.1), ceil(3) ]

Output

[ 2, 3, 3 ]

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub