Skip to main content Accessibility Feedback

Numbers

Math.ceil()

Returns the smallest integer (whole number) greater than or equal to a number.

// returns 42
Math.ceil(42);

// returns 4
Math.ceil(3.14);

// Returns -3
Math.ceil(-3.14);

Works back to at least IE6.