Floor Function Calculator

Find the greatest integer less than or equal to any positive, negative, integer, or decimal value.

Calculate a floor value
Enter any finite real number to round it downward to an integer.

About the floor function

The floor function maps a real number to the greatest integer that is less than or equal to it. It is commonly written with floor brackets, but this calculator displays the notation as floor(x) for clarity in plain text. For a positive decimal such as 3.14, the greatest integer no larger than the input is 3. For an exact integer such as 5, the floor remains 5 because the input already satisfies the definition. Negative values reveal why the floor function is more precise than simply saying round down. The floor of -2.7 is -3, not -2. On a number line, -3 is the greatest integer that is still less than or equal to -2.7. Truncating the decimal digits would instead produce -2, which is greater than the original value and therefore cannot be its floor. Thinking in terms of movement toward negative infinity avoids this common mistake. Floor values are useful whenever a calculation must count only complete units. If 17 items are packed into groups of 5, only 3 complete groups can be made. If 185 seconds are converted into complete minutes, flooring 185 divided by 60 gives 3. Programmers use the same principle for pagination, array indexing, grid coordinates, time conversion, bucketing continuous measurements, and extracting integer parts under a clearly defined negative-number rule. The floor function differs from the ceiling function and ordinary rounding. Ceiling returns the smallest integer greater than or equal to the input, so ceiling of 3.14 is 4 and ceiling of -2.7 is -2. Ordinary nearest-integer rounding chooses whichever integer is closest and needs a tie-breaking convention for half values. Floor always follows one unambiguous direction regardless of distance. This calculator accepts positive numbers, negative numbers, decimals, and integers. It uses the browser's standard finite-number representation, so extremely long decimal inputs may be rounded internally before the floor is evaluated. For normal mathematical, educational, engineering, and programming values, the result directly follows the formal definition. You can verify an answer by checking that the result is an integer no greater than the input and that adding one to it would make it greater than the input.

Floor function examples

NumberFloorExplanation
3.143Three is the greatest integer no larger than 3.14.
-2.7-3Floor moves toward negative infinity, not toward zero.
88An integer is already equal to its own floor.
0.990Zero is the greatest integer not exceeding 0.99.

How to use the floor function calculator

  1. Enter a positive number, negative number, integer, or decimal.
  2. Select Calculate Floor to evaluate the input.
  3. Read the greatest integer shown in the result panel.
  4. Use Reset to clear the field for another value.

Floor function FAQ

What does the floor function return?

It returns the greatest integer less than or equal to the input. The result is always an integer even when the input contains decimals.

Why is the floor of -2.7 equal to -3?

Negative three is the greatest integer that does not exceed -2.7. Negative two is greater than the input, so it does not satisfy the definition.

Is flooring the same as truncating?

They agree for nonnegative values but can differ for negative decimals. Truncation moves toward zero, while flooring always moves toward negative infinity.

What is the floor of an integer?

Every integer is its own floor because it already is an integer less than or equal to itself. For example, the floor of 8 is 8.

How is floor different from ceiling?

Floor chooses the greatest integer no larger than the input. Ceiling chooses the smallest integer no smaller than the input, so the directions are opposite.