Skip to main content

Factorization Visualizer Calculator

Calculate factorization visualizer instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods.

Skip to calculator
Mathematics

Factorization Visualizer

Visualize prime factorizations with factor trees, divisor lists, and number theory properties. Compare two numbers to find GCD, LCM, and shared prime factors.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
360
840
Prime Factorization
360 = 2^3 * 3^2 * 5
Divisors
24
(3+1) * (2+1) * (1+1)
Divisor Sum
1170
Euler Totient
96
Radical
30
Classification
Abundant
Square-Free?
No
Prime Power?
No

Factor Tree

360=2x180
180=2x90
90=2x45
45=3x15
15=3x5
5=5x1

Divisor Pairs

1x360
2x180
3x120
4x90
5x72
6x60
8x45
9x40
10x36
12x30
15x24
18x20

All 24 Divisors

1234568910121518202430364045607290120180360
Green = prime factor | Blue = composite divisor | Highlighted = the number itself

Comparison: 360 vs 840

360
2^3 * 3^2 * 5
24 divisors
840
2^3 * 3 * 5 * 7
32 divisors
GCD
120
LCM
2,520
Coprime?
No
Shared prime factors: 2, 3, 5
Your Result
360 = 2^3 * 3^2 * 5 | 24 divisors | phi(360) = 96
Share Your Result
Understand the Math

Formula

n = p1^a1 * p2^a2 * ... * pk^ak (Fundamental Theorem of Arithmetic)

Every integer greater than 1 has a unique prime factorization. The number of divisors equals the product of (ai + 1) for each prime power. Euler totient phi(n) = n * product of (1 - 1/pi) for each distinct prime factor pi.

Last reviewed: December 2025

Worked Examples

Example 1: Factorization of 360

Find the complete prime factorization of 360 and determine its total number of divisors.
Solution:
Factor tree: 360 = 2 * 180 = 2 * 2 * 90 = 2 * 2 * 2 * 45 = 2 * 2 * 2 * 3 * 15 = 2 * 2 * 2 * 3 * 3 * 5 Prime factorization: 360 = 2^3 * 3^2 * 5^1 Number of divisors = (3+1)(2+1)(1+1) = 4 * 3 * 2 = 24 Sum of divisors = 1170 Euler totient = 360 * (1-1/2)(1-1/3)(1-1/5) = 96
Result: 360 = 2^3 * 3^2 * 5 | 24 divisors | phi(360) = 96

Example 2: Comparing 360 and 840

Compare the factorizations of 360 and 840. Find their GCD and LCM.
Solution:
360 = 2^3 * 3^2 * 5 840 = 2^3 * 3 * 5 * 7 Shared primes: 2, 3, 5 GCD = 2^3 * 3^1 * 5^1 = 120 (minimum exponents) LCM = 2^3 * 3^2 * 5 * 7 = 2520 (maximum exponents) Verification: 360 * 840 = 302,400 = 120 * 2520
Result: GCD(360, 840) = 120 | LCM(360, 840) = 2520
Expert Insights

Background & Theory

The Factorization Visualizer applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Factorization Visualizer traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

Prime factorization is the process of expressing a positive integer as a product of prime numbers. The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has a unique prime factorization (up to the order of factors). For example, 360 equals 2 cubed times 3 squared times 5, meaning 2 times 2 times 2 times 3 times 3 times 5. This representation is unique for every number, making it a fundamental fingerprint of each integer. Prime factorization is the basis for many number theory results and has practical applications in cryptography (RSA encryption relies on the difficulty of factoring large numbers), computer science, and solving problems involving divisibility, GCD, and LCM.
The total number of divisors can be calculated directly from the prime factorization without listing all divisors individually. If n equals p1 to the a1 times p2 to the a2 times pk to the ak, then the number of divisors tau(n) equals (a1 plus 1) times (a2 plus 1) times (ak plus 1). Each factor (ai plus 1) represents the choices for how many times prime pi appears in a divisor: 0, 1, 2, up to ai times. For example, 360 equals 2 cubed times 3 squared times 5, so the number of divisors is (3 plus 1)(2 plus 1)(1 plus 1) equals 4 times 3 times 2 equals 24. This formula is incredibly efficient compared to testing every potential divisor and is one of the most useful results in elementary number theory.
Euler totient function phi(n) counts the number of integers from 1 to n that are coprime to n (share no common factors with n other than 1). It is computed directly from the prime factorization: phi(n) equals n times the product of (1 minus 1/p) for each distinct prime factor p of n. For example, phi(360) equals 360 times (1 minus 1/2) times (1 minus 1/3) times (1 minus 1/5) equals 360 times 1/2 times 2/3 times 4/5 equals 96. The totient function is central to RSA cryptography, where it determines the modular multiplicative inverse used for decryption. It also appears in Euler theorem, which states that a raised to phi(n) is congruent to 1 modulo n when a and n are coprime.
The greatest common divisor (GCD) and least common multiple (LCM) of two numbers can be computed directly from their prime factorizations. For each prime that appears in either factorization, the GCD uses the minimum exponent and the LCM uses the maximum exponent. For example, if 360 equals 2 cubed times 3 squared times 5 and 840 equals 2 cubed times 3 times 5 times 7, then GCD equals 2 cubed times 3 times 5 equals 120 and LCM equals 2 cubed times 3 squared times 5 times 7 equals 2520. A beautiful relationship connects them: GCD(a,b) times LCM(a,b) equals a times b. This factorization-based method is more intuitive than the Euclidean algorithm and clearly shows the shared structure of two numbers.
The RSA cryptosystem, one of the most widely used encryption methods, is built on the assumption that factoring large numbers is computationally difficult. RSA works by multiplying two large prime numbers p and q to get n equals p times q. The public key uses n, while the private key requires knowledge of p and q individually. Encryption and decryption are performed using modular exponentiation with exponents related through Euler totient function phi(n) equals (p minus 1)(q minus 1). Without knowing the factors p and q, an attacker cannot compute phi(n) and therefore cannot determine the private key. Current RSA keys use 2048-bit numbers (about 617 digits), which would take classical computers billions of years to factor. Quantum computers running Shor algorithm could theoretically factor these numbers efficiently, motivating post-quantum cryptography research.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

