Mod - script and chart function

Mod() is a mathematical modulo function that returns the non-negative remainder of an integer division. The first argument is the dividend, the second argument is the divisor, Both arguments must be integer values.

Syntax:  

Mod(integer_number1, integer_number2)

Return data type: integer

Limitations:  

integer_number2 must be greater than 0.

Examples and results:  

Examples Results

Mod( 7,2 )

Returns 1

Mod( 7.5,2 )

Returns NULL

Mod( 9,3 )

Returns 0

Mod( -4,3 )

Returns 2

Mod( 4,-3 )

Returns NULL

Mod( -4,-3 )

Returns NULL

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?