JavaScript floor

Math.floor() rounds a number DOWN to the nearest integer . "floor". 4.9 becomes 4, and -4.1 becomes -5.

Syntax

Math.floor(num)

Examples

Input Arguments Output
4.9 4

Try it live

Type your input and see floor transform it instantly.

floor()

Type above to see the result…

Want to go further? Chain floor with other functions, pipe one output into the next and watch your data transform in the visual Playground.

Related functions

© 2026 Heifara Buval