Relatively Prime Calculator

Quick answer

The relatively prime calculator checks whether two or more whole numbers are coprime (share no factor except 1), and for sets whether they are pairwise coprime.

Result
Pairwise coprime
GCF of all numbers
1
Pairs that share a factor
Every pair has GCF 1.

Coprime numbers appear in fraction simplification (a fraction is in lowest terms when numerator and denominator are coprime), gear design, the Chinese remainder theorem and RSA key generation.

How to use the Relatively Prime Calculator

  1. Numbers (2 to 10)

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

For a pair the calculator computes the greatest common factor. For a set it checks the overall gcd (relatively prime) and every pair separately (pairwise coprime).

Formula

a and b are coprime ⇔ gcd(a, b) = 1

Worked example

Inputs: Numbers (2 to 10): 8, 9, 25.
Results: Result = Pairwise coprime; GCF of all numbers = 1; Pairs that share a factor = Every pair has GCF 1..

Key terms

Coprime
Having greatest common factor 1.

Frequently asked questions

Are 8 and 9 coprime?

Yes. Neither is prime, but they share no factor.

Is 1 coprime to every number?

Yes.

What is the difference between relatively prime and pairwise coprime?

{6, 10, 15} has gcd 1 overall but every pair shares a factor.

Are two consecutive integers coprime?

Always.

Sources

  1. Wolfram MathWorld: Relatively prime
  2. OpenStax: Contemporary Mathematics

Cite this calculator

Speedy Calculator. (2026). Relatively Prime Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/relatively-prime/