Relatively Prime Calculator
Check if two or more numbers are relatively prime (coprime), see Euclidean algorithm steps, prime factorizations, totient values, and coprimality grids.
GCD(a, b)⧉
1
GCD(8, 15) via Euclidean algorithm
Relatively Prime?⧉
✓ Yes — coprime
GCD = 1
LCM(a, b)⧉
120
LCM = a × b (since coprime)
φ(a)⧉
4
Euler's totient of 8: count of integers ≤ 8 coprime to it
φ(b)⧉
8
Euler's totient of 15
Shared Prime Factors⧉
None
No common primes → coprime
Euclidean Algorithm Steps
| Step | a | b | q | r |
|---|---|---|---|---|
| 1 | 15 | 8 | 1 | 7 |
| 2 | 8 | 7 | 1 | 1 |
| 3 | 7 | 1 | 7 | 0 |
Prime Factorization Comparison
8
2^3
15
35
Red = shared prime (prevents coprimality). Green = unique prime.
Integers Coprime to 8 in [1, 50] (25 found)
135791113151719212325272931333537394143454749
Coprimality Grid (1–20)
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |