Number Theory Calculators
Number theory studies the integers: divisibility, primes, congruences and the structure of the integers modulo n. It is also the mathematical foundation of public-key cryptography, so the same ideas appear in algebra, discrete mathematics and computer science courses.
These tools handle arbitrarily large integers exactly and explain every step, from the quotients of the Euclidean algorithm to the prime exponents behind Euler's totient function.
If you are new to the subject, start with the GCD and the Euclidean algorithm, move on to modular arithmetic and modular inverses, and then try the Chinese Remainder Theorem and primitive roots.
Number Theory tools
GCD & LCM Calculator
Greatest common divisor and least common multiple of up to eight integers, with Euclid's algorithm and prime factorization.
Prime Factorization Calculator
Factor any integer into primes, with the divisors, divisor count, divisor sum and Euler totient.
Euler Totient Calculator
Compute Euler's totient φ(n), the count of integers up to n that are coprime to n, with the product formula.
Chinese Remainder Theorem Solver
Solve a system of congruences x ≡ a (mod m), including moduli that are not coprime, with every merge step shown.
Primitive Root Calculator
Find the smallest primitive root modulo n, count them, list them and test whether a given g generates the group.
Modular Arithmetic Calculator
Add, subtract, multiply, divide and exponentiate modulo m, find modular inverses and solve ax ≡ b (mod m).
Extended Euclid & Modular Inverse
Find gcd(a, b), Bézout coefficients and modular inverses, with the full quotient / remainder table.