Skip to main content

Find your next tool

Fraction Calculators

GCF and LCM Calculator with Prime Factor Steps

GCF (HCF) and LCM of up to 10 whole numbers with free steps: prime factor trees, Euclid’s algorithm and the ladder method. Exact up to 40 digits.

Live calculationWorking shown

Editable live calculator

Change any input — the result updates immediately

No hidden assumptions. Inputs, units and the working stay visible so you can check the calculation.

Calculated result

GCF 12 · LCM 3600

Greatest common factor (GCF, also called HCF or GCD) = 12

Least common multiple (LCM) = 3600

Ladder (cake) method

Divide by48180300
22490150
2124575
341525
5435

Prime factor trees

48 = 2 × 2 × 2 × 2 × 3
482242122623
180 = 2 × 2 × 3 × 3 × 5
18029024531535
300 = 2 × 2 × 3 × 5 × 5
300215027532555
Show the working
  1. 1. Method 1, prime factorization: write each number as a product of primes.
  2. 2. 48 = 2^4 × 3
  3. 3. 180 = 2^2 × 3^2 × 5
  4. 4. 300 = 2^2 × 3 × 5^2
  5. 5. GCF: keep only the primes that divide every number, each with its smallest exponent:
  6. 6. 2^2 × 3 = 12
  7. 7. LCM: keep every prime that appears, each with its largest exponent:
  8. 8. 2^4 × 3^2 × 5^2 = 3600
  9. 9. Method 2, Euclid's algorithm: divide the larger number by the smaller, then the divisor by the remainder, until the remainder is 0. The last divisor is the GCF.
  10. 10. With more than two numbers, repeat with the running GCF and the next number: GCF(a, b, c) = GCF(GCF(a, b), c).
  11. 11. 180 = 3 × 48 + 36
  12. 12. 48 = 1 × 36 + 12
  13. 13. 36 = 3 × 12 + 0
  14. 14. GCF(48, 180) = 12
  15. 15. 300 = 25 × 12 + 0
  16. 16. GCF(12, 300) = 12
  17. 17. LCM from the GCF, one pair at a time: LCM(a, b) = a × b ÷ GCF(a, b).
  18. 18. LCM(48, 180) = 48 × 180 ÷ 12 = 720
  19. 19. LCM(720, 300) = 720 × 300 ÷ 60 = 3600
  20. 20. Method 3, ladder (cake) method, in the table: divide the row by a prime that divides every number, as long as one exists; those divisors multiply to the GCF. Then divide by primes that divide at least two numbers, carrying the others down unchanged. The LCM is every divisor times the bottom row.
  21. 21. GCF from the ladder, the divisors used while every number could be divided:
  22. 22. 2 × 2 × 3 = 12
  23. 23. LCM from the ladder, every divisor times the numbers left in the bottom row:
  24. 24. 2 × 2 × 3 × 5 × 4 × 3 × 5 = 3600
More actions

Shared links reopen these inputs. Recent and saved calculations stay in this browser unless you clear site data.

The calculation, without hidden assumptions

The GCF of 48, 180 and 300 is 12 and their LCM is 3600. Type your own numbers and the calculator shows the same answer three ways, the way teachers mark it: a prime factor tree for each number, Euclid’s division steps, and the ladder (cake) table. Everything runs in your browser with exact whole-number arithmetic, so a 30-digit number is handled as exactly as a 2-digit one, and no step is hidden behind a sign-up.

How to use this calculator

1

Type 2 to 10 whole numbers from 1 upward, separated by commas, spaces or new lines.

2

Read the GCF and LCM at the top, then open the working: prime factorizations first, then Euclid’s divisions, then the ladder table. To see one method only, pick it under “Show the working for”.

3

Use the factor trees to check homework that asks you to “show the factor tree”, and the ladder table for the division (cake) method.

4

Copy the result, print it, or download a CSV with each number’s prime factorization.

Where people use it

  • •Simplifying a fraction: divide the top and bottom by their GCF.
  • •Adding fractions: the LCM of the denominators is the lowest common denominator.
  • •Word problems: the largest equal groups (GCF) or the first time two cycles line up again (LCM).

Example: 48, 180 and 300

