Integer Factor Tree and Prime Factorization Calculator

Prime factorization · printable practice

Integer Factor Tree Worksheet Calculator

Turn a positive integer into a branch-by-branch factor tree, collect every prime leaf, rebuild the original number, and create a clean worksheet record. Choose the first branch yourself or let the calculator find one.

Choose the seed number

Classroom note: In practice mode, the on-screen prime ledger remains available for checking. Printing hides this input panel and keeps the finished tree sheet.

Name: ____________________   Date: __________

Factor tree for 360

Prime factorization2³ × 3² × 5
360=6×60
6=2×3
60=6×10
6=2×3
10=2×5
Prime leaves2, 3, 2, 3, 2, 5
Distinct primes2, 3, 5
Positive divisor count24
Sum of positive divisors1,170
All positive divisors

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

Reconstruction check

2³ × 3² × 5 = 8 × 9 × 5 = 360. The prime leaves multiply back to the seed integer.

What a factor tree shows

A factor tree repeatedly writes a composite whole number as a product of two smaller whole numbers. Each composite child branches again until every endpoint is prime. Those prime endpoints are the leaves of the tree. Multiplying the leaves recreates the original integer, and grouping repeated primes produces exponential notation.

For 360, the chosen opening branch is 6 × 60. One 6 becomes 2 × 3. The 60 is split into 6 × 10; that second 6 becomes 2 × 3, and 10 becomes 2 × 5. The leaves are therefore 2, 3, 2, 3, 2, and 5. Sorted and grouped, they give 2³ × 3² × 5. The reconstruction 8 × 9 × 5 = 360 verifies that no factor was lost.

A different valid first branch produces a different-looking tree but the same prime factorization. Starting with 36 × 10, 4 × 90, or 2 × 180 eventually reaches the same multiset of prime leaves. This is an illustration of the fundamental theorem of arithmetic: every integer greater than one has a prime factorization unique apart from the order of the primes.

How to use the worksheet controls

  1. Enter an integer from 2 through 1,000,000,000. Zero, one, negative values, and decimals do not have the positive prime-factor tree requested by this worksheet.
  2. Choose the first branch. Manual mode honors a factor that divides the seed exactly. Smallest-factor mode begins with the smallest prime divisor. Balanced mode searches down from the square root for a close factor pair.
  3. Select answer or practice display. Answer mode shows both children in every branch. Practice mode replaces child values with blanks while leaving the prime ledger available as an answer key.
  4. Build and inspect. Circle or identify prime leaves, group equal primes, and use the reconstruction statement to check the multiplication.
  5. Print if useful. The print layout removes the input controls and explanatory article, leaving the worksheet result.

Manual mode requires the proposed first factor to be at least 2, smaller than the seed, and an exact divisor. If it fails, choose another divisor or use an automatic method. After the first branch, the calculator uses deterministic small-factor splits so the steps remain easy to audit.

Three valid paths for the same number

Start small

360 = 2 × 180. Continue peeling off 2, then 2, then 2 before reaching 45 = 3 × 15 = 3 × 3 × 5.

Start balanced

360 = 18 × 20. Then 18 = 2 × 9 and 20 = 4 × 5. Factor 9 and 4 to reach the same leaves.

Start familiar

360 = 6 × 60. Breaking both 6s and then 10 produces the compact worksheet shown in the default result.

No one tree shape is the official answer. What matters is that each parent equals the product of its children and that every final leaf is prime. If a student stops at 6, 9, 10, or 15, the tree is incomplete because those numbers still have nontrivial factor pairs.

From prime exponents to divisors

Prime factorization does more than finish a classroom tree. It counts all positive divisors. If n = pᵃqᵇrᶜ, a divisor may use p from exponent 0 through a, q from 0 through b, and r from 0 through c. The number of choices is therefore (a + 1)(b + 1)(c + 1). For 360 = 2³ × 3² × 5¹, the divisor count is 4 × 3 × 2 = 24.

The sum of positive divisors uses geometric sums: (1 + p + … + pᵃ) for each distinct prime, multiplied together. For 360, (1 + 2 + 4 + 8)(1 + 3 + 9)(1 + 5) = 15 × 13 × 6 = 1,170. The calculator lists the divisors as a second audit. Each listed number must divide 360 with remainder zero, and divisors pair around the square root: 1 with 360, 2 with 180, 3 with 120, and so on.

Prime exponents also support greatest common divisor and least common multiple work. The GCD takes the smaller exponent shared by each input; the LCM takes the larger exponent appearing in either input.

Primality, factor pairs, and common mistakes

A prime number has exactly two positive divisors: 1 and itself. A composite number has at least one factor pair other than 1 and itself. One is neither prime nor composite, which is why the worksheet begins at 2. The calculator tests possible divisors only through the square root; if no divisor is found by then, a matching larger factor cannot exist.

