ok.OK UtilityA LITTLE EVERYDAY MAGIC

Modulo Calculator

Modulo Calculator: Find the signed remainder after dividing one value by another.

Enter your calculation

How to use Modulo Calculator

Find the signed remainder after dividing one value by another.

  1. Enter First value, Second value.
  2. Use a positive divisor; a negative dividend can return a negative remainder under this tool's convention.
  3. Select Calculate and review the Modulo answer.

Example: Using First value = 12; Second value = 4, the result is 0.

How it is calculated: The result uses the JavaScript remainder convention: a − trunc(a/b) × b; its sign follows the dividend. This tool requires a positive divisor.

Understanding the result

This page uses a signed remainder convention. It subtracts an integer quotient truncated toward zero, which can differ from the nonnegative modulo convention used in some textbooks or languages.

A calculation you can check

-7 divided by 3 has a truncated quotient of -2 and remainder -1 in this tool.

What to check before using the answer

  • The divisor must be positive. Use a separate normalization such as ((remainder+divisor)%divisor) if your task requires a nonnegative result.

Guidance updated . Methods and corrections

Are my inputs saved?

Your calculation values and selected files are not stored. Recent and saved tools keep tool identifiers; your market preference keeps only its country code in this browser.

Can I switch to a related tool?

Use the grouped tool selector above the form. Each tool has its own URL, and your browser’s Back button returns to the previous tool.

Search the complete directory ESC to close
Your everyday toolkit