Relatively Prime Calculator
Check whether integers are relatively prime or coprime with GCD tests, pairwise checks, Euclidean algorithm steps, and prime factorization.
Last Updated: May 2026
Collectively relatively prime?
Yes
Pairwise relatively prime?
Yes
GCD / GCF
1
LCM
2,240
Relatively Prime Inputs
Enter two or more integers. The calculator reports the shared GCD and checks whether the whole set, and every pair, is relatively prime.
Prime Status
| Measure | Value | Meaning |
|---|---|---|
| Normalized inputs | 35, 64 | Absolute values are used for gcd checks. |
| GCD / GCF | 1 | Relatively prime means this value is 1. |
| Collective test | Pass | The full set has no common divisor greater than 1. |
| Pairwise test | Pass | Every two-number pair has gcd 1. |
| Zero handling | No zero inputs | Standard integer gcd rules apply. |
Pairwise Checks
| Pair | GCD | Verdict |
|---|---|---|
| 35 and 64 | gcd = 1 | Relatively prime |
Euclidean Algorithm
| Division | Next step | Verdict |
|---|---|---|
| 64 = 35 x 1 + 29 | Continue with 35 and 29. | Keep going |
| 35 = 29 x 1 + 6 | Continue with 29 and 6. | Keep going |
| 29 = 6 x 4 + 5 | Continue with 6 and 5. | Keep going |
| 6 = 5 x 1 + 1 | Continue with 5 and 1. | Keep going |
| 5 = 1 x 5 + 0 | 1 is the gcd. | Relatively prime |
Shared Factor Witnesses
| Pair | GCD | Verdict |
|---|---|---|
| No shared pair factor | Every displayed pair has gcd 1 | Pairwise relatively prime |
Prime Factors
| Input | Prime factorization |
|---|---|
| 35 | 5 x 7 |
| 64 | 2^6 |
Integer Arithmetic Notice
This calculator checks integer relative primality. Decimal, fraction, and algebraic expressions should be converted to integers before use.
Reviewed For Methodology, Labels, And Sources
Every CalculatorWallah calculator is published with visible update labeling, linked source references, and review of formula clarity on trust-sensitive topics. Use results as planning support, then verify institution-, policy-, or jurisdiction-specific rules where they apply.
Reviewed By
Jitendra Kumar, Founder & Editorial Standards Lead, reviews methodology, labels, assumptions, and trust-sensitive publishing decisions for this topic area.
Review editor profileTopic Ownership
Sales tax and tax-sensitive estimate tools, Education and GPA planning calculators, Health, protein, and screening-formula pages, Platform-wide publishing standards and methodology
See ownership standardsMethodology & Updates
Page updated May 2026. Trust-critical pages are reviewed when official rates or rules change. Evergreen calculator guides are checked on a recurring quarterly or annual cycle depending on topic volatility.
How to Use the Relatively Prime Calculator
Enter two or more integers separated by commas, spaces, semicolons, or new lines. The calculator normalizes negative values to absolute values before checking shared factors.
Read the collective verdict first, then inspect the pairwise table if you entered more than two values. The Euclidean algorithm table shows why the first pair passes or fails.
Step 1: Enter integers
Use values such as 35, 64 or a set such as 6, 10, 15.
Step 2: Check the GCD
The numbers are relatively prime when the greatest common divisor is 1.
Step 3: Review pairwise status
For sets, pairwise relatively prime means every two-number pair has gcd 1.
Step 4: Use the proof rows
Use Euclidean steps and prime factors to see exactly where shared factors appear.
How This Relatively Prime Calculator Works
The calculator parses valid integers and takes their absolute values. It then computes the greatest common divisor with the Euclidean algorithm.
For two numbers, gcd equal to 1 is exactly the relatively prime test. For three or more numbers, the calculator also tests every pair so you can distinguish collective and pairwise relative primality.
Prime factorization is included for smaller inputs because shared prime factors are the reason the gcd becomes greater than 1.
Relatively Prime Guide
Relatively Prime Rules
| Concept | Test | Meaning |
|---|---|---|
| Two integers | gcd(a, b) = 1 | The pair is relatively prime or coprime. |
| Shared factor | gcd(42, 56) = 14 | Not relatively prime. |
| Collective set | gcd(6, 10, 15) = 1 | The whole set is collectively relatively prime. |
| Pairwise set | Every pair has gcd 1 | Stronger than collective relative primality. |
| Prime factors | No common prime factor | Equivalent to gcd 1. |
| Zero case | gcd(0, n) = |n| | Zero is relatively prime only with 1 or -1. |
Worked Examples
| Input | Verdict | Reason |
|---|---|---|
| 35 and 64 | Relatively prime | gcd(35, 64) = 1. |
| 42 and 56 | Not relatively prime | They share factor 14. |
| 14, 25, 81 | Pairwise relatively prime | Every pair has gcd 1. |
| 6, 10, 15 | Collectively but not pairwise | The full gcd is 1, but each pair shares a factor. |
| 0 and 1 | Relatively prime | gcd(0, 1) = 1. |
Why Pairwise Is Stronger
The set 6, 10, and 15 has gcd 1, so it is collectively relatively prime. But it is not pairwise relatively prime because gcd(6, 10) = 2, gcd(6, 15) = 3, and gcd(10, 15) = 5. Pairwise relative primality requires every pair to pass.
Keep the research moving with GCF Calculator, LCM / GCF Calculator, Prime Factorization Calculator, and Prime Number Calculator.
Frequently Asked Questions
Related Calculators
GCF Calculator
Calculate greatest common factors with Euclidean steps, prime factors, and simplified integer ratios.
Use GCF CalculatorLCM / GCF Calculator
Calculate least common multiple, greatest common factor, prime factors, coprime status, and Euclidean steps.
Use LCM / GCF CalculatorPrime Factorization Calculator
Find prime-power form, expanded prime factors, division steps, radical, and divisor count.
Use Prime Factorization CalculatorPrime Number Calculator
Check primality, find smallest divisors, compare previous and next primes, and review proof steps.
Use Prime Number CalculatorInverse Modulo Calculator
Find modular inverses with extended Euclid, Bezout identity, and gcd checks.
Use Inverse Modulo CalculatorSources & References
- 1.Wolfram MathWorld - Relatively Prime(Accessed May 2026)
- 2.Wolfram MathWorld - Euclidean Algorithm(Accessed May 2026)
- 3.OpenStax Prealgebra 2e - Prime Factorization and Greatest Common Factor(Accessed May 2026)