Skip to content
عُدّةUDDAH

Modulo (mod) calculator

Calculate the remainder a mod n using the different conventions for negative numbers, plus modular exponentiation and modular inverse for large numbers.

In your browser

How to use

  1. 1Choose the operation: remainder, modular exponentiation or inverse.
  2. 2Enter the numbers.
  3. 3The result appears with the quotient and the different sign conventions.

FAQ

Why does the result of -7 mod 3 differ between programs?

Some languages (C and JavaScript) give the remainder with the sign of the dividend, so it is -1, while others (Python and Excel) use the sign of the divisor, so it is 2. The tool shows all the conventions.

Is Modulo (mod) calculator free?

Yes, Modulo (mod) calculator is completely free and needs no account.

Are my files uploaded to a server?

No. The tool runs entirely inside your browser, and your files and text never leave your device at any point.

Does it work on mobile?

Yes. It works in any modern browser on a phone or computer, with no app to install.

Related tools

QR code generatorCreate a QR code for a link, text, Wi-Fi network, contact card or WhatsApp, in your colors and with your logo, and download it as PNG or SVG.
Unit converterInstantly convert length, weight, temperature, area (dunam, feddan, hectare), volume, speed, data, time, pressure and energy.
Percentage calculatorCalculate a percentage of a number, what one number is as a share of another, the percentage change, or add and subtract a percentage from a value.
Age calculatorCalculate your age in years, months and days in Gregorian and Hijri, with the date of your next birthday and your birth date in Hijri.
Difference between two datesCalculate the duration between two dates in days, weeks, months, years and working days, or add days to a date.
Loan and financing calculatorCalculate the monthly installment, total interest and repayment schedule for financing at a reducing or flat (murabaha) rate.