---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Math.floor()

The **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.

## Syntax

```js
Math.floor(x)
```

### Parameters

- `x`
  - : A number.

### Return value

The largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).

## Description

Because `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).
