Floor and Ceiling Calculator
This floor and ceiling calculator works out the floor, the ceiling, the nearest whole number and the fractional part for any number you enter. The floor is the greatest whole number that is less than or equal to your number, and the ceiling is the smallest whole number that is greater than or equal to it, so for 3.7 the floor is 3 and the ceiling is 4. You enter a single value into the number field, using a minus sign for negative numbers, and the results update instantly as you type. The result shows the floor and ceiling together, plus the nearest integer from ordinary rounding and the fractional part, which is your number minus its floor. These functions come up constantly outside pure maths: programmers use them to size arrays and handle pagination, tradespeople use ceiling values to round material quantities up so they never run short, and students use them to check working on greatest integer function problems. Negative numbers are where the two functions most often surprise people, because the floor moves further away from zero while the ceiling moves towards it, so minus 3.7 has a floor of minus 4 but a ceiling of minus 3. Enter the default value of 3.7 to confirm the worked example, then try a negative number to see the results flip.
The formula
The floor of x, written with the down brackets, is the largest integer not greater than x. The ceiling of x, the up brackets, is the smallest integer not less than x. The fractional part is x minus the floor of x.
Worked example
For 3.7 the floor is 3 and the ceiling is 4, the nearest integer is 4, and the fractional part is 0.7. For minus 3.7 the floor is minus 4 and the ceiling is minus 3. Enter 3.7 to confirm.
Frequently asked questions
What is the floor of a number?
The greatest integer that is less than or equal to it. The floor of 3.7 is 3, and the floor of minus 3.7 is minus 4.
What is the ceiling?
The smallest integer greater than or equal to the number. The ceiling of 3.2 is 4.
How do they behave for negatives?
For minus 2.5 the floor is minus 3 (further from zero) and the ceiling is minus 2 (towards zero).
Who this calculator is for
This calculator is for students and anyone needing a quick, reliable result.
What this calculator assumes
- You enter valid numbers.
- The standard formula is applied.
- Results are rounded for display.
Formula and sources
Related calculators
- Scientific Calculator: general scientific maths.
- Percentage Calculator: percentages and changes.
- Ratio Calculator: simplify and scale ratios.
- Fixed Fee vs Percentage Fee Calculator NZ 2026/27: The balance where a flat annual fee beats a percentage fee: the break-even, each cost at any size, and how the gap gr...