Skip to main content
Reviewed for accuracy by Manoj Kumar, Mathematics Educator

Modular Arithmetic Visualizer Calculator

Calculator

Adjust values & calculate

Enter your values below. Every result is computed in your browser โ€” no data is sent to any server.

Formula: a mod m = r where a = q*m + r and 0 <= r < m

Your Result

Worked example โ€” 17^3 mod 7 = 6 | 17^(-1) mod 7 = 5 | Fermat confirmed: 17^6 mod 7 = 1 | 3 is a primitive root of 7

Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy