MyAICalc Logo
MyAICalc Personal AI Calculator Hub
Number Theory Suite

LCM & GCF

Resolve common multiples and factors for any set of integers. Our tool provides detailed prime factorizations and algorithmic derivations for accurate results.

Separate numbers with commas or spaces.

GCF (HCF)
LCM

Awaiting Analysis

Enter at least two numbers to see the breakdown.

Multiplication Rule

For two numbers a and b, the product of LCM and GCF equals the product of the numbers:

GCF(a,b) × LCM(a,b) = a × b

Euclidean Efficiency

The Greatest Common Factor can be found quickly using the remainder method, even for extremely large numbers.

GCF(a, b) = GCF(b, a mod b)

Relative Primes

If two numbers share no prime factors other than 1, their GCF is 1 and their LCM is simply their product.

GCF(13, 7) = 1 → LCM = 91

What are LCM and GCF?

Greatest Common Factor (GCF)

Also known as the Highest Common Factor (HCF), it is the largest positive integer that divides each of the integers without a remainder.

Example: GCF(12, 18) = 6, because 6 is the largest number that goes into both.

Least Common Multiple (LCM)

The smallest positive integer that is divisible by all numbers in a given set.

Example: LCM(12, 18) = 36, because 36 is the smallest number both 12 and 18 divide into.

Methods of Calculation

There are several ways to find these values. The two most common are:

Prime Factorization

Decompose each number into its prime factors. For the GCF, take the lowest power of each common prime. For the LCM, take the highest power of all primes found across the numbers.

Euclidean Algorithm

A highly efficient method for finding the GCF of two numbers by repeatedly dividing and taking the remainder until the remainder is zero. The last non-zero remainder is the GCF.

Quick Reference Table

NumbersGCFLCM
6, 8224
12, 15360
15, 20560
18, 24672
10, 15, 20560
12, 18, 24672