Break a number down into its prime factors with an interactive factor tree and exponential form. Add a second number to find the greatest common factor and least common multiple.
Prime factors
2^3 × 3^2 × 5
Number of factors
6
Calculator
Prime factorization
2^3 × 3^2 × 5
360 expands into 6 prime factors.
Factorization
2^3 × 3^2 × 5
Factor tree
How prime factorization works
Every whole number above 1 is either prime or can be written as a unique product of primes — this is the fundamental theorem of arithmetic. The calculator divides the number by the smallest prime that fits, again and again, until only 1 remains. The factor tree shows each split, and repeated primes are collected into exponents.
With two numbers, the greatest common factor is the product of the primes they share (each to the lower power), and the least common multiple is the product of all primes that appear (each to the higher power). Equivalently, GCF × LCM = a × b.
What is a factor tree?
A factor tree shows the step-by-step breakdown of a number into primes. At each step the number is split into a prime factor and what remains, and the branches end at prime leaves that can’t be split further.
How are GCF and LCM found from the factors?
Line up the prime factorizations of both numbers. The GCF multiplies the shared primes raised to the smaller exponent; the LCM multiplies every prime that appears raised to the larger exponent.
How big a number can it factor?
It factors integers up to about a trillion using trial division. Very large numbers with two big prime factors can take a moment, but ordinary numbers are instant.
Results are estimates. Verify with a professional for important decisions.
About this calculator
This calculator breaks any whole number into its prime building blocks, shows a visual factor tree, and — when you enter a second number — computes the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of the pair. Use it to simplify fractions, find common denominators, or explore the structure of numbers.
How to read your results
The headline result shows the exponential prime factorization (for example 2³ × 3² × 5 for 360). Colored circles in the factor tree represent prime factors; open circles are the composite nodes being split. Below the tree, the GCF and LCM are listed only when you have entered a second number.
Worked example
Enter 360 as the first number and 48 as the second.
360 = 2³ × 3² × 5 and 48 = 2⁴ × 3. Sharing three 2s and one 3 gives a GCF of 24. The LCM is 720 — the smallest number both divide into evenly.
Frequently asked questions
What is prime factorization?
Prime factorization is the process of writing a number as a product of prime numbers — numbers divisible only by 1 and themselves. The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one such representation (ignoring the order of factors).
How are the GCF and LCM calculated from prime factors?
The GCF is found by multiplying each prime that appears in both factorizations, using the smaller exponent. The LCM uses each prime that appears in either factorization, using the larger exponent. For 360 = 2³ × 3² × 5 and 48 = 2⁴ × 3, the GCF is 2³ × 3 = 24 and the LCM is 2⁴ × 3² × 5 = 720.
What does it mean if my number is flagged as prime?
A prime number cannot be broken down further — its only prime factor is itself. Primes have no factor tree; they are the atoms from which all other whole numbers are built.
How it's calculated
Factorization uses trial division: the number is repeatedly divided by 2, then by odd integers starting at 3, up to its square root. Each divisor found is a prime factor; its exponent counts how many times it divides the number. The GCF is then computed with the Euclidean algorithm (repeatedly replacing the larger value with the remainder of dividing by the smaller), and the LCM follows from GCF × (a / GCF) × b to avoid overflow for large inputs.
Spot a translation issue, a calculation issue, or have a suggestion? Let us know.