Skip to content

GCD / HCF Calculator

Calculate the greatest common divisor (GCD) or highest common factor (HCF) of two or more numbers with step-by-step solutions

Updated

What is the GCD / HCF Calculator?

How it works

Examples

GCD of two numbers

48, 18
GCD: 6, LCM: 144, Steps: 48 = 18 × 2 + 12, 18 = 12 × 1 + 6, 12 = 6 × 2 + 0

GCD of three numbers

56, 98, 42
GCD: 14, LCM: 588, Prime factors: 56 = 2³ × 7, 98 = 2 × 7², 42 = 2 × 3 × 7

Coprime numbers

17, 19
GCD: 1, LCM: 323, Coprime: Yes, Bézout: 17 × 9 + 19 × (-8) = 1

Negative numbers

-48, 18
GCD: 6, LCM: 144, Note: GCD is always non-negative

Frequently asked questions