Floor and Ceiling Function Calculator

Work out ⌊x⌋ and ⌈x⌉ for any number, with rounding and the fractional part.

Your details

Your data stays in your browser

Result

Enter the number, then press “Calculate”.

Analysis and suggestions

Once calculated, this shows what your result means and suggestions based on your numbers.

Behind the result

Work out ⌊x⌋ and ⌈x⌉ for any number, with rounding and the fractional part.

Example · ⌊x⌋ أكبر عدد صحيح ≤ x | ⌈x⌉ أصغر عدد صحيح ≥ x

⌊3.7⌋ = 3, ⌈3.7⌉ = 4

How it is calculated

Comprehensive Calculator Guide

This calculator gives the floor ⌊x⌋, the largest integer not above x, and the ceiling ⌈x⌉, the smallest integer not below it, with rounding, truncation and the fractional part. ⌊3.7⌋ = 3, ⌈3.7⌉ = 4, and ⌊−3.7⌋ = −4.

Floor and ceiling

The floor always goes down the number line, the ceiling up. Truncation goes toward zero, so it differs from the floor for negatives. 45 students in buses of 20 need ⌈45/20⌉ = 3 buses.

How to Use

  1. Enter the number.
  2. Negatives are fine.
  3. Press “Calculate” to see the floor, ceiling, rounding, truncation and fractional part.

Formula Used

⌊x⌋ = largest integer ≤ x | ⌈x⌉ = smallest integer ≥ x

Practical Examples

Example 1
3.7: 3 and 4.
Example 2
−3.7: −4 and −3.
Example 3
5: all 5.

Important Tips

  • Draw the number line for negatives.
  • Ceiling for how many you need, floor for how many fit.
  • Code floor and trunc differ for negatives.

Common Mistakes to Avoid

  • ⌊−3.7⌋ = −3.
  • Confusing ceiling with rounding.
  • Forgetting integers are their own floor.

Frequently Asked Questions

⌊2.9⌋?
2.
⌈−2.1⌉?
−2.
Floor vs rounding?
Floor always goes down.

Read Also

Results are estimates for educational purposes and may vary depending on your situation and data sources.