GCF and LCM calculator
Greatest common factor, least common multiple and the primes behind them.
Output
Paste or type above to see the result here.
Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
How it works
- Type two or more whole numbers on a line, separated by spaces or commas — or a single number to factor it into primes.
- Put each problem on its own line to work several at once.
- The GCF and LCM appear first, then the prime factorization, the division ladder and, for two numbers, Euclid’s algorithm and a check.
Frequently asked questions
- How do you find the GCF and LCM with prime factorization?
- Factor each number into primes: 12 = 2² × 3 and 18 = 2 × 3². The GCF takes the primes they share, each with its smaller power: 2 × 3 = 6. The LCM takes every prime with its greater power: 2² × 3² = 36.
- What is the division ladder?
- The numbers are divided side by side by primes until only ones are left. The primes that divided every number (marked *) multiply to the GCF; all the primes together multiply to the LCM.
- What is Euclid’s algorithm?
- Divide the larger number by the smaller and keep the remainder; then divide the smaller by the remainder, and so on. The last remainder that is not zero is the GCF: 18 = 1 × 12 + 6, 12 = 2 × 6 + 0, so the GCF is 6.
- Is GCF the same as HCF and GCD?
- Yes: greatest common factor, highest common factor and greatest common divisor are three names for the same number.
- Is anything uploaded?
- No. It is worked out in your browser, and nothing you type leaves your computer.
Related tools
½ Fraction calculator Fractions worked out step by step, the way school teaches them. ÷ Long division calculator Long division set out digit by digit, with every step in words. x² Quadratic equation solver The quadratic formula, worked through to the exact answer. σ Mean, median and standard deviation calculator A list of numbers in, the statistics and the working out.