Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate Microsoft Fabric, Power BI, SQL, and AI community-led event. March 31 to April 2, 2025.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: Calculated column Calculated table Measure Visual calculation
Returns the remainder after a number is divided by a divisor. The result always has the same sign as the divisor.
MOD(<number>, <divisor>)
Term | Definition |
---|---|
number |
The number for which you want to find the remainder after the division is performed. |
divisor |
The number by which you want to divide. |
A whole number.
If the divisor is 0 (zero), MOD returns an error. You cannot divide by 0.
The MOD function can be expressed in terms of the INT function: MOD(n, d) = n - d*INT(n/d)
The following formula returns 1, the remainder of 3 divided by 2.
= MOD(3,2)
The following formula returns -1, the remainder of 3 divided by 2. Note that the sign is always the same as the sign of the divisor.
= MOD(-3,-2)
Math and Trig functions ROUND function ROUNDUP function ROUNDDOWN function MROUND function INT function
Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate Microsoft Fabric, Power BI, SQL, and AI community-led event. March 31 to April 2, 2025.
Register today