GCD & LCM

GCD & LCM

Local Processing

Find the greatest common divisor (GCD / HCF) of two integers using the Euclidean algorithm.

How It Works & Processing Standards

Enter values above to calculate results automatically. Check each input field for guidance and units.

Example: First Integer (a) = 48, Second Integer (b) = 18 → 6

Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.

Pick GCD, LCM or coprime check under "Calculation" and enter two integers.

What You Can Do

Greatest common divisor
The largest number that divides both. Used to simplify fractions.
Least common multiple
The smallest common multiple. Finds when two cycles line up again.
Coprime check
Two numbers are coprime when their GCD is 1.

How to Use GCD & LCM

  1. 1
    Choose a calculationPick what you want to find.
  2. 2
    Enter two integersNegative numbers are treated by their absolute value.
  3. 3
    Read the resultCopy or share the result.

Examples

GCD of 84 and 36
Input: a 84, b 36
Result: 12
LCM of 12 and 18
Input: a 12, b 18
Result: 36
Are 35 and 64 coprime?
Input: a 35, b 64 (coprime check)
Result: True (true)

Common Use Cases

  • Reducing a fraction to lowest terms
  • When two buses leave together again
  • Checking number theory homework

Frequently Asked Questions (FAQ)

What if I enter 0?

The GCD of 0 and n is |n|, and the LCM with 0 is 0.

Can I use three or more numbers?

It works on two at a time. For a third number, run it again with the previous result.

Have feedback or ideas for this tool? Suggest & Inquire →