FACTORS & DIVISORS · FREE ONLINE TOOL

Highest Common Factor Calculator

Looking for a highest common denominator calculator or largest common denominator calculator? Find the largest shared divisor here—the highest common factor (HCF), also called the greatest common divisor (GCD). For fractions, the least common denominator is a different calculation, based on LCM.

LET’S WORK IT OUT

Enter your numbers

Enter 2 to 20 whole integers separated by commas or spaces. Negative values and zero are allowed, but not every value can be zero.

Try an example

Calculated here. Not sent to a calculator server.

EXAMPLE RESULT
42

The largest factor shared by all your numbers.

Here’s the working

  1. Calculate to see the steps for your numbers.

Exact integer arithmetic · up to 20 numbers

What the highest common factor means

The highest common factor is the largest positive integer that divides every input with no remainder. For 84, 126, and 210, 42 divides all three numbers, and no larger integer does.

HCF and GCD name the same concept for integers. A factor divides a number exactly, while a multiple is made by multiplying a number by a whole integer. That distinction helps keep HCF separate from LCM.

HCF(84, 126, 210) = 42

Ways to find the HCF

For small numbers, list factors and select the largest value appearing in every list. Prime factorization is another method: keep only the primes shared by all inputs, using the smallest shared power of each prime.

For longer inputs, the Euclidean algorithm is faster. Divide the larger number by the smaller, replace the pair with the smaller number and the remainder, and repeat until the remainder is zero. The last nonzero remainder is the GCD.

HCF(a, b) = HCF(b, a mod b)
  1. For 126 and 84, divide 126 by 84 to get remainder 42.
  2. Divide 84 by 42 to get remainder 0.
  3. The last nonzero remainder is 42, so HCF(126, 84) = 42.

When an HCF is useful

Use an HCF to find the greatest possible number of identical groups with nothing left over. If 84 red items, 126 blue items, and 210 green items must be divided into identical groups, 42 is the largest possible number of groups.

It also simplifies fractions. Divide the numerator and denominator by their HCF: 126/210 becomes 3/5 after dividing both by 42. In number theory, an HCF of 1 means the numbers are coprime.

Input rules and edge cases

This calculator accepts 2 to 20 integers with up to 30 digits each. A negative sign does not change the HCF because divisibility is based on the absolute value. Zero can be included: HCF(0, 45, 75) is 15.

All-zero input is rejected. Every positive integer divides zero, so there is no single greatest positive common divisor for a list made entirely of zeros.

HCF(a, 0) = |a| for a not equal to 0
GOOD QUESTIONS, CLEAR ANSWERS

Frequently asked questions

Is HCF the same as GCD?

Yes. Highest common factor and greatest common divisor are two names for the largest positive integer that divides every input exactly.

Why do people search for a highest common denominator calculator?

The usual mathematical term for this task is highest common factor or GCD. Denominator is normally used for the bottom of a fraction, so the search label is clarified here rather than treated as a separate calculation.

Is a largest common denominator calculator different from an HCF calculator?

Not when the request means the largest shared divisor of whole numbers. That is the HCF. For fractions, the related term is least common denominator, which comes from the LCM of the denominators.

What happens if one input is zero?

Zero is allowed alongside at least one nonzero integer. The HCF is the HCF of the remaining values, such as HCF(0, 45, 75) = 15.

Can I enter negative integers?

Yes. The calculator uses absolute values for the factor calculation, so HCF(-24, 60, 0) is 12.

Further reading: Greatest Common Divisor, MathWorld

Privacy, kept simple.

Calculator inputs are processed in your browser. This application does not submit your numbers to a calculator API, save a calculation history, or require an account.

Normal hosting request logs and platform services may still process technical data such as your IP address. This is not a claim that the hosting platform collects no information.

This site includes Google AdSense advertising code. Google and its partners may process browsing and device information and use cookies, depending on consent and advertising settings. Advertising approval and consent configuration are separate from installing this script.