Last updated:

# Ceiling Function Calculator

Ceiling function in mathExamples of ceiling function computationGraph of the ceiling functionFAQs

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 the most popular symbol for the ceiling function is; 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:

$\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). In fact, that is the basis of the algorithms behind our digital root calculator and Egyptian fractions calculator.

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.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.2$?

There are lots of such integers: $12, 13, 14, 15, \ldots$. But we need the smallest one. Clearly, it is $12$. So $\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$.

The integers that are greater than or equal to $-5$ are: $-5, -4, -3, \ldots$. The smallest one is $-5$, so $\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$.

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

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

As you can see from what we calculated above, the ceiling function takes a number and rounds it to the nearest integer (a special case of what we do in the rounding calculator). 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 discuss how to graph the ceiling function. Here it is, in all its glory:

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.

FAQs

### 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.