Floor Function Calculator
Omni's floor function calculator is here to save your sanity if you have always believed that floors have nothing to do with mathematics and you've suddenly discovered there's something called a floor function in math. In the article below, we will:
Intuitively explain what the floor function does to a number (with examples);
Discuss what the floor function graph looks like; and
Explain various useful properties of the floor function (never again will you have to wonder if the floor function is continuous!).
As a bonus, we explain how to type the floor function in LaTeX. Ready for a ride?
🙋 Satisfied? Looking for more? We also have a ceiling function calculator. Don't forget to visit it once you're done with this floor function calculator.
What is the floor function in math?
The floor function of a real number
x is the greatest integer number that is less than or equal to
It follows that the floor function maps the set of real numbers to the set of integers: . We will now go through some examples so that you can get how this definition works in practice.
🙋 In our floor function calculator, we used the most popular way of denoting the floor function: the square brackets
[ ] with their top part missing
⌊x⌋. Sometimes, especially in programming languages, you can see the whole word typed:
Let's compute the floor of .
We pose the question dictated by the definition of the floor function: what are the integers that are less than (or equal to) ?
There are lots of such integers: . But we need the biggest one. Clearly, it is . So .
Let's compute the floor of .
The integers that are less than or equal to are: . The biggest one is , so . Note how crucial it is here to remember the "or equal to" part of the definition!
The last challenge — the floor of a negative number! Let's compute the floor of .
What are the integers that are less than (or equal to) ?
If you think for a bit, you can easily see that the desired integers are . The biggest one is , and so .
As you can see in the above examples, we can also think of the floor function as rounding the number down to the nearest integer. That's the most intuitive way of understanding what the floor function does to a number. Many more rounding procedures are explained in our rounding calculator.
Now, if you want to see more examples, use our floor function calculator — just throw some numbers at it and see what it spits out.
Properties of floor function
The floor function has some important properties.
- The floor of a number is less than a number but not too much:
- A number is greater than its floor but not too much:
- Integers can be taken out of the floor freely:
- The floor function is idempotent:
- The floor function is non-decreasing:
- The floor function is closely related to its sibling, the ceiling function :
Don't hesitate to test these claims with Omni's floor function calculator! Now, let's discuss the graph of the floor function.
Graph of the floor function
The floor function makes a funny graph: it belongs to the category of the so-called step-functions, and you can easily guess why if you take a look:
Just in case, let's recall what the different dot symbols mean in the context of function graphs:
- Filled dot means "including";
- Empty dot means "not including".
For instance, at we see an empty dot at and a filled dot at . This means that the value of the floor function at is equal to and not .
Is the floor function continuous?
No, the floor function is not continuous: its points of discontinuity are all integer numbers.
Is the floor function one to one?
No, the floor function is not one-to-one. This is because the floor function maps the whole interval
[n, n+1) to
n. Hence, many numbers are mapped to one number. Technically speaking, the floor function is not injective.
How do I type floor function in LaTeX?
The LaTeX code for
\lfloor and that for
\rfloor. Hence, to get
⌊x⌋ you can type
\lfloor x \rfloor.
What is the floor of pi?
The floor of the number pi is 3. This is because pi is approximately equal to
3.14, and so the greatest integer that is less than pi is
How do I calculate the floor of a number?
To determine the floor of a number:
- If your number is an integer, it is equal to its floor. In other words, you're done!
- If you're dealing with a non-integer, then write down the integers that are smaller than your number.
- Pick the greatest among the integers you've found in the previous step.
- That's it! You've calculated the floor of your number.