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

# ES|QL FLOOR function
## Syntax

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


## Parameters

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


## Description

Round a number down 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.floor](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html#floor(double)).
</note>


## Supported types


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


## Example

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


| a:double |
|----------|
| 1        |