Export (0) Print
Expand All
Expand Minimize

MODULUS Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2
Example 3
Example 4

Returns the remainder (modulus) that results when a number is divided by a divisor.

MODULUS(number,divisor)

Parameters

Name

Required/Optional

Data Type

Description

number

Required

Number

The dividend.

divisor

Required

Number

The divisor.

Return Value

Number

The result has the same sign as the divisor. A #DIV/0! error is returned if the divisor is 0.

In almost all situations, the MODULUS function should be used rather than the MOD function.

MODULUS(5, 1.4)

Returns 0.8.

MODULUS(5, -1.4)

Returns -0.6.

MODULUS(-5, 1.4)

Returns 0.6.

MODULUS(-5, -1.4)

Returns -0.8.

Show:
© 2014 Microsoft