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.
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
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
| Number a | GCF = gcd(a, b) — 1 means relatively prime |
|---|---|
| 4 | 1 |
| 6.4 | 3 |
| 8 | 1 |
| 10 | 5 |
| 12 | 3 |
| 16 | 1 |
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.