Skip to main content
Z

Prime Factorization Visualizer — Factor Tree

Animated prime factorization as a factor tree — splits a number into prime factors step by step. Runs in your browser.

Free No signup Client-side Privacy friendly Updated

/

Pseudocode

Run an operation to see its steps.

How to use

  1. 1 Type a number and press Factorize to build its factor tree.
  2. 2 Each step splits n into its smallest prime factor and the quotient.
  3. 3 The green leaves of the tree are the prime factors.
  4. 4 Use Random for a new number, or step through the splits.

Why use this tool

  • See prime factorization as a tree: every composite splits into a prime and a quotient.
  • Read the prime factorization straight off the green leaves.
  • Understand the fundamental theorem of arithmetic — every integer > 1 has a unique prime factorization.
  • Runs entirely in your browser. No signup, no uploads.

Frequently asked questions

What is prime factorization?

Writing a number as a product of prime numbers — for example, 60 = 2² × 3 × 5. By the fundamental theorem of arithmetic this factorization is unique.

How does the factor tree work?

Repeatedly divide the number by its smallest prime factor: that prime becomes a leaf and the quotient is factored again, until only primes remain.

How hard is factoring large numbers?

Trial division is fine for small numbers but becomes very slow for large ones. The presumed difficulty of factoring huge semiprimes is what makes RSA encryption secure.

What is a prime number?

An integer greater than 1 whose only positive divisors are 1 and itself, such as 2, 3, 5, 7, 11 — the building blocks of every other integer.

What is Prime Factorization Visualizer?

A Prime Factorization Visualizer animates a factor tree: it repeatedly splits a number into its smallest prime factor and the remaining quotient until only primes remain at the leaves, giving the unique prime factorization.

Features

Step-by-step animation

Watch each prime divide out until only 1 remains.

Complexity

Trial division: O(√n) time. Space: O(log n) for the factor list.

100% private

Runs entirely in your browser — nothing is uploaded.

Example

Input

60

Output

2 × 2 × 3 × 5  =  2² × 3 × 5

Common use cases

  1. 1

    Factor an integer

    Break a number into its prime building blocks.

  2. 2

    GCD / LCM by factors

    Use prime factorizations to compute GCD and LCM.

  3. 3

    Understand primality

    See why √n trial division suffices to factor or prove primality.

Summary

Zerethon's prime factorization visualizer animates breaking an integer into its prime factors in your browser by trial division, dividing out each prime in turn. Trial division runs in O(√n) time for a number n. Every integer greater than 1 has a unique prime factorization (the fundamental theorem of arithmetic).

Category
Algorithm
Pricing
Free
Privacy
Browser-based
Signup
Not required

References

Privacy

Your data never leaves your browser unless explicitly stated. Prime Factorization Visualizer runs entirely client-side — no server upload, no logging, no tracking of your input.

New to this? Read the step-by-step explanation with Big-O analysis: Learn Number Theory →

Compare

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free