Premium tools, free for everyone. Most run right in your browser.

OpenMultiURL

LCM and GCF Calculator

The LCM and GCF Calculator finds the lowest common multiple and the greatest common factor (also called the HCF or GCD) of 2 to 50 whole numbers. It lists the prime factors of each number and shows how both answers come from them.

  • Free, no subscriptions
  • Runs in your browser
  • Checked by AK Shine
See how it works before you use your own.

2 to 50 whole numbers from 1 to 1,000,000,000,000, separated by commas, spaces or new lines.

–GCF (also called HCF or GCD)
–LCM (lowest common multiple)
–GCF × LCM

Type at least two whole numbers.

Prime factors of each number
NumberPrime factors

What is the LCM and GCF Calculator?

The LCM and GCF Calculator reads a list of whole numbers and gives two answers. The greatest common factor is the largest number that divides every number in the list exactly; in India and the UK it is often called the HCF, and programmers call it the GCD. The lowest common multiple is the smallest number that every number in the list divides into. The tool splits each number into prime factors, then builds the GCF from the primes they all share at the lowest power and the LCM from every prime at the highest power, which is the method taught in school. Students, teachers, and anyone lining up repeating schedules or cutting equal pieces use it. It runs in your browser.

Who it is for: School and exam students, teachers writing answer keys, competitive exam aspirants practising HCF and LCM questions, and anyone timing repeating events.

How to use the LCM and GCF Calculator

  1. Type or paste two or more whole numbers, such as 12, 18, 30.
  2. Read the GCF (HCF) and the LCM under the box.
  3. Check the prime factors of each number in the table.
  4. Read the line that shows which primes and powers make each answer.

Why use it

  • Both answers at onceType the numbers once and see the GCF and the LCM side by side.
  • Prime factor tableEach number is broken into primes with powers, such as 360 = 2³ × 3² × 5, so you can check the method.
  • Up to 50 numbersPaste a long list separated by commas, spaces or new lines; numbers up to one trillion work and the LCM stays exact however large it gets.
  • Spot coprime numbersWhen the GCF is 1 the tool tells you the numbers share no factor, which matters for simplifying fractions and ratios.

At a glance

What you put in
2 to 50 whole numbers from 1 to 1,000,000,000,000, separated by commas, spaces or new lines
What you get
Greatest common factor (HCF, GCD), lowest common multiple, prime factors of each number and the working
Limits
Whole numbers only; no zero, negatives or decimals; up to 50 numbers
Privacy
Runs in your browser. Nothing you enter is uploaded or stored.
Price
Free for everyone. No subscriptions, no payments, no watermark.
Works offline
Yes, once the page has loaded
Last checked
by AK Shine

Worked example

Input
Whole numbers: 12, 18, 30
Result
GCF (HCF): 6
LCM: 180
Prime factors: 12 = 2² × 3; 18 = 2 × 3²; 30 = 2 × 3 × 5

All three share 2 and 3, each at least once, so the GCF is 2 × 3 = 6. The LCM takes every prime at its highest power: 2² × 3² × 5 = 4 × 9 × 5 = 180.

When to use something else

  • Only positive whole numbers are accepted. For fractions, find the LCM of the denominators instead, or use the Fraction Calculator, which finds the common denominator for you.
  • Factorising a number close to one trillion that has two large prime factors takes a moment on an older phone.
  • For polynomials or algebraic expressions, use a computer algebra system; this tool works with numbers only.

Add this calculator to your website

Copy this code into any page of your site or blog. The calculator works inside your page, free, with no sign up for your readers and no ads inside it.

Preview

Questions people ask

What is the difference between HCF, GCF and GCD?

They are the same thing: the highest common factor, greatest common factor and greatest common divisor all mean the largest whole number that divides every number in the list with nothing left over. HCF is common in India and the UK, GCF in the US, and GCD in programming.

How do you find the LCM using prime factors?

Write each number as a product of primes, then take every prime that appears at its highest power and multiply. For 12 = 2² × 3 and 18 = 2 × 3², the LCM is 2² × 3² = 36.

Is there a quick link between the LCM and GCF of two numbers?

Yes. For two numbers, GCF × LCM equals the product of the numbers. For 12 and 18, 6 × 36 = 216 = 12 × 18. The tool shows this check when you enter exactly two numbers. It does not hold for three or more.

What does it mean when the GCF is 1?

The numbers are coprime: they share no factor other than 1, as with 8 and 9. Their LCM is then just their product, 72. A fraction whose top and bottom are coprime is already in lowest terms.

Where are LCM and GCF used in real life?

The LCM tells you when repeating things line up again, such as two buses leaving every 12 and 18 minutes meeting every 36 minutes. The GCF tells you the largest equal pieces you can cut, such as strips from boards 12 and 18 metres long, which is 6 metres.

Can I enter more than two numbers?

Yes, up to 50. The GCF of a list is the GCF of the first two, then of that answer with the next number, and so on; the LCM works the same way. The tool does this for you.

Is the LCM and GCF Calculator free and private?

Yes. It is free with no subscriptions, and the numbers stay in your browser. Once the page has loaded it also works offline.

Next, you might need