All tools · 📊 Math

% Modulo / Remainder Calculator

Modulo (or "mod") gives the remainder after integer division. 17 mod 5 = 2 because 17 = 5×3 + 2. Used in cryptography, hashing, clock arithmetic, and parity checks. We handle negative numbers using the mathematical (non-negative remainder) convention.

Loading tool…

Examples

Simple
Input17 mod 5
Output2 (quotient 3, remainder 2)
Negative
Input-7 mod 3
Output2 (mathematical convention)

JS % returns -1 here; math mod returns 2.

Clock arithmetic
Input25 mod 12
Output1 (5pm + 8 hours = 1am)

Frequently asked questions

Why does JS give a different answer for negatives?

JavaScript % returns a remainder with the same sign as the dividend (-7 % 3 = -1). Mathematical mod always returns non-negative (-7 mod 3 = 2). Add the divisor if you need the math version.

Modulo vs remainder — same thing?

For positive numbers yes. For negatives they differ by language convention. Python and Ruby use math mod; C, JS, Java use sign-of-dividend remainder.

About this tool

Modulo / Remainder Calculator runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.

Related tools

← All 96 tools

Why this tool

vs typical free web-tool sites

1vwTypical free site
PriceFreeFree
Signup requiredNoOften (for premium features)
Ads inside the toolNoYes (banner + video)
Data sent to serverNo (browser-only)Yes (inputs analyzed for ads)
Total tools96Often <20 or scattered across sites
Bookmarkable URL per toolYesMixed
Loads in under 1sYes (static)Often slow (ad tracking)
MultilingualEN / ES / PT / FR / DEUsually EN only
Open sourceYesNo