---
title: "doo.functions.math"
url: "https://help.tabidoo.cloud/en/article/doofunctionsmath"
language: "en"
last_updated: "2026-05-27T08:52:54.721Z"
---

# doo.functions.math

Basic mathematical functions that can also be used in a [Calculated field type](https://help.tabidoo.cloud/en/article/calculated-fields).

### `Round`

Mathematically round a decimal number to specified number of decimal places (solves JavaScript rounding inaccuracy). E.g. round(2.494, 2) = 2.49, round(2.495, 2) = 2.5, round(1.006, 2) = 1.01, round(1.015, 2) = 1.02, round(1.045, 2) = 1.05

**Example**

```typescript
const x = doo.functions.math.round(2.494, 2);
doo.model.number.value = x; // 2.49
```

### `MIN`

Returns the lowest number.

**Example**

```typescript
const x = doo.functions.math.min(-50, 0, 20);
doo.model.number.value = x; // -50
```

### `MAX`

Returns the largest number.

**Example**

```typescript
const x = doo.functions.math.max(-50, 0, 20);
doo.model.number.value = x; // 20
```

### `AVG`

Returns the average.

**Example**

```typescript
const x = doo.functions.math.avg(-50, 0, 20);
doo.model.number.value = x; // -10
```

### `ABS`

Return the absolute value.

**Example**

```typescript
const x = doo.functions.math.abs(-50);
doo.model.number.value = x; // 50
```

### `ROUNDUP`

Returns number rounded up.

**Example**

```typescript
const x = doo.functions.math.roundUp(2.44, 1);
doo.model.number.value = x; // 2.5
```

### `ROUNDDOWN`

Returns number rounded down.

**Example**

```typescript
const x = doo.functions.math.roundDown(2.44, 1);
doo.model.number.value = x; // 2.4
```

### `PERCENTAGE`

Numerator/Denominator \* 100, Parameters 10, 50 gives 20 (percents)

**Example**

```typescript
const x = doo.functions.math.percentage(10,50);
doo.model.number.value = x; // 20
```
