Ceiling Function Calculator
Find the ceiling ⌈x⌉ of any real number: the smallest integer greater than or equal to it. Handles negatives correctly, so ⌈−3.2⌉ is −3, not −4.
Ceiling Function Calculator
Background.
Some answers only make sense as whole numbers, and some of those have to be rounded up however small the fraction. If 130 students are travelling in 50-seat buses, 2.6 buses is not an option and 2 buses leaves 30 students behind; you need 3. That round-up-to-the-next-whole-number operation is the ceiling function, written ⌈x⌉. The name and the half-bracket notation come from Kenneth Iverson, who introduced ceiling together with its partner, floor, in 1962.
Formally, ⌈x⌉ is the smallest integer greater than or equal to x. Three consequences of that definition catch people out. Whole numbers stay where they are: ⌈7⌉ = 7, because 7 is itself an integer at least as large as 7. Any fraction, however tiny, pushes the answer up a full step: ⌈2.0000001⌉ = 3. And up means toward positive infinity, not away from zero, so ⌈−3.2⌉ = −3. Ordinary rounding, which would turn 3.2 into 3, plays no part.
Ceiling turns up wherever things come in indivisible units and running short is not acceptable: boxes to ship an order, rolls of wallpaper, screens of results at 20 per page, parking billed per started hour. Computers use it to size memory and storage; a 10,000-byte file stored in 4,096-byte blocks occupies ⌈10,000 ÷ 4,096⌉ = 3 of them. In mathematics it sits inside counting arguments such as the pigeonhole principle: share n items among k boxes and at least one box must hold ⌈n/k⌉ or more.
Enter any real number between minus one billion and one billion and the page returns its ceiling as a single integer.
What is ceiling function calculator?
The ceiling of a real number x, written ⌈x⌉ or ceil(x), is the least integer n with n ≥ x. Equivalently, it is the one integer satisfying ⌈x⌉ − 1 < x ≤ ⌈x⌉. On a number line you find it by moving right from x until you land on an integer, or staying put if x already is one. Ceiling mirrors the floor function through the identity ⌈x⌉ = −⌊−x⌋. For any number that is not an integer, the ceiling is exactly one more than the floor; for integers the two are equal.
How to use this calculator.
- Type the number into Real value. Decimals and negative numbers are both accepted, anywhere from −1,000,000,000 to 1,000,000,000.
- If your question is a division — people per car, items per box — do the division first and enter the quotient, for example 130 ÷ 50 = 2.6.
- When a quotient ought to be exactly a whole number, enter it exactly. A carried-over 6.0001 that should have been 6 will come back as 7.
- Read the result, a single integer. For a negative input it lies closer to zero than the input does: −7.9 gives −7.
The formula.
⌈x⌉ = the least integer n such that n ≥ x. In practice, if x is already an integer the answer is x; otherwise drop the fractional part and, for a positive number, add 1. For a negative number, dropping the fractional part is already the answer, because truncating −3.2 to −3 moves it upward. The identity ⌈x⌉ = −⌊−x⌋ covers both cases at once. A few properties help when you work with ceilings algebraically: adding a whole number passes straight through, so ⌈x + 3⌉ = ⌈x⌉ + 3; the ceiling is never below x and exceeds it by less than 1; and for positive integers a and b, ⌈a/b⌉ = ⌊(a + b − 1)/b⌋, the trick programmers use to round an integer division up without any decimals. The ceiling is applied directly to the decimal value you type, so no binary rounding error creeps in between your input and the answer.
A worked example.
Sixteen friends are driving to a match in cars with five seats each. The division 16 ÷ 5 = 3.2 is the page's example value. The integers greater than or equal to 3.2 are 4, 5, 6 and upward; the least of them is 4, so ⌈3.2⌉ = 4 and four cars are needed. The floor of 3.2 is 3, exactly one less, as it is for every number that is not an integer. Ordinary rounding would say 3 cars, which seat 15 and leave 1 friend at home — the whole reason to use the ceiling here. Had the value been −3.2 instead, the ceiling would be −3, since moving up from −3.2 reaches −3 first.
Frequently asked questions.
What is the ceiling of a negative number?
Is the ceiling the same as Excel's ROUNDUP?
Why does my program return 111 when I round 1.1 × 100 up?
How do I round up to two decimal places or to the next multiple of 5?
How do ceiling, floor and truncation differ?
References& sources.
- [1]OpenStax, Rice University. College Algebra 2e, 2021. Algebra and function chapters. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- ceil(x) is the least integer greater than or equal to x
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled