Skip to main content

Factor tree & trial division steps

Prime Factorization Calculator

Break a whole number into prime factors with trial division: exponential form (e.g. 100 = 2Β² Γ— 5Β²), factor tree, Logic Trace, and copy. Up to 12 digits. Runs locally.

By Jeff Beem

Updated

Enter a number

Enter a positive integer. Trial division identifies all prime factors and builds an exponential factorization (e.g., 2Β³ Γ— 3Β²). The factor tree shows how n breaks down; terminal nodes are primes.

Positive integer, up to 12 digits.

Factorization

Prime factorization

100 = 2^2 Γ— 5^2

Factors: 2, 2, 5, 5

CompositeEvenPerfect square

Logic trace

  • Step 1100 is even, divide by 2 β†’ 50
  • Step 250 is even, divide by 2 β†’ 25
  • Step 325 is divisible by 5, divide by 5 β†’ 5
  • Step 45 is divisible by 5, divide by 5 β†’ 1
  • Step 5: Collect all terminal prime factors2 Γ— 2 Γ— 5 Γ— 5 β†’ 2^2 Γ— 5^2

Reading the factor tree and results

Enter one positive integer on the left. The Factorization panel on the right shows power notation and the Factor List; below that come the factor tree and Logic Trace when n β‰₯ 2.

Worked example at the default (100)

Exponential form β†’ 2Β² Γ— 5Β²

Default input 100 β†’ 100 = 2^2 Γ— 5^2 on the result card. Factor List: 2, 2, 5, 5. Status tags include Composite, Even, and Perfect square.

Logic Trace steps

Trial division lines such as β€œ100 is even, divide by 2 β†’ 50”, then further splits until 5 β†’ 1. Final step: β€œCollect all terminal prime factors” β†’ 2 Γ— 2 Γ— 5 Γ— 5 β†’ 2^2 Γ— 5^2.

Factor tree layout

Root 100 splits to 2 (left, prime) and 50 (right). Primes use the stone Primes swatch; composites are white. Legend: left branch = smallest prime, right = remaining composite.

Copy results

Click Copy results on the result card to copy one line: 100 = 2^2 * 5^2 (2, 2, 5, 5) (asterisks in the clipboard string).

Prime Factorization Calculator: Factor Tree, Steps & Exponential Form

Trial division with factor tree, Logic Trace, exponential form, and Factor List. Integers up to 12 digits. Runs locally in your browser.

What This Calculator Does

This prime factorization calculator factors any allowed positive integer with trial division. Enter n and get: exponential form (e.g. 100 = 2^2 Γ— 5^2 on screen), expanded Factor List (2, 2, 5, 5), status tags (Prime, Composite, Even/Odd, Perfect square/cube when applicable), an SVG factor tree (smallest prime left, quotient right; prime leaves use the stone Primes styling), and a scrollable Logic Trace ending with β€œCollect all terminal prime factors.” Copy results copies n = p^a * q^b (list). Input: 2–999,999,999,999; 1 is explained, not factored. All math runs in the browser.

How the Math Works

Trial division starts at 2, divides while possible, then tests odd primes up to √remainder. Example 360: 2Β³ Γ— 3Β² Γ— 5 from 360 β†’ 180 β†’ 90 β†’ 45, then 3Β², then 5. The fundamental theorem of arithmetic guarantees this breakdown is unique (up to order). Default 100: 2Β² Γ— 5Β² after two divisions by 2 and two by 5.

How to Use This Calculator

Control reference:
  • Enter an integer (n):
    Single field; digits only, max 12. Default 100.
  • Factorization panel:
    Power notation, Factor List, tags, Copy results.
  • Factor tree:
    Scrollable SVG; Primes legend shows prime node styling.
  • Logic trace:
    Division steps plus final collect β†’ power notation step.

Factor tree vs Logic Trace

Both follow the same trial-division splits. The tree is visual (branches and labeled nodes); the Logic Trace is text (β€œbefore is reason, divide by divisor β†’ after”). The last trace step lists every prime leaf multiplied out, then rewritten with exponents β€” matching the result card.

FAQ

What is prime factorization?

Prime factorization writes a whole number greater than 1 as a product of prime numbers, often with powers (e.g. 100 = 2Β² Γ— 5Β²). Each integer > 1 has only one such breakdown (order aside). This calculator shows exponential form, an expanded Factor List, a factor tree, and a Logic Trace.

How do you find the prime factorization of a number?

Use trial division: divide by 2 while the number is even, then test 3, 5, 7, … while the divisor squared is not greater than what is left. Each successful division is a prime factor. The Logic Trace lists every step (e.g. β€œ100 is even, divide by 2 β†’ 50”). The factor tree shows the same splits: smallest prime on the left, quotient on the right.

How do I read the factor tree?

The root is your number. Each split puts the smallest prime factor on the left and the remaining composite on the right until every branch ends at a prime. Prime nodes use the stone fill from the Primes legend; composites use a white fill. Scroll horizontally or vertically when the tree is large.

What is the difference between Factor List and exponential form?

The Factor List lists every prime with repeats (100 β†’ 2, 2, 5, 5). The exponential form groups them (100 β†’ 2Β² Γ— 5Β²). On screen, powers use a caret (2^2). Copy results exports both: e.g. 100 = 2^2 * 5^2 (2, 2, 5, 5).

What is the maximum number I can factor?

Positive integers from 2 through 12 digits (999,999,999,999). Entering 1 shows a special-case message (1 is neither prime nor composite). Non-digit characters are stripped from the input.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

Β© 2026 CalcRegistry Reference Last System Check: July 2026Free Online Utility Tools