Home · Math · Algebra · Relatively Prime Calculator

Relatively Prime Calculator

Two numbers are relatively prime (coprime) when their greatest common factor is 1 — which this computes, along with their least common multiple.

Your figures

Example result — edit the figures to make it yours

1

GCF = gcd(a, b) — 1 means relatively prime

LCM120

What this calculator does

Two numbers are relatively prime (coprime) when their greatest common factor is 1 — which this computes, along with their least common multiple. Every figure on this page is computed from the formula or definition stated below, with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

Relatively prime ⟺ gcd(a, b) = 1

Coprime numbers share no prime factor, though neither needs to be prime itself (8 and 15 are coprime). For coprime pairs the LCM is simply the product a × b.

Worked example

With the example inputs this page opens with (number a 8, number b 15), the result is 1 — gcf = gcd(a, b) — 1 means relatively prime. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying number a
Number aGCF = gcd(a, b) — 1 means relatively prime
41
6.43
81
105
123
161

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the Relatively Prime Calculator work?

Two numbers are relatively prime (coprime) when their greatest common factor is 1 — which this computes, along with their least common multiple. Numbers a and b → GCF, LCM. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Relatively Prime Calculator need?

Numbers a and b → GCF, LCM. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Relatively Prime Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.