Skip to content
CalculatorsRuns in your browser

GCF and LCM Calculator

Greatest common factor and least common multiple of two or more numbers.

Input
No upload needed — instant
Privacy
Nothing is uploaded
Cost
Free · no sign-up · no watermark

Loading tool…

The tool is loading its code on your device. This happens once and is cached for later visits.

Processed entirely on your device

Everything you type or paste is handled by JavaScript running in this tab. No request is sent, nothing is logged and nothing is stored. Close the page and it is gone.

Overview

About the GCF and LCM Calculator

Find the greatest common factor (GCF) and least common multiple (LCM) of two or more whole numbers, with the prime factorisation of each shown.

The greatest common factor and least common multiple are the two workhorses of fraction arithmetic. Enter any set of whole numbers and this calculator returns both, plus the prime factorisation of each input so you can see the shared factors directly.

What they mean

GCF(12, 18) = 6   → the largest number dividing both
LCM(12, 18) = 36  → the smallest number both divide into

For two numbers the identity GCF × LCM = a × b always holds — here 6 × 36 = 216 = 12 × 18.

How they are computed

The GCF uses Euclid's algorithm, repeatedly replacing the larger number by the remainder until one reaches zero. The LCM is then a × b ÷ GCF, extended across the whole list. Prime factorisation is shown for verification.

Private and instant

All of it runs in your browser with exact integer arithmetic. Nothing is uploaded.

Step by step

How to use the GCF and LCM Calculator

  1. Enter two or more whole numbers, separated by commas or spaces.

  2. Read the greatest common factor and the least common multiple.

  3. Check the prime factorisation table to see where they come from.

Why use it

Benefits and common use cases

What this tool is good for, and what it deliberately does not try to do.

Two or more numbers

Not limited to a pair — add as many whole numbers as you like and the GCF and LCM are computed across all of them.

Prime factorisation shown

A table breaks each number into its prime factors, which makes the common factors and multiples easy to verify by hand.

Fast integer maths

Uses Euclid's algorithm, so even large numbers resolve instantly without rounding.

Questions

Frequently asked questions

Short, honest answers about quality, limits and privacy.

What is the difference between GCF and LCM?

The GCF (greatest common factor) is the largest number that divides all the inputs evenly. The LCM (least common multiple) is the smallest number that all the inputs divide into. One is about sharing factors, the other about sharing multiples.

How do I find the LCM of fractions?

Add or subtract fractions by taking the LCM of their denominators as the common denominator. Find that LCM here, then use the fraction calculator to combine them.

Does GCF × LCM equal the product?

For two numbers, yes: GCF(a,b) × LCM(a,b) = a × b. That identity is a quick way to check your answer, and the calculator shows the product for you.