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

Fermats Little Theorem 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^(p-1) mod p = 1 (when p is prime and gcd(a,p) = 1)

Your Result

Worked example โ€” 3^6 mod 7 = 1 (verified)

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