LCM & GCF

LCM & GCF Calculator

Enter two or more whole numbers separated by commas, spaces, tabs or new lines. You get the greatest common factor and least common multiple, the prime factorisation of every number, and the working behind both answers — calculated exactly, with no rounding.

Back

1. Numbers

2 – 50 whole numbers

Accepted: non-zero whole numbers, optionally with a leading + or −, up to 12 digits each. Negative numbers are converted to their absolute values. Press Ctrl/Cmd + Enter in the box to calculate.

2. Result

—
Enter at least two integers and press Calculate.
About this tool

About LCM & GCF Calculator

LCM & GCF Calculator finds the greatest common factor (also called GCD or HCF) and the least common multiple of two or more whole numbers. It shows the prime factorisation of every number, the prime powers used for each answer and a check with Euclid’s algorithm, all calculated exactly.

GCF and LCM come up when simplifying fractions, adding fractions with different denominators, scheduling repeating events and splitting items into equal groups. Seeing the factorisation and the steps makes the answer easy to check and to learn from.

How to use

Step by step

  1. Type or paste two or more integers, separated by commas, spaces, tabs or new lines.
  2. Press Calculate LCM & GCF (or Ctrl/Cmd + Enter in the box).
  3. Read the GCF and LCM, and their prime-power forms.
  4. Review the prime factorisation of each number and the calculation steps.
  5. Copy the summary or download it as a text file.
Key features

What it offers

  • GCF (GCD) and LCM for 2 to 50 integers
  • Prime factorisation of every number with exponents
  • Prime-power working for both answers, plus a Euclid’s algorithm check
  • Negative numbers handled through absolute values, with an explanation
  • Exact arbitrary-precision results — very large LCMs are never rounded
  • Clear messages for zero, decimals, malformed values and too many digits
Best practices

Tips for best results

  • Use the GCF to simplify a fraction: divide the numerator and denominator by it.
  • Use the LCM as the common denominator when adding or subtracting fractions.
  • A GCF of 1 means the numbers are coprime; their LCM is then their product.
  • Remove zeros before calculating — every number divides 0, so it has no factorisation.
Benefits

Why people use it

Shows the working

Factorisations and steps, not just the answer.

Exact

Big-integer arithmetic with no overflow or rounding.

Flexible input

Paste lists separated by commas, spaces, tabs or lines.

Private

Calculated entirely in your browser.

FAQ

Common questions

The greatest common factor (also called GCD or HCF) is the largest whole number that divides every number in your list. The least common multiple is the smallest positive whole number that every number in your list divides into.
Write each number as a product of primes. The GCF uses only the primes shared by every number, each raised to its smallest power. The LCM uses every prime that appears in any number, each raised to its largest power.
GCF and LCM are defined as positive values, so the calculator uses the absolute value of each number: −12 is treated as 12. The results are the same as for the positive numbers, and the tool tells you which values were converted.
Every whole number divides 0, so 0 has no prime factorisation and the LCM of a list containing 0 is 0 by convention. To keep the factorisation steps meaningful, enter non-zero integers only.
Each number can have up to 12 digits (less than 1,000,000,000,000), and you can enter 2 to 50 numbers. The LCM can be far larger and is calculated exactly with arbitrary-precision integers, so it is never rounded.
The numbers share no prime factor, so they are called coprime (or relatively prime). Their LCM is then the product of their absolute values.
No. All factorisation and arithmetic run in your browser.
Private by design

This runs entirely in your browser

No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.

Install Toolisco Add it to your device for offline, one-tap access.