Home / Blog / Article

GCF & LCM Calculator: Find Common Factors and Multiples

GCF & LCM Calculator

The GCF & LCM Calculator on LA Calculator finds the greatest common factor and least common multiple of two integers. Enter your numbers and select Calculate to see both answers together, along with a brief calculation explanation.

The tool uses two separate input fields and requires no mode selection. You can calculate with positive integers, negative integers, or zero.

What the GCF & LCM Calculator Does

The greatest common factor, or GCF, is the largest positive integer that divides both numbers without leaving a remainder. It is also called the highest common factor, or HCF. For example, the GCF of 24 and 36 is 12 because 12 divides both numbers evenly, and no larger integer does.

The least common multiple, or LCM, is the smallest positive integer divisible by both nonzero input numbers. For 24 and 36, that number is 72.

These results answer different questions: the GCF identifies the largest shared factor, while the LCM identifies the smallest shared positive multiple. The calculator displays both in the same result area.

How to Use the GCF & LCM Calculator

Enter one number in the First integer field and the other in Second integer. Select Calculate to run the calculation.

Read the two labeled answers in the result area. Below them, the calculator provides a statement of the GCF and shows the formula calculation used to obtain the LCM.

Use Copy result when you want to reuse the displayed answer. Select Reset when you are ready to start another calculation.

GCF and LCM Explained with a Worked Example

Consider the integers 24 and 36. Their common positive factors are:

1, 2, 3, 4, 6, and 12.

The largest is 12, so:

GCF(24, 36) = 12

For two nonzero integers, the relationship between their GCF and LCM is:

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

The vertical bars indicate the absolute value. Substituting the example values gives:

LCM(24, 36) = |24 × 36| ÷ 12 = 72

The calculator’s explanation uses an equivalent arrangement, dividing one input by the GCF before multiplying:

|24 ÷ 12 × 36| = 72

You can verify that 72 is a multiple of both inputs: 72 ÷ 24 = 3, and 72 ÷ 36 = 2.

Working with Negative Integers, Zero, and Large Numbers

For negative inputs, the calculator uses absolute values to determine the GCF and returns a nonnegative LCM. Entering −24 and 36 therefore produces a GCF of 12 and an LCM of 72.

When one input is zero and the other is nonzero, the GCF equals the absolute value of the nonzero number. The LCM is zero by convention. For example, entering 0 and 36 gives a GCF of 36 and an LCM of 0.

If both inputs are zero, the calculator reports the GCF as undefined and the LCM as zero by convention.

The tool also checks its supported integer range. Values that are too large for an exact result produce an error.

Conclusion

Use this calculator to find both common-factor and common-multiple results from a pair of integers. The accompanying formula helps you follow the LCM calculation, while simple division provides a way to review your answers.

For related numerical work involving powers and square roots, explore the Power & Root Calculator guide.