Skip to main content
Version: Streamsheets 3.0

MOD

Returns the remainder of given number after it was divided by specified divisor. The result has the same sign as divisor.

Syntax

=MOD(Number, Divisor)

Arguments

NameTypeDescription
NumberNumberThe number for which the remainder should be calculated.
DivisorNumberThe number by which the Number should be divided

Return

TypeDescription
NumberThe remainder of applied division. Note: it always has the same sign as divisor.

Examples

FormulaResultComment
=MOD(3, 2)
1Remainder of 3/2
=MOD(-3, 2)
1Same sign as divisor
=MOD(3, -2)
-1Same sign as divisor