How to calculate
Evaluate parentheses and exponents first. At the next level, evaluate multiplication, division, and modulo left to right. Then add or subtract.
Worked example
Use Expression 7 + 12 mod 5 × 3. The result is 13.
Input and result notes
Use mod or % for a binary remainder operation. Its operands must be integers and it returns a nonnegative remainder.