Calculyn

LCM and GCF Calculator

Find the greatest common factor and least common multiple of two whole numbers.

Results update as you type.

Greatest common factor

6
Least common multiple
36

Was this calculator helpful?

How to calculate lcm & gcf

GCF via Euclid's algorithm · LCM = a × b ÷ GCF

Worked example. Greatest common factor: 6.

Example inputs — First number: 12; Second number: 18. Starting values are illustrative.

From George Guju, founder of Calculyn · Educational calculator guidance, not professional advice.

How it works

The GCF is the largest number that divides both numbers evenly. The LCM is the smallest number both divide into. They're linked: LCM = a × b ÷ GCF.

Assumptions & limitations

  • Results are rounded for display.

Formula and assumptions reviewed October 2026 by the Calculyn team. How we build our calculators

Frequently asked questions

What's GCF used for?

Simplifying fractions: divide the top and bottom by their GCF.

What's LCM used for?

Finding a common denominator when adding fractions.