RoundBench
Ceiling / Floor Calculator
Round up (ceiling), down (floor), or to the nearest integer.
Ceiling, floor and rounding compared
Ceiling always goes up, floor always goes down, and rounding goes to the nearest. The negative rows show where the three diverge most.
| Input | Ceiling | Floor | Rounded |
|---|---|---|---|
| 2.1 | 3 | 2 | 2 |
| 2.5 | 3 | 2 | 3 |
| 2.9 | 3 | 2 | 3 |
| -2.1 | -2 | -3 | -2 |
| -2.5 | -2 | -3 | -2 |
| -2.9 | -2 | -3 | -3 |
| 7.5 | 8 | 7 | 8 |
The negative rows are where intuition fails. Floor of -2.1 is -3, not -2, because floor moves toward negative infinity rather than toward zero. And -2.5 rounds to -2 rather than -3, because JavaScript's rounding breaks ties by going up in value, not away from zero - which is why 2.5 gives 3 but -2.5 gives -2 rather than the symmetric -3. That asymmetry catches people out in billing and scoring code. Use ceiling when you need enough of something, like boxes to hold items; use floor when partial units are worthless, like whole tickets affordable on a budget.
Three different kinds of 'round'
Ceiling always rounds up (⌈3.1⌉ = 4), floor always rounds down (⌊3.9⌋ = 3), and standard rounding picks whichever is nearer — three genuinely different operations that are easy to mix up.
Why the distinction matters
If you're calculating how many boxes are needed to ship 3.2 pallets' worth of goods, you need the ceiling (4 boxes) — regular rounding would incorrectly say 3 and leave goods behind.
Frequently asked questions
What is floor vs ceiling in math?
Floor (⌊x⌋) rounds DOWN to the nearest integer: ⌊3.7⌋ = 3, ⌊−2.3⌋ = −3. Ceiling (⌈x⌉) rounds UP: ⌈3.2⌉ = 4, ⌈−2.7⌉ = −2. Floor goes toward −∞, ceiling goes toward +∞. Both return integers, even for negative inputs.
When do I use ceiling vs floor?
Ceiling: 'how many boxes to fit 17 items at 5 per box?' ⌈17/5⌉ = ⌈3.4⌉ = 4. Floor: 'how many complete sets of 5 from 17 items?' ⌊17/5⌋ = 3. Use ceiling when you can't have a partial unit; floor when partial units are discarded.
How do floor and ceiling work with negative numbers?
⌊−2.3⌋ = −3 (rounds toward −∞, which is more negative). ⌈−2.3⌉ = −2 (rounds toward +∞, which is less negative). This surprises people: floor of a negative makes the number 'bigger' in absolute value.
Related Math calculators
Rounding Calculator
Round to any number of decimal places.
OpenFactorial Calculator
n! — factorial for any non-negative integer up to 170.
OpenFibonacci Calculator
Nth Fibonacci number and its ratio to the previous term.
OpenPrime Number Check
Check whether a number is prime and see its prime factorisation.
OpenLast updated: September 6, 2026