CraftTools

GCD & LCM Calculator

Guide: GCD, LCM and Fractions: How They Connect

Greatest common divisor (GCD)
6

The biggest number that divides all of them

Least common multiple (LCM)
144

The smallest number they all divide into

Prime factors

  • 48 = 2^4 × 3
  • 18 = 2 × 3^2

Euclid’s algorithm

Divide the bigger number by the smaller one, keep the remainder, and repeat until the remainder is 0. The last divisor is the GCD.

  • 48 = 2 × 18 + 12
  • 18 = 1 × 12 + 6
  • 12 = 2 × 6 + 0

Nothing you enter or choose here leaves your device. This tool runs in your browser.

How to use

  1. 1Type two or more whole numbers, separated by commas or spaces.
  2. 2Read the GCD and the LCM.
  3. 3Check the prime factors and the steps of Euclid's algorithm.

Frequently asked questions

What is the GCD?

The greatest common divisor, also called the highest common factor (HCF), is the largest number that divides all your numbers exactly. For 48 and 18 it is 6.

What is the LCM?

The least common multiple is the smallest number that all your numbers divide into exactly. For 4 and 6 it is 12.

How do GCD and LCM relate?

For two numbers, GCD x LCM equals the two numbers multiplied together. That is how the LCM is found from the GCD.

Can I use very large numbers?

Yes, the GCD and LCM work for numbers of any size. Prime factors are shown for numbers up to about a trillion.

Is my data sent anywhere?

No. Everything is worked out in your browser and nothing is sent to us.

Read the guide

Learn how this works and how to get the most from it.

Money, health & time

GCD, LCM and Fractions: How They Connect

How to find the greatest common divisor and least common multiple, and how they help you simplify and add fractions step by step.

1 min read

Fraction Calculator

Add, subtract, multiply and divide fractions and mixed numbers.

Mean, Median & Mode Calculator

Find the average, median, mode and range of any list of numbers.

Number Base Converter

Convert between binary, octal, decimal, hexadecimal and any base to 36.

Percentage Calculator

Find percentages, percentage change and percent increase or decrease.