Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Factor Tree & GCF / LCM Calculator

Enter one number to see its factor tree and prime factorization, or enter two numbers to find their Greatest Common Factor and Least Common Multiple. A Venn diagram shows which prime factors are shared and which are unique.

Enter one number for its factor tree, or two numbers for GCF and LCM.

Try an example

Factor Trees

Factor tree of 12

123422

Factor tree of 18

183623

Prime Factor Venn Diagram

121822, 3shared3GCF = 6LCM = 36

Prime Factorization

12=22×312 = 2^{2} \times 3
18=2×3218 = 2 \times 3^{2}

GCF

6

Greatest Common Factor

LCM

36

Least Common Multiple

Check: 6×36=2166 \times 36 = 216 and 12×18=21612 \times 18 = 216

All Factors

12: 1, 2, 3, 4, 6, 12(6 factors)

18: 1, 2, 3, 6, 9, 18(6 factors)

Open this tool with your own values

This tool reads its inputs from the page address, so a link can open it with the values from a problem already entered. Include every value the problem needs, because one left out keeps the tool's default. Use plain numbers in the stated units.

a
whole number of 2 or more to factor
b
second whole number, to also get the GCF and LCM

Example link

Reference Guide

Prime Factorization

Every whole number greater than 1 can be written as a product of prime numbers. This is called its prime factorization.

60=22×3×560 = 2^2 \times 3 \times 5

A factor tree breaks a number down step by step. Split the number into any two factors, then keep splitting until every branch ends at a prime number.

Greatest Common Factor (GCF)

The GCF of two numbers is the largest number that divides both of them evenly. To find it using prime factorizations, multiply together the prime factors they have in common, using the smaller exponent for each.

12=22×312 = 2^2 \times 3 18=2×3218 = 2 \times 3^2 GCF=2×3=6\text{GCF} = 2 \times 3 = 6

Least Common Multiple (LCM)

The LCM of two numbers is the smallest number that both divide into evenly. To find it, multiply all prime factors from both numbers, using the larger exponent for each.

12=22×312 = 2^2 \times 3 18=2×3218 = 2 \times 3^2 LCM=22×32=36\text{LCM} = 2^2 \times 3^2 = 36

The GCF × LCM Rule

For any two numbers aa and bb, there is a useful relationship between their GCF and LCM.

GCF(a,b)×LCM(a,b)=a×b\text{GCF}(a, b) \times \text{LCM}(a, b) = a \times b

For example, with 12 and 18 6×36=2166 \times 36 = 216 and 12×18=21612 \times 18 = 216. This works because the Venn diagram accounts for every prime factor exactly once.

Related Content