﻿---
title: ES|QL CEIL function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/3028/reference/query-languages/esql/functions-operators/math-functions/ceil
products:
  - Elasticsearch
---

# ES|QL CEIL function
## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/3028/reference/query-languages/esql/images/functions/ceil.svg)


## Parameters

<definitions>
  <definition term="number">
    Numeric expression. If `null`, the function returns `null`.
  </definition>
</definitions>


## Description

Round a number up to the nearest integer.
<note>
  This is a noop for `long` (including unsigned) and `integer`. For `double` this picks the closest `double` value to the integer similar to [Math.ceil](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html#ceil(double)).
</note>


## Supported types


| number        | result        |
|---------------|---------------|
| double        | double        |
| integer       | integer       |
| long          | long          |
| unsigned_long | unsigned_long |


## Example

```esql
ROW a=1.8
| EVAL a=CEIL(a)
```


| a:double |
|----------|
| 2        |