
Prime Number Checker
Use this free prime number checker to test if any integer up to 1,000,000,000 is a prime number or composite, with square-root trial division and factors.
Open toolEnter any whole number from 2 to 1,000,000,000 into this prime factorization calculator to decompose it into its ascending product of repeated prime factors (2 × 2 × 2 × 3 × 3 × 5). All factorizations run directly in your browser using trial division with one-click copy and .txt export.
Enter the inputs, then select Calculate result.
Result will appear here
By the Fundamental Theorem of Arithmetic, every composite integer greater than 1 has a unique prime factorization up to the order of the factors. You can also test whether an integer is prime first in our Prime Number Checker.
Trial Division Loop: extract p = 2 while x % 2 === 0; then test odd divisors p = 3, 5, 7, ... while p * p <= x; finally append x if x > 1.
Because the maximum input is 1,000,000,000, the loop tests at most odd divisors up to floor(sqrt(10^9)) = 31,622 (15,811 iterations worst-case) and formats the prime factor array with a.join(' × ').
Compare 10 benchmark integers from 12 to 1,000,000,000 alongside their expanded prime factor product, prime-power notation, distinct primes, and total divisor count d(n) = Π(e_i + 1).
| Integer (n) | Expanded Prime Factors (×) | Prime Power Notation | Distinct Primes | Total Divisors d(n) = Π(e_i + 1) | Mathematical Classification |
|---|---|---|---|---|---|
| 12 | 2 × 2 × 3 | 2^2 × 3^1 | 2, 3 | (2+1)(1+1) = 6 | Smallest abundant number |
| 60 | 2 × 2 × 3 × 5 | 2^2 × 3^1 × 5^1 | 2, 3, 5 | 3 × 2 × 2 = 12 | Highly composite (sexagesimal base) |
| 97 | 97 | 97^1 | 97 | 1 + 1 = 2 | Largest two-digit prime number |
| 144 | 2 × 2 × 2 × 2 × 3 × 3 | 2^4 × 3^2 | 2, 3 | (4+1)(2+1) = 15 | Perfect square (12^2, odd divisor count) |
| 360 | 2 × 2 × 2 × 3 × 3 × 5 | 2^3 × 3^2 × 5^1 | 2, 3, 5 | 4 × 3 × 2 = 24 | Highly composite (preloaded sample) |
| 1,024 | 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 | 2^10 | 2 | 10 + 1 = 11 | Pure power of two (1 KiB) |
| 2,310 | 2 × 3 × 5 × 7 × 11 | 2^1 × 3^1 × 5^1 × 7^1 × 11^1 | 2, 3, 5, 7, 11 | 2^5 = 32 | 5th primorial (p_5#, square-free) |
| 5,040 | 2 × 2 × 2 × 2 × 3 × 3 × 5 × 7 | 2^4 × 3^2 × 5^1 × 7^1 | 2, 3, 5, 7 | 5 × 3 × 2 × 2 = 60 | Factorial 7! (superior highly composite) |
| 999,999,937 | 999999937 | 999999937^1 | 999999937 | 1 + 1 = 2 | Largest prime under 1,000,000,000 |
| 1,000,000,000 | 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 5 × 5 × 5 × 5 × 5 × 5 × 5 × 5 × 5 | 2^9 × 5^9 | 2, 5 | (9+1)(9+1) = 100 | Maximum supported input (10^9) |
Decompose any positive integer from 2 to 1,000,000,000 in three steps.
Type or paste a whole number between 2 and 1000000000 into the Integer to factor field (360 is preloaded as the default example).
Select Calculate result to divide out 2 and odd primes in ascending order and build the complete multiplication chain ( × ).
Read the factor string in Your result, or use Copy and Download (result.txt) to save long factorizations like 1,000,000,000.
See how repeated prime factors convert into exponential form, greatest common factors, least common multiples, and exact square roots.
Entering 360 divides by 2 three times (360 -> 180 -> 90 -> 45), by 3 twice (45 -> 15 -> 5), and stops at prime 5, returning 2 × 2 × 2 × 3 × 3 × 5. Grouping identical primes gives 2^3 × 3^2 × 5^1, which you can evaluate back to 360 in our Exponent Calculator.

Decomposing 360 gives 2^3 × 3^2 × 5^1, while 756 factors into 2^2 × 3^3 × 7^1. Picking the smallest shared prime exponents yields GCF(360, 756) = 2^2 × 3^2 = 36, whereas picking the largest prime exponents yields LCM(360, 756) = 2^3 × 3^3 × 5 × 7 = 7,560. Verify both with the GCF Calculator, LCM Calculator, or Fraction Simplifier.

For the perfect square 1,764, the tool returns 2 × 2 × 3 × 3 × 7 × 7 (2^2 × 3^2 × 7^2). Because every exponent is even, halving each exponent gives the exact square root 2^1 × 3^1 × 7^1 = 42 (check with the Nth Root Calculator). Adding 1 to each exponent and multiplying gives (2+1)(2+1)(2+1) = 27 positive divisors.

When the tool finishes factoring your input, it formats the ascending prime product according to three output patterns:
For composite numbers (such as 360 -> 2 × 2 × 2 × 3 × 3 × 5), every factor in the chain is prime, and multiplying all listed numbers together reconstructs your exact starting integer. To write exponential notation (p_1^e_1 × p_2^e_2 ...), count how many times each distinct prime repeats in the string.
For prime numbers (such as 97 -> 97 or 999999937 -> 999999937), the output contains a single integer identical to your input because it has no proper divisors between 2 and floor(sqrt(x)). Whenever a formatted factor chain reaches 40 characters or longer (such as 1,000,000,000, which expands to 18 factors and 65 characters), #result-main displays 'Result ready' and #result-extra holds the complete factor chain with Copy and Download (result.txt) buttons.

Keep these validation boundaries in mind before clicking Calculate result:
First, enter a whole number of at least 2 (x >= 2) and at most 1,000,000,000 (10^9). Why aren't 0 and 1 allowed? Zero has infinitely many divisors (0 = 0 × p), and 1 is a multiplicative unit rather than a prime. Capping x at 10^9 limits the trial division loop to at most 15,811 iterations (floor(sqrt(10^9)) = 31,622), so even a nine-digit prime like 999,999,937 completes in under two milliseconds in your browser.
Second, decimal numbers (36.5), negative integers (-360), fractions (3/4), or commas trigger 'Enter a valid Integer to factor.' To factor a negative integer -n, factor its positive magnitude n and prepend -1 ×. To test individual remainders on larger numbers, use our Modulo Calculator.


Use this free prime number checker to test if any integer up to 1,000,000,000 is a prime number or composite, with square-root trial division and factors.
Open tool
Find the greatest common factor of the supplied integers.
Open tool
Use this free LCM calculator to find the least common multiple of 2 to 100 positive integers (like 12, 18, 30 = 180) in your browser with BigInt precision.
Open toolChoose another tool for your next calculation, conversion, or text task.
Use this free fraction simplifier to reduce proper and improper fractions to lowest terms, find the greatest common divisor (GCD), and get mixed numbers.
Open tool
Raise a real base to the supplied exponent.
Open tool
Calculate the real nth root of a number.
Open tool
Use this free modulo calculator to compute the non-negative Euclidean remainder (a mod b) for positive or negative integers between -1 billion and 1 billion.
Open toolAnswers about using Prime Factorization Calculator and understanding its results.
Start by dividing your number by the smallest prime, 2, as many times as it divides evenly. Once the quotient becomes odd, test 3, then 5, 7, 11, and subsequent primes in ascending order until the final quotient reaches 1. Multiplying all the prime divisors you extracted reconstructs the original number.
By definition, a prime number must have two distinct positive divisors (1 and itself), whereas 1 has only one positive divisor. If 1 were treated as prime, you could attach 1 × 1 × 1 to any factorization and lose the single unique prime decomposition required for every n >= 2.
Group identical prime factors together and count how many times each prime appears. In 2 × 2 × 2 × 3 × 3 × 5, the prime 2 appears 3 times, 3 appears 2 times, and 5 appears 1 time, which condenses to 2^3 × 3^2 × 5^1 (or 2^3 * 3^2 * 5 in plain text).
First write the prime factorization in exponential form n = p_1^e_1 × p_2^e_2 × ... × p_k^e_k. Then add 1 to each exponent and multiply those sums together: d(n) = (e_1 + 1)(e_2 + 1)...(e_k + 1). For 360 (2^3 × 3^2 × 5^1), the total number of positive divisors is (3+1)(2+1)(1+1) = 4 × 3 × 2 = 24.
If a composite number x has a factor greater than sqrt(x), its matching cofactor x / p must be smaller than sqrt(x) (since sqrt(x) × sqrt(x) = x). Therefore, if no integer between 2 and floor(sqrt(x)) divides x evenly, x cannot have any larger proper factor either and must be prime.
The input field caps values at 1,000,000,000 (10^9) so that trial division finishes in milliseconds without freezing your browser tab. If you have an even number or a multiple of 10 above 1,000,000,000 (such as 36,000,000,000), divide out obvious powers of 10 (10 = 2 × 5) or 2 first, factor the remaining quotient under 10^9, and combine the prime factors.
Choose another tool for your next calculation, conversion, or text task.