The iPart( Command

Command Summary

Returns the integer part of a value.

Command Syntax


Menu Location


  1. MATH to access the math menu.
  2. RIGHT to access the NUM submenu
  3. 3 to select iPart(, or use arrows.

Calculator Compatibility


Token Size

1 byte

iPart(value) returns the integer part of value. Also works on complex numbers, lists and matrices.


The difference between iPart( and int( is subtle, and many people aren't even aware of it, but it exists. Whereas iPart( always truncates its parameters, simply removing the integer part, int( always rounds down. This means that they return the same answers for positive numbers, but int( will return an answer 1 less than iPart( for (non-integer) negative numbers. For example, iPart(-5.32) is -5, while int(-5.32) is -6.

Most of the time, however, you're dealing with only positive numbers anyway. In this case, the decision to use iPart( or int( is mostly a matter of preference - some people only use int( because it is shorter, some people use iPart( when there is a corresponding fPart( taken. However, see the Command Timings section.

Advanced Uses

iPart(, along with fPart( and int(, can be used for integer compression.

Command Timings

The following table compares the speeds of int( and iPart(. Each command was timed over 2000 iterations to find a noticeable difference.

Format Bars Pixels Total
iPart(1 10 1 81
iPart(1.643759 10 1 81
int(1 8 7 71
int(1.643759 10 2 82

Conclusion: Unless there are 6 or more decimals, you should consider using int( because of its speed, but with a lot of decimals, iPart( stays the same so it goes faster.

Related Commands

See Also


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