gives the smallest integer greater than or equal to x.


gives the smallest multiple of a greater than or equal to x.


  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • Ceiling[x] can be entered in StandardForm and InputForm as x, lc rc or
    \[LeftCeiling]x \[RightCeiling].
  • Ceiling[x] returns an integer when is any numeric quantity, whether or not it is an explicit number.
  • For exact numeric quantities, Ceiling internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Ceiling applies separately to real and imaginary parts of complex numbers.
  • Ceiling automatically threads over lists.


open allclose all

Basic Examples  (3)

Round up to the nearest integer:

Round up to the nearest multiple of 10:

Plot the function over a subset of the reals:

Scope  (24)

Numerical Evaluation  (6)

Evaluate numerically:

Complex number inputs:

Single-argument Ceiling always returns an exact result:

The two-argument form tracks the precision of the second argument:

Evaluate efficiently at high precision:

Ceiling threads elementwise over lists:

Ceiling can deal with realvalued intervals:

Specific Values  (6)

Values of Ceiling at fixed points:

Value at zero:

Value at Infinity:

Evaluate symbolically:

Manipulate Ceiling symbolically:

Find a value of x for which the Ceiling[x]=2:

Visualization  (4)

Plot the Ceiling function:

Visualize the two-argument form:

Plot Ceiling in three dimensions:

Visualize Ceiling in the complex plane:

Function Properties  (4)

Ceiling is defined for all real and complex inputs:

Floor can produce infinitely large and small results:

TraditionalForm formatting:

Use lc and rc to enter a short notation for Ceiling:

Differentiation and Integration  (4)

First derivative with respect to x:

First derivative with respect to a:

Definite integrals of Ceiling:

Series expansion:

Applications  (4)

Selfcounting sequence:

Minimal number of elements in a box according to the pigeonhole principle:

Properties & Relations  (9)

Negative numbers round up to the nearest integer above:

Convert Ceiling to Piecewise:

Denest Ceiling functions:

Reduce equations containing Ceiling:

Ceiling function in the complex plane:

Ceiling can be represented as a DifferenceRoot:

The generating function for Ceiling:

The exponential generating function for Ceiling:

Possible Issues  (1)

Ceiling does not automatically resolve the value:

Neat Examples  (1)

Convergence of the Fourier series of Ceiling:

Introduced in 1988
Updated in 1996