Prime factorization calculator

Break down any integer into a product of its prime factors, with their exponents. A handy tool for mathematics, simplifying fractions or calculating GCD/LCM by hand — computed entirely in your browser.

Example:

How it works

The fundamental theorem of arithmetic guarantees that every integer greater than 1 can be written uniquely as a product of prime numbers. This tool successively tests 2, 3, 5, 7... as potential divisors, dividing the number as many times as possible by each divisor found before moving on to the next one, until only a final prime factor (or 1) remains.

What is prime factorization used for?

It's used in particular to simplify a fraction (by identifying the common factors between numerator and denominator), to calculate the GCD and LCM of two numbers, to determine whether a number is a perfect square (all exponents even), or in cryptography, where the difficulty of factoring very large numbers underlies certain algorithms such as RSA.

Why is the limit set at 100 trillion?

The trial division method used here tests divisors up to the square root of the remaining number. Beyond this limit, the number of trials required would become too large for instant computation in the browser, especially if the number is itself prime or has only large factors.

The calculation is purely mathematical and local: no number entered is transmitted outside of your browser.