Nutter Tools
Nutter Tools

A free toolbox that runs in your browser. A tool for every job.

Your files never leave your device

Images

  • Convert images
  • Compress images
  • Resize images
  • Crop
  • Watermark

PDF & files

  • Merge PDFs
  • Split a PDF
  • Images to PDF
  • PDF to images
  • Remove photo location

Video & audio

  • Compress video
  • Convert video
  • Video to GIF
  • Convert audio
  • Trim audio

Everyday

  • QR codes
  • Passwords
  • Time zones
  • Unit converter
  • Word count
  • Webcam test

Developer

  • JSON formatter
  • Base64
  • Regex tester
  • Hashes
  • JWT decoder

Site

  • About
  • Contact
  • Settings
  • Privacy
  • Terms
  • Site map
  • llms.txt

Everyday

  • Images
  • Video
  • Audio
  • PDF & files
  • Text
  • QR codes
  • Units & math
  • Time & dates
  • Color
  • Passwords & IDs
  • Device tests
  • Sun & moon

For developers

  • JSON
  • Encoding
  • Regex & cron
  • Web & auth
  • Hashing & encryption
  • Config files
  • Network
  • Browser
  • AI
  • Fake data
© Nutter Toolsnutter.tools
  1. Home
  2. Units & math
  3. Modulo calculator
Your files stay on your device

Modulo calculator

Compute a mod n with quotient and remainder under Euclidean, floored, or truncated rules, plus modular powers and inverses for very large numbers.

This tool is in beta

Still being tested. If a result looks wrong, tell us.

Report a problem

Enter a number and a divisor.

The three conventions disagree only when a is negative, which is the whole lesson: JavaScript, Java, and C truncate toward zero so the remainder takes the sign of a; Python and Excel MOD floor so it takes the sign of n; mathematics (Euclidean division) keeps the remainder in 0..|n|−1 no matter what. All three are shown for every run so the difference is visible, not described. The modular inverse exists only when gcd(a, n) is 1, and this tool refuses instead of guessing when it is not.

Modulo setup

Remainder conventionSame inputs, three answers once a is negative
More settings▾

The exponent runs square-and-multiply, so a 2,000-digit e costs a few thousand multiplications, not 10^(2000). A negative e is refused; the inverse checkbox computes the −1 power directly.

Whole numbers only, 2,000 digits each, sign optional; spaces, commas, and underscores between digits are ignored. Decimals are refused on purpose: 5.5 mod 2 is a rational-arithmetic question with a different answer shape, not a BigInt one.

More unit & math tools

  • Primes, GCD, and LCM
  • Fraction calculator
All unit & math tools

Was this tool useful?