Factor Tree Calculator
Enter any positive integer and watch a beautiful factor tree grow, splitting composite numbers into branches until every leaf is prime.
Factor Tree
Prime Factorization
Decomposition Steps
What Is a Factor Tree?
A factor tree is a branching diagram that visually decomposes a composite number into its prime factors. You begin with the original number at the top, then split it into any two factors. Each composite factor splits again until every endpoint — every leaf — is a prime number. Gathering all the prime leaves together gives you the complete prime factorization.
The beauty of factor trees lies in their flexibility: you can start splitting from any factor pair you like, and the primes at the leaves will always be the same. Whether you split 72 as 8 × 9 or as 2 × 36, the leaves will always be 2, 2, 2, 3, 3 — because 72 = 2³ × 3². Factor trees are a favorite teaching tool in elementary and middle-school math for exactly this reason.
Factor Tree Anatomy
Root Node
The original number at the top of the tree
Branches
Lines connecting parent nodes to child factors
Prime Leaves
Circled primes that cannot be split further
How to Use the Factor Tree Calculator
Build a visual factor tree for any number in three steps.
Enter a Number
Type any positive integer ≥ 2. Try numbers like 72, 120, or 180 for interesting trees.
Click "Build Factor Tree"
The engine recursively splits the number using the smallest prime factor at each level.
Explore the Tree
View the SVG tree diagram with color-coded prime leaves, the prime factorization in exponential form, and the division chain.
Worked Examples
Four numbers broken down via factor trees.
1Factor Tree of 72+−
2Factor Tree of 120+−
3Factor Tree of 180+−
4Factor Tree of 84+−
Factor Tree Tips & Rules
Guidelines for building and reading factor trees correctly.
| Rule | Explanation | Example |
|---|---|---|
| Always split composites | Every non-prime node must branch into two factors | 12 → 2 × 6 |
| Circle prime leaves | Mark the endpoints that cannot be split further | ⊙2, ⊙3, ⊙5 |
| Uniqueness of primes | All valid trees for n produce identical prime sets | FTA guarantees this |
| Use small primes first | Starting with 2, 3, 5… makes trees systematic | Easier to follow |
Frequently Asked Questions
Common questions about factor trees.
What is a factor tree?+−
A factor tree is a diagram that breaks a number down into factors repeatedly until every branch ends in a prime number. The prime leaves of the tree give the complete prime factorization.
Can a number have more than one factor tree?+−
Yes — you can start splitting with different factor pairs (e.g., 24 = 4×6 or 24 = 3×8), but every valid tree produces the same set of prime leaves at the bottom.
How do I read the prime factorization from a factor tree?+−
Collect all the circled numbers (prime leaves) at the ends of every branch. Multiply them together and verify the product equals the original number.
Why do we stop at prime numbers?+−
Prime numbers cannot be split further into smaller factors (other than 1 and themselves), so they form the natural 'end points' of the tree.
What is the best first split for a factor tree?+−
Any valid pair works, but starting with the smallest prime factor (usually 2 or 3) keeps the tree systematic and easy to follow.
Can factor trees be used for very large numbers?+−
In theory yes, but very large numbers may take many levels. This calculator efficiently handles numbers up to millions and renders the tree compactly.
Related Tools Showcase
Explore 4 complementary calculators tailored to expand your mathematical analysis.