Floor Function
Floor always rounds downward toward negative infinity, especially important for negative numbers.
Rounding Calculator
Enter a number and choose your rounding preferences
|
🪄 Quick Examples
📋 How It Works
How It Works
1
Step 1
Choose the target precision or place value.
2
Step 2
Drop extra digits and move downward toward negative infinity.
3
Step 3
Return a value that is never greater than the original at that precision.
📊 Examples
Worked Examples
Examples highlight where floor and truncate differ on negatives.
| Input | Target | Method | Result |
|---|---|---|---|
| 2.99 | Nearest Whole Number | Round Down (Floor) | 2 |
| -2.01 | Nearest Whole Number | Round Down (Floor) | -3 |
| 12.309 | Nearest Hundredth (2 dp) | Round Down (Floor) | 12.30 |
Tips
Common Mistakes
Avoid these frequent rounding errors when validating outputs.
- Treating floor as simple digit cut-off.
- Expecting floor to behave like nearest rounding.
- Using floor when toward-zero behavior is required.
- Ignoring sign when validating test results.
❓ FAQ
Frequently Asked Questions
Is floor the same as truncate?
No. Floor moves toward negative infinity while truncate moves toward zero.
How does floor work for negatives?
Negative numbers become more negative whenever there is a remainder.
When is floor useful?
Floor is useful for conservative lower-bound calculations.
Can I compare floor and ceiling quickly?
Yes. Related links let you test the same inputs under both methods.