The ceiling of a real num­ber \(x,\) de­noted \(\lceil x \rceil\) or some­times \(\operatorname{ceil}(x),\) is the first in­te­ger \(n \ge x.\) For ex­am­ple, \(\lceil 3.72 \rceil = 4, \lceil 4 \rceil = 4,\) and \(\lceil -3.72 \rceil = -3.\) In other words, the ceiling func­tion rounds its in­put up to the near­est in­te­ger.

For the func­tion that rounds its in­put down to the near­est in­te­ger, see floor. Ceiling and floor are not to be con­fused with fix and ceilfix, which round to­wards and away from zero (re­spec­tively).

For­mally, ceiling is a func­tion of type \(\mathbb R \to \mathbb Z.\) The ceiling func­tion can also be defined on com­plex num­bers.