The math.ceil() function is used to get the ceiling value of a number.

The ceiling of a number is the smallest integer greater than or equal to the number. For example, the ceiling of 4.1 is 5.

math.ceil(x)

Where, x is the number whose ceiling value is to be determined.

The function returns the smallest integer greater than or equal to the input. If the input is already an integer, the return value will be same as the input.

import math

math.ceil(1)
//1
math.ceil(2.0)
//2
math.ceil(1.1)
//2
math.ceil(4.4)
//5
math.ceil(7.8)
//8
math.cel(9.6)
//10

Compare this with math.floor()  function which rounds a number down to its floor value.