Math.ceil(value) Last updated: 30. May 2026

Always rounds a number upwards.

See also: Math.floor Math.round Math.abs

Parameters

Name Type Description
value number

Value to ceil.

Returns

A number that is rounded against ceiling.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
This becomes 1:
#Math.ceil(0.1)#

Output

The #JS code above produces the output shown below:
This becomes 1:
1