Fermat's Little Theorem Calculator
Enter an integer (a) and a prime number (p) to apply Fermat's Little Theorem. The calculator computes a^(p-1) mod p, verifies whether the result equals 1, and shows the multiplicative inverse of a modulo p. You also get a step-by-step breakdown confirming whether the theorem holds for your chosen values.
Results
a^(p−1) mod p
--
Theorem Holds?
--
p is Prime?
--
a mod p
--
Multiplicative Inverse of a mod p
--
Exponent Used (p−1)
--