Prime factors: 48 = 2^4 × 3, 180 = 2^2 × 3^2 × 5 and 300 = 2^2 × 3 × 5^2. The primes shared by all three are 2^2 and 3, so the GCF is 12. Taking every prime at its highest power gives 2^4 × 3^2 × 5^2 = 3600, the LCM. Euclid agrees: 180 = 3 × 48 + 36, 48 = 1 × 36 + 12 and 36 = 3 × 12 + 0, so GCF(48, 180) = 12, and 300 = 25 × 12 + 0 keeps it at 12.

What the result does not assume

  • •Whole numbers from 1 upward only. 0 has no greatest common factor with other numbers in the school sense, and fractions or decimals need the fraction tools instead.
  • •For a number made of two large primes of more than about 10 digits each, the prime factorization can stop at its time limit. The GCF and LCM are still exact, because Euclid’s algorithm does not need the factors.
  • •Factor trees are drawn for numbers up to 15 digits with at most 24 prime factors; larger cases keep the written steps.
  • •Exponents are written as 2^4, meaning 2 × 2 × 2 × 2.

Frequently asked questions

What is the difference between GCF, HCF and GCD?+

None. Greatest common factor (GCF), highest common factor (HCF) and greatest common divisor (GCD) are three names for the same number: the largest whole number that divides all the given numbers without a remainder.

How do you find the LCM using prime factorization?+

Write each number as a product of primes and take every prime at the highest power it reaches in any of the numbers. For 48 = 2^4 × 3, 180 = 2^2 × 3^2 × 5 and 300 = 2^2 × 3 × 5^2 that is 2^4 × 3^2 × 5^2 = 3600.

What is the ladder or cake method?+

You divide the whole row of numbers by a prime that goes into all of them, again and again; those divisors multiply to the GCF. Then you keep dividing by primes that go into at least two numbers. The LCM is all the divisors times the numbers left at the bottom.

Is GCF × LCM always equal to the product of the numbers?+

Only for two numbers. For 48 and 180, 12 × 720 = 8640 = 48 × 180. With three or more numbers the rule no longer holds, so combine them one pair at a time instead.

Can I use this for more than two numbers?+

Yes. Enter up to 10 numbers. The prime factorization and ladder methods handle them all at once, and Euclid’s algorithm runs pair by pair: GCF(a, b, c) = GCF(GCF(a, b), c).

Semantic next steps

Continue the calculation

These links move to a different input, formula or project stage rather than a keyword variation of this page.

Fraction Calculators

Fraction Simplifier — Reduce to Lowest Terms

Reduce a fraction to lowest terms using the greatest common divisor, normalize the sign, and show decimal and mixed-number forms with the reduction step.

Fraction Calculator — Add, Subtract, Multiply & Divide

Calculate two fractions with exact integer arithmetic, simplify the result, show improper and mixed-number forms, and follow the common-denominator or reciprocal steps.

Ratio Calculator

Simplify integer or decimal ratios, solve a missing proportion value, scale a ratio, and split a total into proportional shares with visible working.

Mixed Number ↔ Improper Fraction Calculator

Convert mixed numbers to improper fractions or improper fractions back to mixed form, with sign handling, simplification and the multiplication-plus-remainder steps shown.

Decimal ↔ Fraction Calculator — Exact Steps & Mixed Number

Convert a terminating decimal to an exact simplified fraction or convert a fraction back to decimal, with the place-value fraction, GCD reduction and mixed-number form shown.

Percentage Calculator

Solve percentage-of, what-percent, increase or decrease, percentage change, percentage difference and reverse percentage problems with the substituted working shown.

Inch Fraction Calculator — Decimal, Millimeters & Tape-Measure Fractions

0.394 in is 3/8 in to the nearest 1/16 (25/64 at 1/64) and 16 mm is 5/8 in. Round decimal inches or mm to 1/2–1/64 in, or turn a fraction into decimal and mm.

Feet and Inches Calculator

Add, subtract, multiply, divide or convert feet and inches, including decimal and fractional inch inputs, with decimal feet and metric equivalents.

Round a lab result to the right significant figures

Free publisher widget

Put this calculator on your website

Give readers the live calculator without rebuilding the math. Copy the responsive embed in one click, or customize width, height, border and corner radius before publishing. The branded MAXScanner attribution stays visible.

Preview

Calculator embed HTML

Paste this code into your page. Focus the code box to select it manually.

Keep the result connected to the real job

MAXScanner keeps the formula and assumptions beside the result so you can verify the number before using it in a drawing, estimate, specification, worksheet or document. Where a supplier, manufacturer, drawing or applicable standard owns a requirement, that source remains authoritative.