calcula·live209+
Salary & Work 16 tools Net salaryGross (from net)Advanced net salaryΣTotal employer costMinimum wageMeal vouchersPart-time salaryOvertime pay See all — Salary & Work
% Taxes 19 tools %VAT calculatorIncome taxDividend taxCar tax (VED)Rental income taxWithholding taxMicro-company taxCorporate profit tax See all — Taxes
Credit 16 tools MortgageConsumer loanCar loanRefinancing%Effective APRHow much can I borrow?Early repaymentAmortization table See all — Credit
Finance 18 tools Compound interestInvestment calculator (SIP)Savings simulatorCurrency converterGold priceInflationTerm deposit%Investment ROI See all — Finance
Health 22 tools BMIIdeal weightDaily calories (TDEE)Pregnancy (weeks)Daily water intakeBMROvulationSmoking cost See all — Health
Math 22 tools %PercentagesRule of threeAverage & statisticsPower & rootUnit conversionsArea & perimeterVolumePythagoras See all — Math
Time & Date 25 tools Date differenceExact ageWorking days±Add / subtract dateCountdownDays until…Sunrise & sunsetCurrent time in a city See all — Time & Date
Education 14 tools Subject averageWeighted averageMidterm & final gradeGrade neededECTS credits / GPAGraduation averageSATs scaled scoreUCAS points / admission See all — Education
Auto & Travel 15 tools Fuel consumptionTrip costSpeed / time / distanceCar tax (VED)Distance between citiesBonus-malus classHalfway pointSplit trip cost See all — Auto & Travel
Real Estate 13 tools Notary purchase fees%Agent commissionPrice per m²Built / usable areaRental yieldRent vs buyMortgageLand share See all — Real Estate
Business & Commerce 12 tools Profit marginMarkupAdSense revenue (website)App revenue (AdMob)Final priceDiscountBreak-even pointStock turnover See all — Business & Commerce
Insurance 6 tools Home insuranceLife insuranceHealth insuranceTravel insuranceBonus-malus classLoan insurance See all — Insurance
§ Legal 9 tools §Legal term (days)%Legal interestChild supportCourt feesStatute of limitationsInflation updateEnforcement costMediation fee See all — Legal
Everyday Tools 11 tools Tip calculatorSplit the billAC BTUHTML color codePassword generatorWord / character countMD5 / hashGeneration See all — Everyday Tools
All calculators
Live
Advertisement 320 × 50 mobile only · sticky top
Math · Updated 2026

Modular Arithmetic Calculator

Instantly calculate the remainder (a mod n) and the modular power (aᵇ mod n), useful in programming and cryptography.

Enter values

The remainder of a divided by n. The result is always between 0 and n−1.

=Result
3
Quotient (a ÷ n)2
Result3

17 mod 7 = 3

Standard mathematical formulas. Instant in-browser calculation, no account. Exact results for the values you enter.

Advertisement 728 × 90320 × 250 desktop 728×90 sticky · mobile 320×250

iHow it is calculated

The modulo operation gives the remainder of a division. The result is always between 0 and n−1, “wrapping around” like clock hands:

a mod n = a n × ⌊a ÷ n⌋

17 mod 5 = 2 (quotient 3, remainder 2). Modular power: 2¹⁰ mod 7 = 1024 mod 7 = 2.

Advertisement 728 × 90320 × 250 desktop 728×90 sticky · mobile 320×250

?Frequently asked questions

What is the modulo operation (remainder)?

The operation “a mod n” gives the remainder of a divided by n. For example, 17 mod 5 = 2, because 17 = 3 × 5 + 2.

How do I calculate a mod n?

Divide a by n and keep the remainder. The calculator shows it directly, along with the integer quotient.

What is 17 mod 5?

17 mod 5 = 2. The quotient is 3, and the remainder (the modulo result) is 2.

What is modular arithmetic?

A system where numbers “wrap around” after reaching the modulus, like clock hands (mod 12 or 24). 14:00 = 2 in the afternoon.

What is modular power (aᵇ mod n)?

It computes aᵇ and then the remainder modulo n, efficiently even for large exponents. It is essential in cryptography (e.g. RSA).

Why is the remainder always between 0 and n−1?

Because the remainder is what is left after subtracting all whole multiples of n; it cannot reach n, otherwise one more multiple would fit.

How does modulo work with negative numbers?

This calculator always returns a non-negative remainder: −1 mod 5 = 4. This keeps the result within 0…n−1.

What is modular arithmetic used for?

Cryptography, hash functions, pseudo-random number generation, check digits (ISBN, IBAN) and computing days of the week.

Advertisement 728 × 90320 × 250 desktop 728×90 sticky · mobile 320×250

Related tools

209 tools · 14 categories

Explore all calculators

All calculators (209) →
Advertisement 320 × 50