Floor & Ceiling Calculator – Round Any Number
floor(x) rounds down and ceil(x) rounds up: floor(2.7)=2, ceil(2.7)=3, floor(−2.1)=−3, ceil(−2.1)=−2.
- Compare with truncation.
Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.
How the Floor and Ceiling Calculator Works
Floor and ceiling bracket a number between the integers just below and just above it. For 2.7: floor drops to 2 and ceiling rises to 3. Negatives flip intuition — floor(−2.1) = −3 (not −2!) because −3 is the greatest integer still ≤ −2.1, while ceil(−2.1) = −2. The calculator prints both functions side by side with the integer interval they form, and contrasts truncation, which merely deletes decimals and agrees with floor only for positives (trunc(−2.1) = −2 ≠ floor). Real logic leans on these functions daily: ceiling determines how many 6-person tables seat 20 guests (⌈20/6⌉ = 4), floor converts 250 seconds to whole minutes (⌊250/60⌋ = 4), and pagination computes page = ⌊index/itemsPerPage⌋. Exact integers pass through unchanged: floor(5) = ceil(5) = 5.
- 1
Enter any real number
Positive, negative, decimal — both functions are computed
- 2
Read the floor
The greatest integer less than or equal to your input
- 3
Read the ceiling
The smallest integer greater than or equal to your input
- 4
Compare with truncation
Differences appear for negative inputs
Use Cases
Capacity Planning
⌈20/6⌉ = 4 tables needed for 20 guests at 6 per table
Pagination
Page numbers come from ⌊offset/pageSize⌋
Time Conversions
⌊250/60⌋ = 4 whole minutes in 250 seconds
Tips
- 1
floor(−2.1) = −3 — negatives round away from zero on floor
- 2
ceil(b/a) answers "how many groups of a cover b"
- 3
Integers are fixed points: floor(5) = ceil(5) = 5
Common Mistakes
Assuming floor(−2.1) = −2; it is −3
Mixing up which of the two rounds toward zero for negatives
Using ceiling when whole groups are wasted — 20/6 needs 4 tables (ceil), not 3
Confusing truncation with floor for negative decimals
FAQs
What are floor(2.7) and ceil(2.7)?
What is floor(−2.1)?
How many 6-seat tables for 20 people?
Do floor and ceil change integers?
Floor vs truncation for −7.9?
Related tools
Pick another tool to continue your calculation.
Fraction Reducer – Simplify to Lowest Terms
Reduce a fraction to its simplest form.
Fraction Simplifier – GCD Steps & Mixed Numbers
Simplify fractions and get decimal value and GCD.
Fraction Calculator – Add, Subtract, Multiply, Divide
1/2 + 1/3 = 5/6 and 3/4 × 8 = 6. Add, subtract, multiply or divide fractions and get simplified results and decimals with each step shown.
Continued Fraction Calculator – Decimal to Fraction
Convert decimal to continued fraction.
Continued Fraction Evaluator – From Coefficients
Evaluate a continued fraction from its coefficients.
Cross Product Calculator
Free online calculator with instant, accurate results.