Prime Factorization Calculator
Enter any whole number from 2 upward to see its unique prime factorization written in clean exponent form.
Factorization: 360 = 2^3 x 3^2 x 5
How does this calculator work?
Prime factorization rewrites an integer as a product of primes raised to exponents, like 360 = 2^3 x 3^2 x 5. This tool uses trial division up to the square root, dividing out 2 then odd numbers, and groups repeated primes into exponent form. The result is unique for every integer of 2 or more.
Formula
How this is calculated
The only input is an integer n that must be 2 or larger; decimals and values below 2 are rejected because prime factorization is defined only for integers greater than 1. The calculator floors the entered value and checks that it equals the original input.
Factoring uses trial division. It first divides out every factor of 2, then tests successive odd divisors d = 3, 5, 7, ... while d squared is less than or equal to the running quotient. Each time d divides evenly, it is recorded and the quotient is reduced. Once no divisor up to the square root remains, any quotient still greater than 1 must itself be prime and is added as the final factor. This is efficient because a composite number always has a prime factor no larger than its square root.
Identical primes are grouped into base^exponent pairs to produce the factorization string (for example 360 = 2^3 x 3^2 x 5). By the Fundamental Theorem of Arithmetic this decomposition is unique up to order. The bar chart shows each distinct prime with a bar sized by its exponent (multiplicity). Very large inputs above 10^15 are not factored to keep results fast and accurate within floating-point limits.
Frequently asked questions
It is expressing a whole number as a product of prime numbers, such as 360 = 2^3 x 3^2 x 5. Every integer greater than 1 has exactly one such factorization apart from the ordering of factors.
The numbers 0 and 1 have no prime factorization: 1 is a unit (not prime) and 0 is divisible by every prime. Factorization is defined only for integers greater than 1.
If n itself is prime, trial division finds no divisor up to its square root, so the leftover quotient equals n and the result is simply that single prime with exponent 1.
Also known as
TG we-Calculate Editorial Team. (2026). Prime Factorization Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/prime-factorization-calculator
TG we-Calculate Editorial Team. "Prime Factorization Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/prime-factorization-calculator.
TG we-Calculate Editorial Team, "Prime Factorization Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/prime-factorization-calculator
@misc{wecalculate_prime_factorization_calculator, title = {Prime Factorization Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/prime-factorization-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
