Ceiling
Function
Least Integer Function
A step function of x which
is the least integer greater than
or equal to x. The ceiling function of x is usually written
.
Sometimes this function is written with reversed floor function brackets
,
and other times it is written with reversed boldface brackets ]x[ or reversed plain brackets ]x[.
Examples:
and
.

See
also
Floor function (also called greatest integer function)
Worked Example
Problem: Find the ceiling of each value: 4.2, −3.8, and 7.
Step 1: For x = 4.2, find the smallest integer greater than or equal to 4.2. The integers near 4.2 are 4 and 5. Since 4 < 4.2, it does not satisfy n ≥ x. The next integer, 5, does satisfy 5 ≥ 4.2.
⌈4.2⌉=5 Step 2: For x = −3.8, find the smallest integer greater than or equal to −3.8. The integers near −3.8 are −4 and −3. Since −4 < −3.8, it does not qualify. But −3 ≥ −3.8, and no smaller integer also satisfies this.
⌈−3.8⌉=−3 Step 3: For x = 7, the value is already an integer. The smallest integer greater than or equal to 7 is 7 itself.
⌈7⌉=7 Answer: ⌈4.2⌉ = 5, ⌈−3.8⌉ = −3, and ⌈7⌉ = 7.
Another Example
Problem: A shipping company charges by the full kilogram, rounding any partial kilogram up. A package weighs 12.1 kg. How many kilograms does the company charge for?
Step 1: The company rounds up any fractional kilogram, which is exactly what the ceiling function does. Apply the ceiling function to 12.1.
⌈12.1⌉ Step 2: The smallest integer greater than or equal to 12.1 is 13.
⌈12.1⌉=13 Answer: The company charges for 13 kg.
Frequently Asked Questions
What is the ceiling of a negative number?
The ceiling of a negative number rounds it toward zero. For example, ⌈−2.5⌉ = −2, not −3. You still find the smallest integer that is greater than or equal to the original value. Since −2 > −2.5 and −2 is an integer, the ceiling is −2.
What is the ceiling of a whole number (integer)?
If x is already an integer, the ceiling of x is just x itself. For instance, ⌈6⌉ = 6. The function only changes the value when x has a fractional part.
Ceiling Function vs. Floor Function
The ceiling function rounds up to the nearest integer greater than or equal to x, while the floor function rounds down to the nearest integer less than or equal to x. For example, ⌈2.3⌉ = 3 but ⌊2.3⌋ = 2. For negative numbers, ⌈−2.3⌉ = −2 while ⌊−2.3⌋ = −3. When x is already an integer, both functions return x. The two are related by the identity ⌈x⌉ = −⌊−x⌋.
Why It Matters
The ceiling function appears whenever you need to round a quantity up to ensure sufficiency. For instance, if you need to transport 53 people in vans that hold 15 each, you compute ⌈53/15⌉ = ⌈3.53…⌉ = 4 vans. It is widely used in computer science for memory allocation, pagination, and algorithm analysis where partial units must be counted as whole units.
Common Mistakes
Mistake: Rounding negative numbers in the wrong direction, such as saying ⌈−2.3⌉ = −3.
Correction: The ceiling function always moves toward positive infinity (upward on the number line). Since −2 > −2.3, the correct answer is ⌈−2.3⌉ = −2.
Mistake: Confusing the ceiling function with standard rounding (round half up).
Correction: Standard rounding depends on whether the decimal part is above or below 0.5. The ceiling function always rounds up regardless of the decimal part—⌈2.01⌉ = 3, even though standard rounding would give 2.