Floor Calculator
Always Rounding Down
The floor function is the mirror image of ceiling: it rounds a number down to the nearest whole integer, regardless of how close it is to the next one up. Programming languages lean on floor constantly for integer division and array indexing, where a fractional result needs to be truncated toward the smaller whole number rather than rounded conventionally.
The Formula
⌊x⌋ (round down to the nearest integer)
For negative numbers, rounding "down" moves away from zero: the floor of −4.8 is −5, not −4, since −5 is the largest integer that is still less than or equal to −4.8.
Where Floor Rounding Is Used
- Integer division — floor division in programming discards the remainder by rounding the quotient down.
- Age and elapsed-time calculation — someone is only considered a full year older once a birthday has fully passed, which is a floor operation on elapsed time.
- Inventory and batching — determining how many complete batches fit into available stock, discarding the partial remainder.
- Array and grid indexing — converting a continuous coordinate into a discrete grid cell index.
| Input | Floor |
|---|---|
| 4.8 | 4 |
| −4.8 | −5 |
| 7 | 7 |
How to Use This Calculator
- Enter a number in the Number field.
- Select Calculate to see the floor value.
Related Calculations
Need to round up instead? See the Ceiling Calculator. For sign-independent magnitude, see the Absolute Value Calculator.