Free · Arithmetic calculators ➗

Coprime Pairs and Sets

Check whether two positive integers are relatively prime, or whether a set of up to ten positive integers is collectively or pairwise coprime.

  • Formula & worked example
  • Private in your browser
  • No signup
Go to tool

Calculator inputs

Loading calculator…

How to use this calculator

  1. Enter the known values in the units shown. Results update as you type.
  2. Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
  3. Use the worked example to check the method. Reset restores the starting fields.

Private by default

Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.

Formula and method

Find the greatest common divisor of the entered positive integers. A GCD of one means the integers share no common prime factor. Pairwise coprimality additionally requires every pair to have GCD one.

Collectively coprime: gcd(a₁,…,aₙ)=1. Pairwise coprime: gcd(aᵢ,aⱼ)=1 for every distinct pair.

Worked example

Enter these known values and leave the other values blank.

#1
8
#2
15
Greatest common divisor
1

Assumptions and limitations

  • Enter positive integers no greater than10000000000. The bound is the verified computational domain of the exact local GCD kernel; fractional and nonpositive inputs are rejected.
  • Pair mode checks only its first two visible operands. Set mode checks every entered operand among ten retained fields; blanks are omitted. Switching modes retains other entries for reuse.
  • Collective coprimality and pairwise coprimality differ. For example6,10,15 have overall GCD one but each pair shares a factor.
  • The named numeric summaries expose GCD and a pairwise flag (one for yes, zero for no); the original text verdicts are expressed as original authored notes. This is a forward classification, with no invented inverse.
  • Inputs accept decimal or e notation and bounded arithmetic expressions only when each intermediate and final value can be verified exactly as a finite decimal. Repeating fractions, functions, symbols and expressions that lose digits are rejected with guidance. Enter their finite decimal value instead; the calculator-specific magnitude and precision limits still apply.

Common questions

Can three numbers be coprime without being pairwise coprime?

Yes. The GCD of6,10,15 is one, so they are collectively coprime. Their pairwise GCDs are2,3,5, so they are not pairwise coprime.

Is one coprime to every positive integer?

Yes. The greatest common divisor of one and any positive integer is one.

Do repeated values affect coprimality?

They can. Repeating a number larger than one prevents pairwise coprimality because the two equal entries share that number as a divisor. Repeated ones remain pairwise coprime.

References

Translate the captured coprimality callback to bounded local exact-integer GCD and pairwise numeric summaries, preserving all five pair/collective/pairwise verdicts in authored conditional notes. Retain all original controls and choice datasets; do not execute source JavaScript. In pair mode read only its two visible operands, repairing the original use of stale hidden entries when a visible operand is cleared. Bind this numeric verdict adapter to the complete original capture and compiled schema only. Preserve pair/set modes, ten progressive operands, all original defaults/locks and hidden text-choice datasets. Accept positive integers through10000000000 under the existing bounded exact Bezout kernel, rejecting fractional/nonpositive/out-of-budget values. A set is collectively coprime exactly when its common GCD is one, and pairwise coprime exactly when every operand pair has GCD one. Blank operands are omitted in set mode; a pair requires both visible operands. Retain values across mode switches without allowing hidden values to substitute for an absent pair operand.

Explore arithmetic calculators ➗ or browse all math calculators.