IP331.com | Online Tools
HomeNumber Theory ToolsMultiplicative Order Calculator

Multiplicative Order Calculator

Find the smallest k such that a^k is 1 modulo n

a
mod n

Multiplicative Order Formula

ord_n(a) = least k > 0 such that a^k ≡ 1 (mod n)
Order exists only if gcd(a, n) = 1
ord_n(a) divides phi(n)

The multiplicative order measures the period of powers of a modulo n. Euler theorem guarantees that the order divides phi(n) whenever a and n are coprime.

The calculator tests divisors of phi(n). Inputs should be ordinary browser-size integers because factorization of large n can be slow.

What Is Multiplicative Order?

Multiplicative order is the length of the repeating cycle generated by powers of a modulo n. It connects modular arithmetic to group theory and primitive roots.

Coprime Required

The order exists only for units modulo n.

Smallest Exponent

The answer is the first k where a^k returns to 1.

Divides phi(n)

Euler theorem limits the possible k values.

Cycle Length

The order is the period of repeated multiplication by a.

Example: For a = 2 and n = 9, 2^1 = 2, 2^2 = 4, 2^3 = 8, and 2^6 = 1 mod 9, so ord_9(2) = 6.

Applications of Multiplicative Order

Primitive Roots Cyclic Groups Cryptography Period Finding Modular Powers

Frequently Asked Questions

What is a multiplicative order calculator?
It finds the smallest positive integer k such that a^k is congruent to 1 modulo n.
What is the multiplicative order formula?
ord_n(a) is the least k > 0 with a^k ≡ 1 mod n, and it exists only when gcd(a,n)=1.
How do I use this order modulo calculator?
Enter a and n, then calculate. The tool checks gcd(a,n), computes phi(n), and tests divisors for the smallest order.
When does multiplicative order not exist?
It does not exist when a and n are not coprime, because a is not a unit modulo n.
Where is multiplicative order used?
It is used in primitive roots, cyclic groups, cryptography, period finding, and modular arithmetic problems.

More Number Theory Tools

Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.

© 2026 IP331.com — Free Online Tools. All rights reserved.

About · Contact · Privacy Policy · Cookie Policy · Terms of Use · Disclaimer · Sitemap