Floor Function Calculator
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 x:
It follows that the floor function maps the set of real numbers to the set of integers: floor: R→Zfloor: R→Z. 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: floor(x).
Examples
Example 1
Let's compute the floor of 21.321.3.
We pose the question dictated by the definition of the floor function: what are the integers that are less than (or equal to) 21.321.3?
There are lots of such integers: 21,20,19,18,…21,20,19,18,…. But we need the biggest one. Clearly, it is 2121. So ⌊21.3⌋=21⌊21.3⌋=21.
Example 2
Let's compute the floor of 77.
The integers that are less than or equal to 77 are: 7,6,5,…7,6,5,…. The biggest one is 77, so ⌊7⌋=7⌊7⌋=7. Note how crucial it is here to remember the "or equal to" part of the definition!
Example 3
The last challenge — the floor of a negative number! Let's compute the floor of −1.3−1.3.
What are the integers that are less than (or equal to) −1.3−1.3?
If you think for a bit, you can easily see that the desired integers are −2,−3,−4,…−2,−3,−4,…. The biggest one is −2−2, and so ⌊−1.3⌋=−2⌊−1.3⌋=−2.
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 ⌈x⌉⌈x⌉:
Don't hesitate to test these claims with 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 x=1x=1 we see an empty dot at y=0y=0 and a filled dot at y=1y=1. This means that the value of the floor function at x=1x=1 is equal to y=1y=1 and not y=0y=0.
FAQs
- 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 ⌊ is \lfloor and that for ⌋ is \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 3.
- 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.
Related calculators
Remainder
Use the remainder calculator to find the quotient and remainder of division.
Math
Slope
Calculate the slope of a line from two given points using the slope calculator. Discover the slope formula and learn how to find a slope with two points.
Math
Average
Calculate the average (mean) with our user-friendly tool. Discover how to find averages or perform quick calculations effortlessly.
Math
Circumference
Use this free circumference calculator to find the area, circumference and diameter of a circle.
Math