> ## Documentation Index
> Fetch the complete documentation index at: https://docs.farmtrace.co.za/llms.txt
> Use this file to discover all available pages before exploring further.

# Rounding functions

> Round numbers, durations, and times to a chosen significance.

All three functions accept an optional significance. The default is `1`. The return type matches the value being rounded.

## `Ceil`

Rounds a value upward toward positive infinity.

* **Syntax:** `Ceil(value[, significance])`
* **Requires:** a Numeric, Duration, or Time value and an optional non-zero Numeric or Duration significance. Use a Duration significance when rounding a Duration or Time to an interval.
* **Returns:** the same type as `value`.
* **Best for:** minimum billable units and always-round-up quantities.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Ceil(12.1)
Ceil(Minutes(61), Minutes(15))
```

## `Floor`

Rounds a value downward toward negative infinity.

* **Syntax:** `Floor(value[, significance])`
* **Requires:** a Numeric, Duration, or Time value and an optional non-zero Numeric or Duration significance. Use a Duration significance when rounding a Duration or Time to an interval.
* **Returns:** the same type as `value`.
* **Best for:** completed intervals and lower-bound bucketing.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Floor(12.9)
Floor([Elapsed], Minutes(5))
```

## `Round`

Rounds a value to the nearest significance; halfway values round away from zero.

* **Syntax:** `Round(value[, significance])`
* **Requires:** a Numeric, Duration, or Time value and an optional non-zero Numeric or Duration significance. Use a Duration significance when rounding a Duration or Time to an interval.
* **Returns:** the same type as `value`.
* **Best for:** display values, standard measurement steps, and nearest time intervals.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Round(12.5)
Round([Start Time], Minutes(15))
```

<Warning>
  A significance of zero is invalid.
</Warning>
