Ceiling Function Calculator

Created by Anna Szczepanek, PhD
Reviewed by Rijk de Wet
Last updated: May 11, 2022

Welcome to Omni's ceiling function calculator — the perfect place to fall in love with this popular math operation. In the short article below, we not only give the formal definition of the ceiling function, but also

  • Explain intuitively what the ceiling function does to a number;
  • Show how to graph the ceiling function;
  • Discuss what is the most popular symbol for the ceiling function; and
  • Go together through some examples of ceiling function computation.

Ceiling function in math

The ceiling function maps a real number x to the smallest integer number that is greater than or equal to x:

x=min{nZ:nx}\footnotesize \lceil x\rceil =\min \{n\in \mathbb {Z} \colon n\geq x \}

🙋 In the formula above you can see the most widespread ceiling function symbol. It looks like square brackets [ ] with their bottom part missing (so what remains is the... ceiling! Clever, right?). In programming languages, you most often find this function under the command ceil(x).

To get a better understanding of the ceiling function definition, let's go through a few examples together.

Examples of ceiling function computation

Example 1

Let's compute the ceiling of 11.211.2.

We pose the question dictated by the definition of the ceiling function: what are the integers that are greater than (or equal to) 11.211.2?

There are lots of such integers: 12,13,14,15,12, 13, 14, 15, \ldots. But we need the smallest one. Clearly, it is 1212. So 11.2=12\lceil 11.2 \rceil = 12. Don't forget that you can verify this result with the ceiling function calculator!

Example 2

Let's compute the ceiling of 5-5.

The integers that are greater than or equal to 5-5 are: 5,4,3,-5, -4, -3, \ldots. The smallest one is 5-5, so 5=5\lceil -5 \rceil = -5. Note how crucial it is here to remember the "or equal to" part of the definition!

Example 3

The last challenge — the ceiling of a non-integer negative number! Let's compute the ceil of 2.3-2.3.

What are the integers that are greater than (or equal to) 2.3-2.3?

If you think for a bit, you can easily see that the desired integers are 2,1,0,1-2, -1, 0, 1\ldots. The smallest one is 2-2, and so 2.3=2\lceil -2.3 \rceil = -2.

As you can see from what we calculated above, the ceiling function rounds a number up to the nearest integer. If we're already at an integer, there's no need for rounding, and so the ceil function does not affect integers. Logical, right?

🙋 Not enough examples? To generate more, you can put random numbers into our ceiling function calculator and see what comes out!

Graph of the ceiling function

Once you're done playing with our ceiling function calculator, it's high time we discussed how to graph the ceiling function. Here it is, in all its glory:

Graph of the ceiling function.
Omegatron, CC BY-SA 3.0, via Wikimedia Commons

Looking at it, you can easily guess why we say that the ceiling function (along with its cousin, the floor function) belongs to the family of so-called step-functions.


What does the ceil function do?

The ceil function transforms a real number into the smallest integer that is greater than or equal to this number. It's like rounding a number up to the nearest integer.

What is the domain of the floor and ceiling function?

The domain of the floor and ceiling function is the set of all real numbers. The image, in turn, is the set of integers.

How do I type the ceiling function in LaTeX?

The LaTeX code for is \lceil, and for it's \rceil. Hence, to get ⌈x⌉ you can type \lceil x \rceil.

What is the ceiling of pi?

The ceiling of the number pi is 4. This is because pi is approximately equal to 3.14, and so the smallest integer that is greater than pi is 4.

How do I calculate the ceiling of a number?

To determine the ceiling of a number:

  1. If your number is an integer, then the ceiling is equal to this number. You're done!
  2. Otherwise, write down the integers that are greater than your number.
  3. Pick the smallest of the integers you've written down.
  4. That's it! You've found the ceiling of your number.
Anna Szczepanek, PhD
Ceiling of x
Check out 60 similar arithmetic calculators ➗
Absolute valueAdditionAssociative property… 57 more
People also viewed…

Area of a circle

The area of a circle calculator will compute the surface of a circle using a radius or a diameter.

Black Friday

How to get best deals on Black Friday? The struggle is real, let us help you with this Black Friday calculator!

Korean age

If you're wondering what would your age be from a Korean perspective, use this Korean age calculator to find out.

Magic square

Our magic square calculator won't help you with your spells, but if you need to spice up your numbers, it's the tool for you!
Omni Calculator
Copyright by Omni Calculator sp. z o.o.
Privacy policy & cookies
main background