48 and 18
48 = 2 × 18 + 12, 18 = 1 × 12 + 6, 12 = 2 × 6 + 0, so the GCD is 6 and the LCM is 48 × 18 ÷ 6 = 144.
Find the greatest common divisor and least common multiple of two or more numbers, with Euclid's steps.
Enter your values and select Calculate to see the result.
Runs in your browser — nothing you enter is sent to a server.
Enter two or more whole numbers. The greatest common divisor (GCD, also called HCF) is the largest number that divides all of them; the least common multiple (LCM) is the smallest number they all divide into. The GCD uses Euclid's algorithm, whose steps are shown for the first two numbers, and the LCM is exact even when it's very large.
gcd(a, b) = gcd(b, a mod b), until the remainder is 0
lcm(a, b) = |a × b| ÷ gcd(a, b)
48 = 2 × 18 + 12, 18 = 1 × 12 + 6, 12 = 2 × 6 + 0, so the GCD is 6 and the LCM is 48 × 18 ÷ 6 = 144.
GCD 6, LCM 180.
Simplifying fractions (divide by the GCD) and adding fractions (use the LCM as the common denominator).
Signs are ignored: the GCD and LCM are always positive.
Every number divides 0, so the LCM isn't defined with 0.
Check whether a number is prime and see its prime factorization, divisors and the nearest primes.
Math Tools
Add, subtract, multiply and divide fractions, with the answer simplified and shown as a mixed number and decimal.
Math Tools
Solve a proportion for the missing value, or simplify a ratio to its lowest terms.
Math Tools