Math · Every step shown

GCF & LCM Calculator

Greatest common factor and least common multiple. Free, with the full step-by-step solution and no login.

Enter your numbers

Press Solve with steps to see the answer and how to get it.

Job: Number theory
Your answer

Press Solve with steps to see the answer and every step.

How it works, examples and FAQ

The greatest common factor (GCF) is the biggest number that divides all of your numbers evenly. The least common multiple (LCM) is the smallest number that all of them divide into evenly.

We find the GCF with Euclid's method: divide the bigger number by the smaller, then repeat with the remainder until it hits 0. The last divisor is the GCF. Then LCM(a, b) = a × b ÷ GCF(a, b).

Example: for 12 and 18, 18 = 1 × 12 + 6 and 12 = 2 × 6 + 0, so the GCF is 6 and the LCM is 12 × 18 ÷ 6 = 36.

What is the GCF used for?
Simplifying fractions. Divide the top and bottom by their GCF to reduce to lowest terms.

What is the LCM used for?
Finding a common denominator when adding or subtracting fractions, and for scheduling problems like when two repeating events line up.

Can I use more than two numbers?
Yes, up to ten at once.

More math calculators

Snap a photo of a problem →   All math tools →   All calculators →

These calculators show the method as well as the answer, so you can learn the steps and check your own work. Answers are rounded to six decimal places. If a result ever looks wrong, tell us on the Contact page with the numbers you entered.

Save or print your results

On a phone, choose Save as PDF on the next screen to keep a copy.