MyCalCute
Install
Calculators / Math / Factors, GCF and LCM

Factors, GCF and LCM calculator

Find factors, greatest common factor, least common multiple and prime factors for two positive integers.

On this page

Your result

Greatest common factor42
Least common multiple252
Factors of A1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84
Prime factorization of A2 × 2 × 3 × 7

Calculator controls

How to calculate

Find factors, greatest common factor, least common multiple and prime factors for two positive integers.

Use Euclid’s algorithm for GCF; LCM = a×b/GCF; factor each number by trial division.

Worked example

Positive whole number A: 84; Positive whole number B: 126.

Greatest common factor: 42 ; Least common multiple: 252 ; Factors of A: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84 ; Prime factorization of A: 2 × 2 × 3 × 7 .

Assumptions and limits

Large prime values can take longer to factor. Inputs are limited to one billion.

Results are rounded for display; calculations use unrounded values. Read our calculation methodology.

Understanding the result

Find factors, greatest common factor, least common multiple and prime factors for two positive integers. The displayed figures use the inputs and formula shown on this page.

When this tool is useful

Use the factors, gcf and lcm to compare a scenario, check an estimate, or verify a manual calculation.

Understanding your inputs

InputWhat to enter
Positive whole number AEnter a number of at least 1 and no more than 1000000000.
Positive whole number BEnter a number of at least 1 and no more than 1000000000.

Frequently asked questions

What should I check before using the factors, gcf and lcm result?

Large prime values can take longer to factor. Inputs are limited to one billion.

Is this factors, gcf and lcm result exact?

It is exact for the stated mathematical model and entered values. Real-world results can differ when rates, timing, fees, definitions or measurement conditions differ.