JavaScript round
Math.round() rounds a number to the nearest integer, with ties (.5) going up. It is the everyday rounding you expect.
Syntax
Math.round(num) Examples
| Input | Arguments | Output |
|---|---|---|
| 4.5 | — | 5 |
| 4.4 | — | 4 |
Try it live
Type your input and see round transform it instantly.
Want to go further? Chain round with other functions in the visual Playground — pipe one output into the next and watch your data transform.