Math July 13, 2026 · 8 Min Read

Relatively Prime Calculator – Guide & Formulas

Check if two numbers are relatively prime (coprime). Find the GCD and verify if numbers share any common factors other than 1.

Try the free calculator

Put these formulas into practice with our instant, step-by-step Relatively Prime Calculator.

Open Calculator ›

Use our free **Relatively Prime Calculator** to **check if two numbers are coprime** instantly. This **coprime checker** helps you **compute the GCD** and **verify shared factors** with step-by-step results. Whether you need to **test coprimality** or **find the greatest common divisor**, this tool provides accurate solutions. Features include **prime factorization**, **GCD computation**, and **factor comparison**. 100% free — no signup required!

Key Takeaway

Use the free Relatively Prime Calculator to check if two numbers are relatively prime (coprime). find the gcd and verify if numbers share any common factors other than 1. Get instant results with step-by-step explanations.

How to Use the Relatively Prime Calculator

  1. Step 1: Enter the **first positive integer** into the relatively prime calculator.
  2. Step 2: Enter the **second positive integer** to compare for coprimality.
  3. Step 3: Click Calculate to see if the two numbers are **relatively prime (coprime)**.
  4. Step 4: Review the **GCD (greatest common divisor)** of both numbers.
  5. Step 5: Check the **prime factorization** of each number to see shared factors.
  6. Step 6: Follow the **coprimality test** showing whether GCD equals 1.
  7. Step 7: Use the step-by-step breakdown to understand the **number theory** behind coprime verification.

The Formula

Two numbers a and b are relatively prime (coprime) if their Greatest Common Divisor (GCD) equals 1, meaning they share no common prime factors.

Variable Definitions

  • GCD: Greatest Common Divisor — the largest integer that divides both numbers
  • a, b: The two positive integers being tested for coprimality
  • Relatively Prime: Having no common prime factors; their GCD equals 1
  • Prime Factorization: Breaking a number into its prime number factors

Checking if 14 and 25 Are Relatively Prime

Determine whether 14 and 25 share any common factors.

  1. Step 1: Prime factorize 14: 14 = 2 × 7
  2. Step 2: Prime factorize 25: 25 = 5²
  3. Step 3: Compare factors: no common prime factors exist
  4. Step 4: GCD(14, 25) = 1
  5. Step 5: Since GCD = 1, 14 and 25 ARE relatively prime (coprime)

Frequently Asked Questions

What does relatively prime mean?

Two numbers are relatively prime (also called coprime) if their Greatest Common Divisor (GCD) is 1 — they share no common prime factors.

Is 1 relatively prime to every number?

Yes. The GCD of 1 and any positive integer is always 1, so 1 is coprime to all positive integers.

Can two even numbers be relatively prime?

No. Any two even numbers both share 2 as a factor, so their GCD is at least 2, meaning they cannot be coprime.

What are relatively prime numbers used for?

They are essential in cryptography (RSA encryption), modular arithmetic, simplifying fractions, and the Chinese Remainder Theorem.

How do I find all pairs of relatively prime numbers up to N?

Two numbers a and b are coprime if and only if gcd(a,b) = 1. You can use the Euclidean algorithm to efficiently compute GCDs for all pairs.

Are consecutive integers always relatively prime?

Yes. Any two consecutive integers are always relatively prime because their difference is 1, and the only positive divisor of 1 is 1 itself.

How do I check if three numbers are pairwise coprime?

Three numbers are pairwise coprime if every pair among them is coprime. Check GCD(a,b) = 1, GCD(a,c) = 1, AND GCD(b,c) = 1. All three conditions must hold.