Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

Mod

  • Last UpdatedAug 14, 2026
  • 1 minute read

Mod returns the remainder from a division operation.

Group

Sync / Async Exec

String Exp?

Windows Support

Windows Embedded Support

IoT View Support

Thin Client Support

Mobile Access Support

Arithmetic

Sync

Yes

Yes

Yes

Yes

Yes

Yes

Syntax

Mod(numNumerator, numDenominator)

numNumerator

The numerator of the division operation. Decimal value will be truncated to whole numbers.

numDenominator

The denominator of the division operation. Decimal value will be truncated to whole numbers.

Return value

Returns the remainder (as a real number) after dividing numNumerator by numDenominator. Use the Div to get the whole number dividend of the operation.

Examples

As used in a Math worksheet:

Tag Name

Expression

numValue

Mod( 50, 4 ) // Returned value = 2

numValue

Mod( 16, 4 ) // Returned value = 0

numValue

Mod( 100, 8.2 ) // Returned value = 1.600

In This Topic