The remainder( Command

Command Summary

Same as modulus - divides a number, but returns the remainder.

Command Syntax


Menu Location


  1. MATH to enter the Math menu
  2. Use arrows to go to the NUM menu
  3. 0 to choose remainder(, or use arrows

Calculator Compatibility

TI-84+/SE with TI-OS 2.53 MP

Token Size

2 byte

The remainder( function divides the first number given by the second number, and returns the remainder similar to the modulus. This command is only available if you have the TI-84+/SE and the new 2.53 MP operating system on your calculator. This command can be used both on the Home screen and when programming.

See the code segment below for an example:


This returns a value of 2 because 30 divided by 7 has a remainder of 2.

The first input must be an integer in the range 0 to 1012 and the second must be an integer in the range 1 to 1012 (since division by zero is not allowed).


As said earlier, this command only works on a TI-84+ Silver Edition with the 2.53 MP OS, so this will not work on earlier OSes. To avoid non-portability, use the following code.


instead of


fPart( is a command that works in more OSes and more models. They also are the same size (5 bytes), as long as B is one byte.

There is one difference: remainder( is guaranteed to return the correct answer for inputs in its accepted domain, and if you enter numbers that are too large, it will throw an error. The method with fPart(, on the other hand, will work for numbers of any size that does not actually cause an overflow - but when the numbers get too large, it will give the wrong answer. Compare:


Here, the remainder( command fails because the input is out of range.. The fPart( method returns an answer, but it is wrong: 18! is not divisible by 19, because 18! is the product of the integers 1 through 18, and none of them are divisible by the prime number 19. When using fPart( as a substitute for remainder(, make sure that the inputs are within the proper range.

Error Conditions

  • ERR:DIVIDE BY 0 occurs if the divisor is zero.
  • ERR:DOMAIN occurs if the divisor or dividend is out of range: only integers between 0 and 1E12 are allowed.
  • ERR:SYNTAX occurs if the divisor or dividend is a symbol, or character or non-real number
  • ERR:DATA TYPE occurs if the divisor or dividend is not a number, (i.e. text)

Related Commands


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.