Skip to content

Relatively Prime

Result

Calculated result 1 Based on the values entered.
↗ Math

Relatively Prime — free online calculator.

Formula

Relatively prime iff gcd(|a|, |b|) = 1
  • Check whether two integers are relatively prime using their greatest common divisor. Integers must be within the supported exact range. A result of 1 means yes; 0 means no.
  • The main inputs are First Number, Second Number. Enter them in the units and format shown in the calculator.
  • Keep comparable quantities in compatible units whenever the formula combines or compares them.
  • Changing any input above recalculates the result with the same calculation engine used by this page.

Example: Relatively Prime

Inputs
  • First Number: 8
  • Second Number: 15

For 8 and 15, gcd = 1, so the result is 1 (yes). For 8 and 12, gcd = 4, so the result is 0 (no).

Sample result: Calculating…

Frequently asked questions

What does the Relatively Prime calculate?

Relatively Prime — free online calculator.

Which values should I enter?

Enter First Number, Second Number using the units and format shown beside each field.

What formula does this calculator use?

The calculator uses the following relationship: Relatively prime iff gcd(|a|, |b|) = 1.

Why might my result differ from another source?

Results can differ when another source uses different units, rounding rules, conventions or assumptions. Compare the inputs and definitions before comparing results.

Does the result update automatically?

Yes. Changing an input updates the result using the same calculation engine shown on this page.

Page information

Updated: October 10, 2026