n = p1^a1 * p2^a2 * ... * pk^ak (Fundamental Theorem of Arithmetic)

Every integer greater than 1 has a unique prime factorization. The number of divisors equals the product of (ai + 1) for each prime power. Euler totient phi(n) = n * product of (1 - 1/pi) for each distinct prime factor pi.

Worked Examples

Example 1: Factorization of 360

Problem: Find the complete prime factorization of 360 and determine its total number of divisors.

Solution: Factor tree: 360 = 2 * 180 = 2 * 2 * 90 = 2 * 2 * 2 * 45 = 2 * 2 * 2 * 3 * 15 = 2 * 2 * 2 * 3 * 3 * 5\nPrime factorization: 360 = 2^3 * 3^2 * 5^1\nNumber of divisors = (3+1)(2+1)(1+1) = 4 * 3 * 2 = 24\nSum of divisors = 1170\nEuler totient = 360 * (1-1/2)(1-1/3)(1-1/5) = 96

Result: 360 = 2^3 * 3^2 * 5 | 24 divisors | phi(360) = 96

Example 2: Comparing 360 and 840

Problem: Compare the factorizations of 360 and 840. Find their GCD and LCM.

Solution: 360 = 2^3 * 3^2 * 5\n840 = 2^3 * 3 * 5 * 7\nShared primes: 2, 3, 5\nGCD = 2^3 * 3^1 * 5^1 = 120 (minimum exponents)\nLCM = 2^3 * 3^2 * 5 * 7 = 2520 (maximum exponents)\nVerification: 360 * 840 = 302,400 = 120 * 2520

Result: GCD(360, 840) = 120 | LCM(360, 840) = 2520

Frequently Asked Questions

What is prime factorization?

Prime factorization is the process of expressing a positive integer as a product of prime numbers. The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has a unique prime factorization (up to the order of factors). For example, 360 equals 2 cubed times 3 squared times 5, meaning 2 times 2 times 2 times 3 times 3 times 5. This representation is unique for every number, making it a fundamental fingerprint of each integer. Prime factorization is the basis for many number theory results and has practical applications in cryptography (RSA encryption relies on the difficulty of factoring large numbers), computer science, and solving problems involving divisibility, GCD, and LCM.

How do you find the total number of divisors from the prime factorization?

The total number of divisors can be calculated directly from the prime factorization without listing all divisors individually. If n equals p1 to the a1 times p2 to the a2 times pk to the ak, then the number of divisors tau(n) equals (a1 plus 1) times (a2 plus 1) times (ak plus 1). Each factor (ai plus 1) represents the choices for how many times prime pi appears in a divisor: 0, 1, 2, up to ai times. For example, 360 equals 2 cubed times 3 squared times 5, so the number of divisors is (3 plus 1)(2 plus 1)(1 plus 1) equals 4 times 3 times 2 equals 24. This formula is incredibly efficient compared to testing every potential divisor and is one of the most useful results in elementary number theory.

What is Euler totient function and how does it relate to factorization?

Euler totient function phi(n) counts the number of integers from 1 to n that are coprime to n (share no common factors with n other than 1). It is computed directly from the prime factorization: phi(n) equals n times the product of (1 minus 1/p) for each distinct prime factor p of n. For example, phi(360) equals 360 times (1 minus 1/2) times (1 minus 1/3) times (1 minus 1/5) equals 360 times 1/2 times 2/3 times 4/5 equals 96. The totient function is central to RSA cryptography, where it determines the modular multiplicative inverse used for decryption. It also appears in Euler theorem, which states that a raised to phi(n) is congruent to 1 modulo n when a and n are coprime.

What is the relationship between GCD, LCM, and prime factorization?

The greatest common divisor (GCD) and least common multiple (LCM) of two numbers can be computed directly from their prime factorizations. For each prime that appears in either factorization, the GCD uses the minimum exponent and the LCM uses the maximum exponent. For example, if 360 equals 2 cubed times 3 squared times 5 and 840 equals 2 cubed times 3 times 5 times 7, then GCD equals 2 cubed times 3 times 5 equals 120 and LCM equals 2 cubed times 3 squared times 5 times 7 equals 2520. A beautiful relationship connects them: GCD(a,b) times LCM(a,b) equals a times b. This factorization-based method is more intuitive than the Euclidean algorithm and clearly shows the shared structure of two numbers.

How does factorization relate to cryptography?

The RSA cryptosystem, one of the most widely used encryption methods, is built on the assumption that factoring large numbers is computationally difficult. RSA works by multiplying two large prime numbers p and q to get n equals p times q. The public key uses n, while the private key requires knowledge of p and q individually. Encryption and decryption are performed using modular exponentiation with exponents related through Euler totient function phi(n) equals (p minus 1)(q minus 1). Without knowing the factors p and q, an attacker cannot compute phi(n) and therefore cannot determine the private key. Current RSA keys use 2048-bit numbers (about 617 digits), which would take classical computers billions of years to factor. Quantum computers running Shor algorithm could theoretically factor these numbers efficiently, motivating post-quantum cryptography research.

How do I interpret the result?

Results are displayed with a label and unit to help you understand the output. Many calculators include a short explanation or classification below the result (for example, a BMI category or risk level). Refer to the worked examples section on this page for real-world context.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy