# typesetting modulus operator, as in remainder

Is there a standard way to typeset the modulus operator (as in arithmetic remainder)? The percent sign (%) is often used by programming languages and mathematicians tend to use mod, but because of the romanization of mod, this notation can be confusing when used inline with text as in

So long as T mod n = 0 (i.e., the quantity is an integral multiple of n)...


I am currently using $T\mod{}n=0$, which places more space between the first argument and mod than between mod and the second argument.

• You can omit the {}, just leave a space. For inline re-writing the sentenece and using "remainder" will read better. If the remainder of T/n = 0 .... Commented Jan 30, 2012 at 22:37
• \mod is defined by amsmath and it has an argument. But it's intended for things like $a\equiv b\mod{n}$, not for denoting the "remainder" operation. It's the "unparenthesized" version of \pmod, which is more commonly used. Commented Jan 30, 2012 at 23:02
• @YiannisLazarides Don't mix symbols and words like that: "If the remainder of $T/n=0$" would be parsed as talking about the remainder of the object $T/n=0$, which doesn't make sense. It's better to write "If the remainder of $T/n$ is zero" to avoid this. Commented Jan 27, 2015 at 16:19
• @DavidRicherby Of course you right David. Easy for the mind to be tricked. Commented Jan 27, 2015 at 16:53
• @DavidRicherby: the object $T/n$ is not the right one either; for example $3/3$ is $1$, so what is the remainder of $1$. We want discuss the remainder of $T$ modulo $n$, a function of two arguments. Commented Jul 21, 2021 at 16:44

\bmod is designed for mod used as a binary op.
If you want to actually use the percent symbol as an operator, you can use \mathbin{\%} to typeset it properly as a binary operator.