Formualizer Docs
ReferenceFunctionsMath Functions

MOD

MOD: Returns the remainder after division, with the sign of the divisor.

Summary

Returns the remainder after division, with the sign of the divisor.

Remarks

  • If divisor is 0, returns #DIV/0!.
  • Result sign follows Excel-style MOD semantics (sign of divisor).
  • Errors in either argument are propagated.

Examples

Positive divisor
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
1
Negative dividend
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
1

FAQ

Why can MOD return a positive value for a negative dividend?

MOD follows the sign of the divisor, matching Excel's modulo semantics.

Runtime metadata

Category

Math

Signature

MOD(arg1: Number, arg2: Number)

Arity

min 2, max 2

Arguments

arg1

Number · Scalar · coercion NumberLenientText

arg2

Number · Scalar · coercion NumberLenientText

Caps

PURE

Source

On this page