The ceiling() Command


Command Summary

Returns the ceiling of a number.

Command Syntax


Menu Location

  • Press 2nd MATH to enter the MATH popup menu.
  • Press 1 to enter the Number submenu.
  • Press 7 to select ceiling(.

Calculator Compatibility

This command works on all calculators.

Token Size

1 byte

The ceiling() command rounds a number up to the nearest integer at least as large as the number. For instance, ceiling(π) returns 4, while ceiling(-π) returns -3.

There are several commands available to round a number to an integer in very slightly different ways:

  • int() and floor() — like ceiling(), but round down instead.
  • iPart() — truncates a number to just its integer part (or, if you prefer, rounds a number toward 0).
  • round() — rounds to a specific place value, not just to an integer, but round(x,0) will round x to the nearest integer, up or down.

ceiling() can also be applied to complex numbers, lists, and matrices, rounding everything that there is to round in each of them.

           {-3  4}

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License