ceiling()

Table of Contents

Definition

ceiling() rounds up a numerical value to the next highest integer. You can also use ceil() abbreviation which functions in the same way.

For other rounding functions, you can use round() or floor().

Examples

The following example rounds up the value in 'test' column with ceiling() and returns the result in a separate column.

| makeresults
| eval test = 5.5
| eval testCeil = ceiling(test)
Screenshot of the previous example’s result. It shows 6 in testCeil column.

The following example rounds up 5.1 with ceil() and returns 6 as the result.

| makeresults
| eval test = ceil(5.1)
Screenshot of the previous example’s result

Further Reading