Students often write an addition instead of multiplication, declare every odd number prime, or forget that 2 is prime. Another frequent error is using 1 as a branch, such as 360 = 1 × 360. Although the equality is true, it makes no progress and can repeat forever. Productive branches use two factors greater than one and smaller than the composite parent.

Exponents count repeated factors; they are not multipliers. The notation 2³ means 2 × 2 × 2, not 2 × 3. Likewise, 2³ × 3² × 5 should be evaluated as 8 × 9 × 5. Maintaining a sorted leaf list makes repetitions easier to count and reduces transcription mistakes.

Teacher and learner workflow

For guided practice, a teacher can specify a required opening pair and ask students to complete the branches by hand. The answer display then supplies a quick comparison, although an alternative tree may still be correct. For independent practice, switch to balanced or smallest-factor mode, hide child answers, print the sheet, and have the learner mark every prime leaf before writing exponential form.

A strong explanation includes more than the final factorization. Ask the learner to justify why each endpoint is prime, multiply the leaves, and use the exponents to predict the divisor count. Advanced extensions include finding the square-free part, deciding whether the seed is a perfect square, and comparing two seeds to derive a GCD or LCM.

Answer-key rule: The prime factorization is unique, but branch order is not. Grade the equality of each split, completion to prime leaves, exponent counts, and reconstruction—not visual resemblance to one sample tree.

Perfect squares, square-free parts, and grouping

Prime exponents make square structure visible. A positive integer is a perfect square exactly when every exponent in its prime factorization is even. The number 360 has exponents 3, 2, and 1, so it is not a square. Pairing equal primes removes 2² and 3² as a square factor, leaving one 2 and one 5. Thus 360 = 36 × 10, and √360 can be simplified to 6√10.

The square-free part is the product of primes with odd exponents. For 360 it is 2 × 5 = 10. A similar rule identifies perfect cubes: every exponent must be divisible by three. These observations connect a basic factor tree to radical simplification, polynomial factoring, and number classification without changing the underlying leaf-count method.

Factorization also supports equal grouping. If 360 items must be arranged into identical groups with no remainder, every possible group count is a divisor in the displayed list. Choosing 24 groups gives 15 items per group; choosing 15 groups gives 24 per group. Practical constraints determine which mathematical factor pair is useful. The divisor list supplies possibilities, not a recommendation.

Using the result to simplify fractions

To reduce a fraction, factor both numerator and denominator and cancel only shared prime factors. Suppose the fraction is 360/504. The numerator is 2³ × 3² × 5, while 504 is 2³ × 3² × 7. The shared product is 2³ × 3² = 72, leaving 5/7. This is the prime-factor version of dividing by the greatest common divisor.

Cancellation applies to factors of a product, not terms joined by addition. From (360 + 5)/504, one may not cancel the factor 5 or the factors of 360 across the sum. Parentheses and operation order matter. Writing the prime ledger next to each whole product can prevent a visual shortcut from turning into an invalid algebra step.

Scale and browser limits

This classroom tool is intentionally capped at one billion. Trial division is transparent and dependable in that range for ordinary worksheet use, but it is not a cryptographic factorization engine. Very large semiprimes can require specialized algorithms and substantial computing resources. The cap also keeps the divisor list and tree readable.

The displayed branch area contains twelve rows. Numbers within the accepted range can sometimes require more splits than will fit visually, especially powers with many repeated small factors. The prime ledger and reconstruction remain the authoritative result; if the tree is truncated, the calculator states that additional branches were omitted. For a handout, choose seeds whose tree fits the intended grade level and page space.

Frequently asked questions

Can two correct factor trees look different?

Yes. Different factor pairs create different branches, but complete trees for the same positive integer end with the same primes and exponents.

Why is 1 not shown as a prime leaf?

One has only one positive divisor and is neither prime nor composite. Including it would make a nonterminating branch possible.

What if my first factor does not divide evenly?

Manual mode reports an error. Enter an exact divisor or select smallest-factor or balanced mode.

Does the calculator include negative factors?

No. This worksheet focuses on positive prime factorization. A negative integer could be written as −1 times the factorization of its absolute value in a broader algebra context.

How is divisor count found?

Add one to every prime exponent and multiply those values. Each choice represents an allowed exponent in a positive divisor.

Can I print a blank tree?

Choose practice display before printing. Child entries become blank lines while the worksheet structure remains.

References

OpenStax Prealgebra 2e — prime factorization and LCM

Wolfram MathWorld — fundamental theorem of arithmetic

National Council of Teachers of Mathematics — classroom resources

Scroll to Top