Floor and ceiling functions are two important functions that are used frequently in mathematics and computing. The floor function assigns to each input an integer number that is equal or less than the input. The ceiling function assigns to each input an integer number that is equal or greater than the input.

In this article, we will look at more detailed definitions of these functions. We will also learn about their properties. Finally, we will look at their graphs along with several examples with answers.

## Definition of floor and ceiling functions

### Definition of ceiling function

A ceiling function is a function in which the smallest successive integer is returned. In other words, the ceiling function of a real number *x* is the smallest integer that is greater than or equal to the number *x*.

The notation used to represent the ceiling function is . Therefore, the ceiling function is written as .

### Definition of floor function

The floor function is defined as a function that returns the largest integer that is less than or equal to *x*. The notation used to represent the floor function is . Therefore, the floor function is written as .

### EXAMPLES

## Properties of floor and ceiling functions

The floor and ceiling functions have many useful and interesting properties. The following are some of the most important. Here, *n* is an integer:

- only if
- only if
- only if
- only if

## Formulas of floor and ceiling functions

### Ceiling function formula

The formula to find the ceiling value for any specified value is:

minimum {}

This means that the function returns the minimum integer that is greater than or equal to *x*. This is represented by:

smallest successive integer of *x*

### Floor function formula

The formula to find the floor value for any specified value is:

minimum {}

This means that the function returns the maximum integer that is less than or equal to *x*. This is represented by:

greatest successive integer of *x*

Start now: Explore our additional Mathematics resources

## Graphs of floor and ceiling functions

The graphs of the floor and ceiling functions have a shape that resembles stairs and have a discontinuity at each whole number point.

The following is the graph of the floor function:

The following is the graph of the ceiling function:

## Floor and ceiling functions – Examples with answers

### EXAMPLE 1

Apply the ceiling function to 3.4 and to -3.4.

**Solution:** We have and .

The ceiling function of a real number is the smallest integer that is greater than or equal to *x*. In the case of 3.4, the larger integers are 4, 5, 6… The smallest of these is 4.

In the case of -3.4, the larger integers are -3, -2, -1, … The smallest of these is -3.

### EXAMPLE 2

What is the result of ?.

**Solution:** In this case, we have to find the largest integer that is equal to or less than .

We know that .

Therefore, we have .

This means that, .

### EXAMPLE 3

Solve the equation .

**Solution:** We can solve this problem more easily by using the substitution . Therefore, we have the equation:

Using the identity , we have the following:

⇒

⇒

The last equation means that . When returning to the variable *x*, we have:

⇒

⇒

## Floor and ceiling functions – Practice problems

## See also

Interested in learning more about functions? Take a look at these pages:

### Learn mathematics with our additional resources in different topics

**LEARN MORE**