We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
If this tool helped you, you can buy us a coffee ☕
Calculate the remainder of two numbers after division. A free online modulo calculator supporting both positive and negative integer modulo operations.
Quotient truncated towards zero; remainder has same sign as dividend.
Formulas
a mod n = a - q × n
Where q is the quotient and n is the divisor. Different modulo modes use different rounding rules, which may lead to different results.
| Modulo Mode | Remainder |
|---|---|
| Truncated (C / JS / Java %) | 2 |
| Floored (Python %) | 2 |
| Euclidean (Non-negative remainder) | 2 |
Calculating the remainder of large numbers by hand is slow and prone to errors. With our modulo calculator, simply enter the dividend and divisor to instantly get the exact remainder (the result of the modulo operation). The modulo operation is defined as a mod b = r, where a is the dividend, b is the non-zero divisor, and r is the remainder, satisfying 0 ≤ r < |b|. This tool strictly follows mathematical definitions, making remainder calculations effortless.
This tool only supports integer inputs; it does not support modulo operations for decimals or fractions. The divisor must be a non-zero integer. The results are based on mathematical definitions. Note that some programming languages (like the % operator in C/Java) may return a negative remainder, so please use accordingly based on your context. All calculations are performed locally in your browser without uploading any data, ensuring your privacy.
Modulo operations are ubiquitous in computer science: checking for even/odd numbers (n mod 2), hash functions, circular buffer indexing, leap year calculations, and more. In cryptography, modular exponentiation (like RSA) relies on large number modulo operations. This tool serves as a quick aid for learning or verification: for example, 17 mod 5 = 2, and 100 mod 7 = 2. If you need to verify multiple equations consecutively, just modify the inputs directly without refreshing the page.

Inverse Trigonometric Function Calculator
Accurately calculate radian values for inverse trig functions like arcsin and arccos. Supports 6 function types and custom decimal precision.

Least Common Multiple (LCM) Calculator
Quickly calculate the least common multiple (LCM) of two or more integers. Supports space-separated number list input.

Trigonometry Calculator
Calculate six trigonometric functions from radian values with custom decimal precision.

Prime and Composite Number Calculator
Instantly identify prime, composite, or special numbers. Supports batch checking and mathematical property analysis.

Inverse Trigonometric Function Calculator
Accurately calculate radian values for inverse trig functions like arcsin and arccos. Supports 6 function types and custom decimal precision.

Least Common Multiple (LCM) Calculator
Quickly calculate the least common multiple (LCM) of two or more integers. Supports space-separated number list input.

Trigonometry Calculator
Calculate six trigonometric functions from radian values with custom decimal precision.

Prime and Composite Number Calculator
Instantly identify prime, composite, or special numbers. Supports batch checking and mathematical property analysis.

Circle Area Calculator
Quickly calculate the area of a circle by entering the radius, diameter, or circumference. Supports custom units and precision settings.