# GCF and LCM Calculator

URL: https://speedycalculator.com/calculators/math/gcf-and-lcm/
Last updated: 2026-10-30

> The GCF and LCM calculator finds both the greatest common factor and the least common multiple of up to 15 whole numbers, using prime factorisation.

## Inputs

- Numbers (2 to 15 whole numbers)

## Results

- GCF
- LCM
- Prime factorisations
- Check

## Formula

```
GCF: shared primes at their lowest powers
LCM: all primes at their highest powers
For two numbers: GCF × LCM = a × b
```

## Explanation

GCF and LCM are two sides of the same coin. The GCF tells you the largest equal groups you can split items into; the LCM tells you when repeating events coincide and gives common denominators.

### How to use the GCF and LCM Calculator

- Type the numbers separated by commas, spaces or new lines.
- Read the result – it updates as you type.

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Each number is written as a product of primes. The GCF keeps only the primes they all share, at the smallest power; the LCM keeps every prime that appears, at the largest power.

## Worked example

Inputs — Numbers (2 to 15 whole numbers): 12, 18.

Results — **GCF = 6**; LCM = 36; Prime factorisations = 12 = 2² × 3
18 = 2 × 3²
Shared primes at their lowest power: 2 × 3 = 6
Every prime at its highest power: 2² × 3² = 36; Check = GCF × LCM = 216 = 12 × 18.

## Key terms

- **Least common multiple (LCM)**: The smallest positive number that is a multiple of each number.

## FAQ

**What is the difference between GCF and LCM?**
GCF is the biggest number that divides them all; LCM is the smallest number they all divide.

**What are the GCF and LCM of 12 and 18?**
GCF 6, LCM 36.

**Why is GCF × LCM = a × b?**
Each prime's lowest and highest powers together use up all of a and b.

**Does that hold for three numbers?**
No – only for two numbers.


## Sources

- [OpenStax – Prealgebra 2e](https://openstax.org/details/books/prealgebra-2e)
- [Wolfram MathWorld – Least common multiple](https://mathworld.wolfram.com/LeastCommonMultiple.html)
