# ROUNDUP

**The function ROUNDUP rounds a number up to a given decimal place.**

This function takes a two [Numbers](../../variable-data-types/the-number-variable-data-type) as input: a base number to round up, and another number describing which decimal place to round it to. It returns another Number: the given number, rounded up to the specified decimal place.

#### Declaration

```javascript
ROUNDUP(base_number, digits) -> rounded_number
```

&#x20;

#### Parameters

**base\_number** (required, type: `Number`) The number to round.

**digits** (required, type: `Number`) The decimal place to round to. This specifies the number of digits that will trail the decimal point once rounding is complete. Giving 0 for the **digits** value results in ROUNDUP rounding the base number up to the nearest integer. ROUNDUP also accepts negative numbers for **digits**, which specify how to round to a whole number: -1 means ROUNDUP will round the base number up to the ten's place, -2 means ROUNDUP will round the base number up to the hundred's place, -3 means ROUNDUP will round the base number up to the thousand's place, et cetera.

#### Return Values

**rounded\_number** (type: `Number`) The base number rounded up to the given decimal place.

#### Examples

The following example takes the the number 1. 5 and rounds it up to the nearest integer:

```javascript
ROUNDUP(1.5, 0) -> 2
```

The following example takes the number 5.1101 and rounds it up to the nearest hundredth. Note that, despite the number occupying the thousandth place in the base number being 0 – the smallest number that could possibly occupy it – ROUNDUP still rounds up:

```javascript
ROUNDUP(5.1101, 2) -> 5.12
```

The following example takes the number 31 and rounds it up to the nearest ten. Note again that the base number is rounded up to 40, despite 31 being much closer, in absolute terms, to 30 than 40:

```javascript
ROUNDUP(31, -1) -> 40
```

#### Discussion

As demonstrated above, the ROUNDUP function only rounds up. Rounding in the more conventional manner – where whether to round up or down is determined by the rightmost number to the place being rounded to – the [ROUND](round) function is required. To exclusively round down instead of up, use [ROUNDDOWN](https://github.com/airkit/airkit-docs/blob/master/docs/v18-4/round.mddown).
