Beginner

GCF and LCM Calculator — Greatest Common Factor & Least Common Multiple

Find the GCF (Greatest Common Factor) and LCM (Least Common Multiple) of two positive integers, with a full step-by-step breakdown of the Euclidean algorithm.
Must be a positive whole number
Must be a positive whole number
Greatest Common Factor (GCF)
12

Largest integer that divides both numbers without a remainder

Least Common Multiple (LCM)
144
GCF formula check
48 × 36 ÷ GCF = LCM
48 = GCF ×
4
36 = GCF ×
3
01836547290108126144GCFabLCMGCF (smallest shared factor) and LCM (smallest shared multiple) on a number line
Euclidean algorithm — step by step
1

48 ÷ 36

48 = 1 × 36 + 12 (remainder 12)
2

36 ÷ 12

36 = 3 × 12 + 0 (remainder 0)
=

Remainder is 0 — the last non-zero remainder is the GCF

GCF(48, 36) = 12
=

LCM = a × b ÷ GCF

LCM = 48 × 36 ÷ 12 = 144
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

GCF (Greatest Common Factor) is the largest integer dividing both numbers exactly; LCM (Least Common Multiple) is the smallest integer both numbers divide into. Computed via the Euclidean algorithm: GCF(a, b) by repeated remainders; LCM = a × b ÷ GCF. Enter two positive whole numbers to see both with step-by-step working.

Formula
GCF via Euclidean algorithm • LCM(a, b) = |a × b| ÷ GCF(a, b)
How this is calculated

The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — is the largest positive integer that divides both numbers exactly. The calculator finds it with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing the two, until the remainder reaches zero; the last non-zero remainder is the GCF. This method is efficient for any size of integer.

Once the GCF is known, the Least Common Multiple follows directly from the identity LCM(a, b) = |a × b| ÷ GCF(a, b). This works because the product of two integers equals the product of their GCF and LCM. For example, GCF(48, 36) = 12 and LCM = 48 × 36 ÷ 12 = 144.

The GCF is used to simplify fractions (divide numerator and denominator by the GCF) and to find common denominators. The LCM is the smallest number into which both integers divide evenly — essential for adding unlike fractions and solving scheduling problems (e.g. two events with different periods that repeat together at the LCM).

Frequently asked questions

They are three names for the same value. GCF (Greatest Common Factor) and HCF (Highest Common Factor) are terms commonly used in K-12 education; GCD (Greatest Common Divisor) is the standard mathematical term. All three refer to the largest integer that divides all numbers in a set without remainder.

To add fractions with unlike denominators (e.g. 1/4 + 1/6), convert both to the LCM of the denominators (LCM(4,6) = 12): 3/12 + 2/12 = 5/12. Using the LCM keeps the resulting fraction as simple as possible.

The product a × b can be factored as GCF(a,b) × LCM(a,b). This is because the prime factorisation of GCF takes the minimum exponent of each prime, and LCM takes the maximum; together they cover every prime in a × b exactly once. Rearranging gives LCM = a × b ÷ GCF.

Also known as

gcf calculator
lcm calculator
greatest common factor calculator
least common multiple calculator
hcf calculator
gcf lcm step by step
euclidean algorithm calculator

APA

TG we-Calculate Editorial Team. (2026). GCF and LCM Calculator — Greatest Common Factor & Least Common Multiple [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/gcf-and-lcm-calculator

Chicago

TG we-Calculate Editorial Team. "GCF and LCM Calculator — Greatest Common Factor & Least Common Multiple." TG we-Calculate. 2026. https://we-calculate.com/calculator/gcf-and-lcm-calculator.

IEEE

TG we-Calculate Editorial Team, "GCF and LCM Calculator — Greatest Common Factor & Least Common Multiple," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/gcf-and-lcm-calculator

BibTeX

@misc{wecalculate_gcf_and_lcm_calculator, title = {GCF and LCM Calculator — Greatest Common Factor & Least Common Multiple}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/gcf-and-lcm-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?